You are not logged in.

#801 2011-02-09 15:58:46

gorilla
Member
From: Berlin
Registered: 2010-06-15
Posts: 72

Re: Ranger, a textbased filemanager

Does anyone know how it's possible to detach mplayer, when playing audiofiles? I've tried it and mplayer starts playing, but it's only possible "quit" it with killall mplayer, because mplayer is not starting in a terminal....

Offline

#802 2011-02-10 20:54:00

vik_k
Member
From: Pune, India
Registered: 2009-07-12
Posts: 227
Website

Re: Ranger, a textbased filemanager

hey hut.... first of all thanks for this awesome file manager.

gorilla:
cant seem to understand ur problem completely, I think u are able to detach mplayer but have problems killing it. Then you should control mplayer with a fifo & send commands thru it.
firstly, make a fifo with mkfifo & add it to mplayer's config file.

input=file="/home/vikki/.mplayer/mplayer_fifo"

now, echo "quit" > the_fifo should do it.

my problem now, for some 2-3 weeks whenever i run something from ranger i.e. a video or a slideshow etc the processes never end cleanly, they always leave a zombie process and this only happens when feh, mplayer or any other program is started from ranger otherwise they end fine when started independently from terminal.

so what might be the cause??

Last edited by vik_k (2011-02-10 20:56:07)


"First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack." ~ George Carrette

Offline

#803 2011-02-10 21:47:18

gorilla
Member
From: Berlin
Registered: 2010-06-15
Posts: 72

Re: Ranger, a textbased filemanager

vik_k wrote:

gorilla:
cant seem to understand ur problem completely, I think u are able to detach mplayer but have problems killing it. Then you should control mplayer with a fifo & send commands thru it.
firstly, make a fifo with mkfifo & add it to mplayer's config file.

input=file="/home/vikki/.mplayer/mplayer_fifo"

now, echo "quit" > the_fifo should do it.

Well, thank you, but killing mplayer works, but when I detach mplayer for playing audiofiles it's like starting "mplayer .mp3" from dmenu... It will fire up, but you have to kill it from a terminal...

EDIT: Solved! Ranger is firering up mplayer in a new terminal now, if it is an audio-file...

Last edited by gorilla (2011-02-10 22:15:24)

Offline

#804 2011-02-11 16:56:55

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

vik_k wrote:

my problem now, for some 2-3 weeks whenever i run something from ranger i.e. a video or a slideshow etc the processes never end cleanly, they always leave a zombie process and this only happens when feh, mplayer or any other program is started from ranger otherwise they end fine when started independently from terminal.

so what might be the cause??

I don't have any idea... Lets start with the usual questions: What python version and what ranger version are you using? Did you change anything before this started to happen?

gorilla wrote:

Does anyone know how it's possible to detach mplayer, when playing audiofiles? I've tried it and mplayer starts playing, but it's only possible "quit" it with killall mplayer, because mplayer is not starting in a terminal....

You can also run it detached with 1l and kill it with ctrl+c.

Last edited by hut (2011-02-11 16:59:36)


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#805 2011-02-11 17:28:06

vik_k
Member
From: Pune, India
Registered: 2009-07-12
Posts: 227
Website

Re: Ranger, a textbased filemanager

hut:
python 3.1.3
ranger 1.4.1 (actually its ranger-git 20110210-1)

and nah... i didn't changed anything. i even tried ranger with default config files but it always leaves a zombie process.

1 more thing... it happens only when the process is detached from ranger, otherwise no problem like playing an audio file.

Last edited by vik_k (2011-02-11 17:30:16)


"First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack." ~ George Carrette

Offline

#806 2011-02-11 23:50:08

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

What i would really love is an MPD client based on Ranger or as an extension to it, wouldn't that be a great idea?


ᶘ ᵒᴥᵒᶅ

Offline

#807 2011-02-11 23:57:47

Miblo
Member
From: Manchester, UK
Registered: 2010-07-05
Posts: 160
Website

Re: Ranger, a textbased filemanager

litemotiv wrote:

What i would really love is an MPD client based on Ranger or as an extension to it, wouldn't that be a great idea?

ncmpcpp with some extra functions – mainly ranger's "f" search and count jump – and slightly differently configured keybindings would be just the ticket.


@archun: Intel® Core™ i5-4210M • [GPU] Intel® HD Graphics 4600 • [Kernel] linux-ck-haswell
Handmade.NetworkGitLab
The Life and Times of Miblo del Carpio

Offline

#808 2011-02-12 12:45:44

Falstaff
Member
Registered: 2008-11-03
Posts: 80

Re: Ranger, a textbased filemanager

Is it possible to configure Ranger to sort files by mtime+reverse by default?

Last edited by Falstaff (2011-02-12 12:46:10)

Offline

#809 2011-02-12 16:36:08

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

Falstaff wrote:

Is it possible to configure Ranger to sort files by mtime+reverse by default?

put this in ~/.config/ranger/options.py

sort = 'mtime'
sort_reverse = True
litemotiv wrote:

What i would really love is an MPD client based on Ranger or as an extension to it, wouldn't that be a great idea?

It's easy to add a key that moves to the song you're currently playing, and another key that plays the song you're currently on. "next song", "previous song", etc is just a call to mpc. But playlist management is gonna be non-trivial. ;_;.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#810 2011-02-12 16:43:41

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

hut wrote:

It's easy to add a key that moves to the song you're currently playing, and another key that plays the song you're currently on. "next song", "previous song", etc is just a call to mpc. But playlist management is gonna be non-trivial. ;_;.

If you start out with just the primary/dynamic playlist (similar to a marked-list), would that make things easier?

I think that many people would love this functionality, and would be more than willing to donate to a RMpd plugin project (at least i would!). smile


ᶘ ᵒᴥᵒᶅ

Offline

#811 2011-02-12 16:44:01

Falstaff
Member
Registered: 2008-11-03
Posts: 80

Re: Ranger, a textbased filemanager

@hut: Thanks!

Offline

#812 2011-02-12 23:52:49

cmlr
Member
From: Rochester, NY, USA
Registered: 2007-04-18
Posts: 99

Re: Ranger, a textbased filemanager

FarmerF wrote:
botzoboy wrote:

Thanks hut!!!
Solved now with Trash, remain to figure out how to manage removable devices.

Though the solution on the wiki page works as a trash for ranger the files won't show up in Thunar's trash. I solved this as follows but have not tested it with exotic filenames:

# move to trash
@map('DD')
def movetotrash(arg):
   trash_dir = "/home/fdeboer/.local/share/Trash"
   selection = arg.fm.env.get_selection()
   import datetime
   for item in selection:
      file = os.path.split(str(item))[1]
      with open(os.path.join(trash_dir,"info",file +".trashinfo"),'w') as info:
              info.write("[Trash Info]\n")
              info.write("Path="+str(item)+"\n")
              dTime = datetime.datetime.now().strftime("%Y-%m-%dT%H:%M:%S")
              info.write("DeletionDate="+dTime+"\n")
   arg.fm.run(['mv', '-t', os.path.join(trash_dir,"files")] + [str(f) for f in selection])

This creates a file.trashinfo file which Thunar uses to show the original location and deletion time and allows Thunar to undelete.

It would also be nice to update the file ~/.local/share/Trash/metadata by adding to the number, which represents the size of the files in Trash.

Offline

#813 2011-02-13 08:12:42

ornicar
Member
Registered: 2011-02-13
Posts: 1

Re: Ranger, a textbased filemanager

Hi archlinux fellows

I made a quick hack to use ranger as my vim file browser.
Get the code here: http://ornicar.github.com/ranger-as-vim … nager.html

Comments welcome, I'm a python/vimscript beginner

Last edited by ornicar (2011-02-13 08:13:31)

Offline

#814 2011-02-13 15:21:15

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

ornicar wrote:

Hi archlinux fellows

I made a quick hack to use ranger as my vim file browser.
Get the code here: http://ornicar.github.com/ranger-as-vim … nager.html

Comments welcome, I'm a python/vimscript beginner

Well this is nice, I'm definitely gonna add it to the repo.
No idea how I could live all my life without this.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#815 2011-02-21 13:47:02

botzoboy
Member
From: Romania/Deutschland
Registered: 2010-02-03
Posts: 90

Re: Ranger, a textbased filemanager

How can I run (python, bash..) scripts or executable games from ranger?
For bash scripts I use: shell bash f%
Is there an easy way to do this??

Offline

#816 2011-02-21 13:53:20

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

botzoboy wrote:

How can I run (python, bash..) scripts or executable games from ranger?
For bash scripts I use: shell bash f%
Is there an easy way to do this??

try !shell ./%f or simply rself


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#817 2011-02-22 13:08:59

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: Ranger, a textbased filemanager

cool thingie.
first impressions:
- no '.' keybind?
- 'enter' seems to open $EDITOR, but I cannot find the definition in ranger/defaults/keys.py
- how do I theme this thing? (man ranger, `pacman -Ql ranger | grep theme` and the built-in help don't say). I specifically want the selection in the "main" column to have a different color then the others


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#818 2011-02-22 13:28:50

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

Dieter@be wrote:

- no '.' keybind?

What should the '.' key do in your opinion?

Dieter@be wrote:

- 'enter' seems to open $EDITOR, but I cannot find the definition in ranger/defaults/keys.py

The behaviour of enter and l is configured in apps.py, see ranger/defaults/apps.py

Dieter@be wrote:

- how do I theme this thing? (man ranger, `pacman -Ql ranger | grep theme` and the built-in help don't say). I specifically want the selection in the "main" column to have a different color then the others

See ranger/colorschemes/default.py and perhaps ranger/colorschemes/jungle.py as a reference on how to derive colorschemes.
Try adding something like

if context.selected and context.in_browser and context.main_column and ...be as precise as you want:
  bg = magenta
  attr = underline

"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#819 2011-02-22 14:27:50

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: Ranger, a textbased filemanager

hut wrote:
Dieter@be wrote:

- no '.' keybind?

What should the '.' key do in your opinion?

Repeat the last action, I guess. Not that that makes a lot of sense from a file-manager perspective.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#820 2011-02-22 14:36:17

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

ngoonee wrote:
hut wrote:
Dieter@be wrote:

- no '.' keybind?

What should the '.' key do in your opinion?

Repeat the last action, I guess. Not that that makes a lot of sense from a file-manager perspective.

I can imagine the confused face after ranger just deleted your file after you accidently pressed . with deletion being your last action ^^

I could make . repeat the last command, like @: in vim, with the option to exclude certain dangerous commands like :delete


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#821 2011-02-22 17:11:22

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,000
Website

Re: Ranger, a textbased filemanager

hut wrote:

I could make . repeat the last command, like @: in vim, with the option to exclude certain dangerous commands like :delete

'.' repeats the last command in vim [ as well ? ]
and indeed, that's what I would use it for: do the same thing on this file, whatever it was!
to prevent accidental deletions maybe make the bind '..' (i.e. press '.' twice within the same 100 ms or so)
btw, is there anything like a visual mode?


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#822 2011-02-22 17:23:34

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

in vim, "@:" repeats the last command (the ones that start with a ":") and "." repeats the last "change", whatever that means.

No visual mode in master, but the devel branch has it. I have no time to finish it.
In master you got the ^V key that behaves similar to d or y. For example, type ^VG  to select everything from here to the bottom.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#823 2011-02-23 03:04:46

igndenok
Member
From: Sidoarjo, Indonesia
Registered: 2010-06-07
Posts: 160

Re: Ranger, a textbased filemanager

Just pass by, and thanks for this awesome application hut. I can say goodbye to pcmanfm, thunar and mc big_smile


Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.

Offline

#824 2011-02-23 19:10:41

niksfirefly
Member
Registered: 2011-02-23
Posts: 9

Re: Ranger, a textbased filemanager

Is it possible to access aliases,functions,and exported variables from bash defined in .bashrc
in :shell ranger??

I am getting not found errors with custom commands and cant find the rule how it works
what is the chain of loading bash startup files when i start for example
:shell -w "my_command_form_bashrc"

Offline

#825 2011-02-23 19:11:44

niksfirefly
Member
Registered: 2011-02-23
Posts: 9

Re: Ranger, a textbased filemanager

Is it possible to access aliases,functions,and exported variables from bash defined in .bashrc
in :shell ranger??

I am getting not found errors with custom commands and cant find the rule how it works
what is the chain of loading bash startup files when i start for example
:shell -w "my_command_form_bashrc"

Offline

Board footer

Powered by FluxBB