You are not logged in.

#301 2010-05-03 21:49:21

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

Re: Ranger, a textbased filemanager

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.

Army wrote:

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)

Army wrote:

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.

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

litemotiv wrote:

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

#302 2010-05-03 23:01:37

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: Ranger, a textbased filemanager

That did the trick. Thanks!

hut wrote:
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

#303 2010-05-04 13:03:59

golwin
Member
From: Germany, Aachen
Registered: 2009-03-12
Posts: 35

Re: Ranger, a textbased filemanager

hut wrote:
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 wink It's the first time I'm using Python, so I'm halfway satisfied.

Thanks hut for the great support in this thread smile

Last edited by golwin (2010-05-04 15:39:44)


arch64 | awesome | screen | ranger | vim | cmus | weechat | bitlbee

Offline

#304 2010-05-05 10:19:54

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Ranger, a textbased filemanager

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... smile

Offline

#305 2010-05-05 15:29:28

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

Re: Ranger, a textbased filemanager

eyolf wrote:

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... smile

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

#306 2010-05-05 15:42:14

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Ranger, a textbased filemanager

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

#307 2010-05-06 00:13:08

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

Re: Ranger, a textbased filemanager

hut wrote:

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 smile
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

#308 2010-05-06 13:49:24

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Ranger, a textbased filemanager

/var/abs/extra still takes 5 seconds to load hmm

Offline

#309 2010-05-06 15:16:03

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

Re: Ranger, a textbased filemanager

JohannesSM64 wrote:

/var/abs/extra still takes 5 seconds to load hmm

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

#310 2010-05-06 15:24:20

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Ranger, a textbased filemanager

» ls /var/abs/extra | wc -l
1964
» find /var/abs/extra -maxdepth 2 | wc -l
6003

Offline

#311 2010-05-06 21:12:48

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

Re: Ranger, a textbased filemanager

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

#312 2010-05-08 10:40:28

b4283
Member
Registered: 2008-11-26
Posts: 123

Re: Ranger, a textbased filemanager

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 .. smile

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

#313 2010-05-08 11:05:01

aeosynth
Member
From: California
Registered: 2010-02-06
Posts: 115
Website

Re: Ranger, a textbased filemanager

b4283 wrote:

is there a way to make Ranger case-insensitive when listing files and directories ?

[options.py]
sort_case_insensitive = True

Offline

#314 2010-05-08 18:01:25

b4283
Member
Registered: 2008-11-26
Posts: 123

Re: Ranger, a textbased filemanager

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

#315 2010-05-08 23:47:30

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

Re: Ranger, a textbased filemanager

b4283 wrote:

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 .. smile

Does it work after you type "zi" to disable "flushinput"?
If yes, you can make it permanent with

echo 'flushinput = False' >> ~/.ranger/options.py
b4283 wrote:

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

#316 2010-05-09 04:23:06

b4283
Member
Registered: 2008-11-26
Posts: 123

Re: Ranger, a textbased filemanager

hut wrote:

Does it work after you type "zi" to disable "flushinput"?
If yes, you can make it permanent with

echo '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

#317 2010-05-09 10:25:27

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

Re: Ranger, a textbased filemanager

"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

#318 2010-05-09 10:35:10

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

Re: Ranger, a textbased filemanager

cmlr wrote:

"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

b4283 wrote:

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

#319 2010-05-09 12:31:39

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

Re: Ranger, a textbased filemanager

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

#320 2010-05-10 05:46:37

aeosynth
Member
From: California
Registered: 2010-02-06
Posts: 115
Website

Re: Ranger, a textbased filemanager

cmlr wrote:

Nothing shows up when pressing "g".

A small g does show up in the top-right corner.

Offline

#321 2010-05-16 00:02:03

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

Re: Ranger, a textbased filemanager

hut wrote:

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

#322 2010-05-16 01:04:44

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

Re: Ranger, a textbased filemanager

hut wrote:

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.

tongue.png


ᶘ ᵒᴥᵒᶅ

Offline

#323 2010-05-17 08:27:15

golwin
Member
From: Germany, Aachen
Registered: 2009-03-12
Posts: 35

Re: Ranger, a textbased filemanager

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

#324 2010-05-17 18:25:32

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

Re: Ranger, a textbased filemanager

b4283 wrote:
hut wrote:

Does it work after you type "zi" to disable "flushinput"?
If yes, you can make it permanent with

echo '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?


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.


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

Offline

#325 2010-05-17 18:56:13

golwin
Member
From: Germany, Aachen
Registered: 2009-03-12
Posts: 35

Re: Ranger, a textbased filemanager

hut wrote:
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

Board footer

Powered by FluxBB