You are not logged in.
When issuing the ! command is there a way to insert text from the clipboard? The usual combinations (shift + insert, middle click) don't work.
The problem is the "flushinput" option. Deactivate it temporarily by typing zi or permanently with echo "flushinput = False" >> ~/.ranger/options.py. I'll make this more intuitive by default in future versions.
There's something I need to improve in my setup. I start ranger with
/usr/bin/urxvtc -e /usr/bin/ranger
via mod4+alt+e in my i3 setup. Then, for example, when I start a movie from within ranger, mplayer starts to playback, but as soon as I close ranger, mplayer is being killed. Is there a way to avoid this problem? It works fine if I start ranger manually in a terminal. Is the missing shell the issue here? As far as I know with a line like /usr/bin/urxvtc -e /usr/bin/ranger there's no zsh (which I use) being loaded, right?
Try nohup (man nohup)
Where exactly am I supposed to change mplayer to be started like that? I don't really get the python code
The easy way:
sed "s/tup('mplayer/tup('nohup', 'mplayer/" < /usr/share/ranger/ranger/defaults/apps.py > ~/.ranger/apps.py
Hmm do I have to explain that? Well: the default config is in /usr/share/ranger/ranger/deaults/. First copy the file apps.py to ~/.ranger/apps.py. Then prepend a "nohup" before mplayer commands. In the code, the "return tup(x, y, z)" is equivalent to the command: "Run the program x with the arguments y and z!" and a *c is the representation of all selected files.
Something small that might be useful:
Is it possible to display the file extension in the bottom bar along with the writing permissions, size, etc? As long file names get cut off, several files with identical, long file names but different file extensions are not distinguishable.
I'm afraid I won't implement that. You can press A to take a quick look at the full name. I'll consider litemotivs suggestion though. I think thats how midnight commander does it. *hopes it's not patented*
Until then: take a look at the code, ranger/gui/widgets/statusbar.py. It shouldn't be hard to add it yourself. The extension can be obtained from: self.fm.env.cf.extension
my simple test is a directory with no files but with a number of subdirectories, pcman shows this almost instantly where ranger takes a while. easiest to compare on a slow drive (e.g. network, usb etc.). maybe ranger is also indexing the files of every subdir in this scenario?
Not really indexing, but I need to obtain a list of all files in each subdirectory. The length of that list is used as the "size" of the directory.
Anyway, my tests show that it's certanily possible to get a >100% speedup in loading directories. I'll just have to find some time and work on it.
Last edited by hut (2010-05-04 16:41:43)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
That did the trick. Thanks!
ntness wrote:When issuing the ! command is there a way to insert text from the clipboard? The usual combinations (shift + insert, middle click) don't work.
The problem is the "flushinput" option. Deactivate it temporarily by typing zi or permanently with echo "flushinput = False" >> ~/.ranger/options.py. I'll make this more intuitive by default in future versions.
transcend to the fifth abode
Offline
golwin wrote:Something small that might be useful:
Is it possible to display the file extension in the bottom bar along with the writing permissions, size, etc? As long file names get cut off, several files with identical, long file names but different file extensions are not distinguishable.I'm afraid I won't implement that. You can press A to take a quick look at the full name. I'll consider litemotivs suggestion though. I think thats how midnight commander does it. *hopes it's not patented*
Until then: take a look at the code, ranger/gui/widgets/statusbar.py. It shouldn't be hard to add it yourself. The extension can be obtained from: self.fm.env.cf.extension
Alright. I'm not really sure how self.fm.env.cf.extension should work though. I only got self.fm.env.cf.basename working.
For the moment I solved it with adding "import os" and the following in statusbar.py (just in case anyone else is interested)
line 180 left.add_space()
line 181 left.add(str(os.path.splitext(os.path.basename(str(target)))[1]))
Maybe it's a rather awful hack, but it works It's the first time I'm using Python, so I'm halfway satisfied.
Thanks hut for the great support in this thread
Last edited by golwin (2010-05-04 15:39:44)
arch64 | awesome | screen | ranger | vim | cmus | weechat | bitlbee
Offline
I don't know if you need any more feature requests, but there is one feature in Total Commander that I miss in all but one file managers for linux: branch view: one list with all files in all subdirs recursively. Very useful. I figured, since you scan a lot of subdirs already, you're half ways to a killer feature...
Offline
I don't know if you need any more feature requests, but there is one feature in Total Commander that I miss in all but one file managers for linux: branch view: one list with all files in all subdirs recursively. Very useful. I figured, since you scan a lot of subdirs already, you're half ways to a killer feature...
I'll add this to my todo-list.
Just to make sure: You're talking about simply adding all files/directories from subdirectories recursively to the current list? Without any fancy graphical stuff? That would be relatively easy. But it would possibly result in duplicate file names. There's not much space to display the full relative path. Then again, I could put the path into the statusbar. Well, I'll think about it.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
yes, that's what I mean: something like the output of
find .
, only as a file list just like any other, that can be sorted by name, size, date, etc. And, yes, there will be duplicate file names, but if the path is in the status bar, then there's no problem there.
The behaviour in Total Commander, which is sane, is that if you select a file which sits somewhere in a subdir, and press "go up", one goes to the parent of the dir in which the file is (and not of the root dir from which the branch view command was issued).
Offline
Anyway, my tests show that it's certanily possible to get a >100% speedup in loading directories. I'll just have to find some time and work on it.
The newest version feels about twice as fast
Ranger is still much slower than vifm for example, but well thats the drawback of using python. I'll squeeze out some more milliseconds another day.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
/var/abs/extra still takes 5 seconds to load
Offline
/var/abs/extra still takes 5 seconds to load
What are the stats of that directory?
ls /var/abs/extra | wc -l
find /var/abs/extra -maxdepth 2 | wc -l
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
» ls /var/abs/extra | wc -l
1964
» find /var/abs/extra -maxdepth 2 | wc -l
6003
Offline
Try enabling optimization in python by running ranger like this:
PYTHONOPTIMIZE=2 ranger
This should cut it down to 4 seconds =P or less
Last edited by hut (2010-05-06 21:13:21)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
I found that a minor problem in Ranger is that it seems doesn't support inputting multibyte characters (CJKV character)....
well, it's a huge problem for me... hope it gets fixed in the future ..
btw, is there a way to make Ranger case-insensitive when listing files and directories ? i'd like to make this setting permanent
Last edited by b4283 (2010-05-08 11:04:50)
Offline
is there a way to make Ranger case-insensitive when listing files and directories ?
[options.py]
sort_case_insensitive = True
Offline
just found that the [delete] key doesn't work well in :console mode.
pressing, for example, [delete] in console, whlile cursor is at 5, like :123456789, will delete 6 instead of 5, and adding some weird spaces.
Offline
I found that a minor problem in Ranger is that it seems doesn't support inputting multibyte characters (CJKV character)....
well, it's a huge problem for me... hope it gets fixed in the future ..
Does it work after you type "zi" to disable "flushinput"?
If yes, you can make it permanent with
echo 'flushinput = False' >> ~/.ranger/options.py
just found that the [delete] key doesn't work well in :console mode.
pressing, for example, [delete] in console, whlile cursor is at 5, like :123456789, will delete 6 instead of 5, and adding some weird spaces.
Thanks for reporting it
Last edited by hut (2010-05-08 23:53:03)
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
Does it work after you type "zi" to disable "flushinput"?
If yes, you can make it permanent withecho 'flushinput = False' >> ~/.ranger/options.py
hi, thanks for reply.
the "zi" functionality you mentioned doesn't work very well, too. (though there are some differences)
it's hard to describe what it looks like, but basically seems like ranger still treat multibyte characters as ascii.
when i type 3 multibyte, i had to backspace 7 or 8 times to delete them.
Last edited by b4283 (2010-05-09 04:28:09)
Offline
"cw" is not in the keypress documentation. That is, when I press "c", I see several options at the bottom, but "cw" is not included.
Offline
"cw" is not in the keypress documentation. That is, when I press "c", I see several options at the bottom, but "cw" is not included.
Thanks
the "zi" functionality you mentioned doesn't work very well, too. (though there are some differences)
The length/width calculation simply works per byte, not per actual UTF-8 character, so the cursor position is off and the backspace key is broken. Expect this to be fixed until next week
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
I noticed a couple of other omissions in the keypress documentation:
1. "cd" doesn't show up as an alternative when pressing "c"
2. Nothing shows up when pressing "g". Is it reasonable to add a menu at the bottom for this?
Offline
Nothing shows up when pressing "g".
A small g does show up in the top-right corner.
Offline
You mean using cp for copying, etc?
In fact, I'm working on that already on a seperate branch. Copying is three times faster that way but it's not stable yet.
Until then, you can use !cp -r %c . (or !d!cp -r %c . to run it in background).
It seems like my tests were wrong. Copying with ranger is just as fast as with cp. It sucks that I realize it *now*, after I finished the implementation. Meh.
Well, I'll keep the branch in git (type "git checkout cp"), maybe the code will be useful in the future. But I see no reason to merge it into master.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
It seems like my tests were wrong. Copying with ranger is just as fast as with cp. It sucks that I realize it *now*, after I finished the implementation. Meh.
Well, I'll keep the branch in git (type "git checkout cp"), maybe the code will be useful in the future. But I see no reason to merge it into master.
ᶘ ᵒᴥᵒᶅ
Offline
Just opened a pdf with zathura and ranger crashed. Happened once before when it opened a jpg with mirage yesterday.
Traceback (most recent call last):10:16 .pdf
File "/usr/bin/ranger", line 51, in <module>
main()
File "/usr/share/ranger/ranger/__main__.py", line 175, in main
fm.loop()
File "/usr/share/ranger/ranger/core/fm.py", line 138, in loop
ui.redraw()
File "/usr/share/ranger/ranger/gui/ui.py", line 212, in redraw
self.draw()
File "/usr/share/ranger/ranger/gui/ui.py", line 233, in draw
DisplayableContainer.draw(self)
File "/usr/share/ranger/ranger/gui/displayable.py", line 268, in draw
displayable.draw()
File "/usr/share/ranger/ranger/gui/widgets/titlebar.py", line 56, in draw
self.throbber, 1)
_curses.error: addnstr() returned ERR
Traceback (most recent call last):15:47 .jpg
File "/usr/bin/ranger", line 51, in <module>
main()
File "/usr/share/ranger/ranger/__main__.py", line 175, in main
fm.loop()
File "/usr/share/ranger/ranger/core/fm.py", line 138, in loop
ui.redraw()
File "/usr/share/ranger/ranger/gui/ui.py", line 212, in redraw
self.draw()
File "/usr/share/ranger/ranger/gui/ui.py", line 233, in draw
DisplayableContainer.draw(self)
File "/usr/share/ranger/ranger/gui/displayable.py", line 268, in draw
displayable.draw()
File "/usr/share/ranger/ranger/gui/widgets/titlebar.py", line 56, in draw
self.throbber, 1)
_curses.error: addnstr() returned ERR
arch64 | awesome | screen | ranger | vim | cmus | weechat | bitlbee
Offline
hut wrote:Does it work after you type "zi" to disable "flushinput"?
If yes, you can make it permanent withecho 'flushinput = False' >> ~/.ranger/options.py
hi, thanks for reply.
the "zi" functionality you mentioned doesn't work very well, too. (though there are some differences)
it's hard to describe what it looks like, but basically seems like ranger still treat multibyte characters as ascii.
when i type 3 multibyte, i had to backspace 7 or 8 times to delete them.
I tried fixing it. Can you please upgrade ranger and see if it works for you now?
Just opened a pdf with zathura and ranger crashed. Happened once before when it opened a jpg with mirage yesterday.
Are you using a tiling window manager? Anyway, it's fixed, thank you for reporting.
"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users
Offline
golwin wrote:Just opened a pdf with zathura and ranger crashed. Happened once before when it opened a jpg with mirage yesterday.
Are you using a tiling window manager? Anyway, it's fixed, thank you for reporting.
Yes, I'm using awesome.
arch64 | awesome | screen | ranger | vim | cmus | weechat | bitlbee
Offline