You are not logged in.

#26 2010-03-14 12:39:03

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

Re: Ranger, a textbased filemanager

You might have noticed that the configuration file at ~/.ranger/options.py is ignored. Please update to fix that bug. (Thanks to alterecco for pointing it out)

edit 1:

alterecco wrote:

I am really glad you had not already thought of the 'lazy horizontal scrolling' and discarded it. That might mean you would implement it smile. I spent some time going over the code to see if I could add it myself and ended shelving it for now. I would need more time to get into the code.

I looked into it as well, and it surely is not trivial to implement. The columns are fixed at the moment and there are few mechanisms to change the behaviour of columns. Also I'm concerned about the placement of file previews. I'll think about everything, but it will take some time D=

edit 2:

JohannesSM64 wrote:

Reminds me of vifm.. smile
Will try.

edit: nice, but how do i get it to open text files in vim ($EDITOR) instead of it asking for which program to use every time? Looking at apps.py it uses it "if f.document", which doesn't seem so reliable. If the file has a .txt extension, it's opened in vim, but with no extension (which is usually the case) it asks which program to use. *nix isn't file extension based, so it should use MIME types, like "if text/plain use vim"

Fixed that as well. (used the file utility for now.)

Last edited by hut (2010-03-14 18:51:11)


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

Offline

#27 2010-03-14 21:02:27

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: Ranger, a textbased filemanager

Awesome application ! I've been wanting something like this for a while now. Is there any way to specify a sort order for specific directories only? (For example, I might want to sort everything by basename, but only my "anime" directory by mtime so I can easily see what's new there).

Last edited by GGLucas (2022-06-24 08:03:31)

Offline

#28 2010-03-14 21:11:20

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

Re: Ranger, a textbased filemanager

Nope, there is no such feature.
I reccommend simply pressing "n" to cycle through the newest files.

If you really want that feature though, you could easily implement it by changing ranger/fsobject/directory.py, line 265
sort_func = self.sort_dict[self.settings.sort]
to
sort_func = self.sort_dict['mtime' if self.path == '/my/anime/directory' else self.settings.sort]

I guess thats easily adaptable with basic python knowledge



About the options.py: it does work for me. Where are you getting ranger from?

Last edited by hut (2010-03-14 21:13:43)


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

Offline

#29 2010-03-14 21:16:32

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: Ranger, a textbased filemanager

Ah, thanks. I'll have a look at the python code, shouldn't be hard to implement it as a list in options.py

I'm getting it from the ranger-git pkgbuild in the aur, it uses the repo:

git://git.sv.gnu.org/ranger.git

The last commit I'm getting is a44749f63848740e95d1f168d73300c874ecf6c5, "use `file` for reliably identifying text files".

EDIT: Nevermind, looks like the config _is_ loaded, I just didn't see it correctly, my bad - I expected the texas colorscheme to change the colors, but they didn't, probably an 88 color thing.

Last edited by GGLucas (2010-03-14 21:25:08)

Offline

#30 2010-03-14 21:22:58

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

Re: Ranger, a textbased filemanager

thats the newest.

Try something like

echo "show_hidden = True" > ~/.ranger/options.py
(overwrites old config)

and see if the hidden files are shown now?

edit: nevermind smile

Last edited by hut (2010-03-14 21:23:39)


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

Offline

#31 2010-03-14 22:48:58

ludovico
Member
From: Oslo, Norway
Registered: 2008-08-24
Posts: 75

Re: Ranger, a textbased filemanager

This looks great, love the simplicity smile

I am trying to remap the hjkl keys to jklø, but I can't
get it to work. Is there a problem with unicode in python?


Sin? What's all this about sin?

Offline

#32 2010-03-14 23:34:43

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

Re: Ranger, a textbased filemanager

I can't get python curses to recognize unicode input. =/


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

Offline

#33 2010-03-15 01:12:16

upsidaisium
Member
From: Vietnam
Registered: 2006-09-16
Posts: 263
Website

Re: Ranger, a textbased filemanager

have you read the blurb about how curses interprets non-ASCII data? after the 3rd paragraph on this page: http://docs.python.org/library/curses.html

anyways, this looks like a nice file manager; i'm looking forward to testing it out when i get home this afternoon!


I've seen young people waste their time reading books about sensitive vampires. It's kinda sad. But you say it's not the end of the world... Well, maybe it is!

Offline

#34 2010-03-15 10:31:57

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

Re: Ranger, a textbased filemanager

upsidaisium wrote:

have you read the blurb about how curses interprets non-ASCII data? after the 3rd paragraph on this page: http://docs.python.org/library/curses.html

anyways, this looks like a nice file manager; i'm looking forward to testing it out when i get home this afternoon!

Yes, and that's how I enable displaying UTF chars on the screen. Doesn't change anything with inputs, for me at least. I just get char code of 195 everytime I type a non-ascii key.

Edit:
Eww. Seems like the enabled flushinput option eats up the other bytes of the unicode character.
It works for me now, after setting flushinput = False (by pressing "bi" or changing the configuration) and adding this line at the top of my keys.py:
# coding=utf-8

I'll make it work by default, later. Would be nice if someone can confirm that. (Note: unicode still doesn't work in the ocnsole, ill look into that later)

Last edited by hut (2010-03-15 10:45:55)


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

Offline

#35 2010-03-15 14:21:27

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Ranger, a textbased filemanager

I haven't looked much at the code yet, but is there any chance we could get an option for borders on the panes?


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#36 2010-03-15 16:34:38

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

Re: Ranger, a textbased filemanager

I might add that, sounds reasonable. Though, what kind of borders? like in mc or vifm? or simply vertical seperators between the columns?


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

Offline

#37 2010-03-15 16:38:13

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Ranger, a textbased filemanager

I meant like box drawing characters, but I just realized you're having issues with unicode in general so that may not be feasible at this time.

I just installed mc to have a look, yes that's what I mean, however I don't really care what you do about titles if you even want any.  mc puts the title in the bar and it's a bit offputting imho.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#38 2010-03-15 16:48:37

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

Re: Ranger, a textbased filemanager

It's very feasible. I'll look into it. Though I don't quite like the idea of using non-ascii characters by default in the user interface.

Last edited by hut (2010-03-15 16:49:02)


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

Offline

#39 2010-03-15 18:22:30

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Ranger, a textbased filemanager

hut wrote:

It's very feasible. I'll look into it. Though I don't quite like the idea of using non-ascii characters by default in the user interface.

I thought that curses had a border property of some sort so that you wouldn't have to deal with that.  I must be mistaken.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#40 2010-03-15 20:56:35

ludovico
Member
From: Oslo, Norway
Registered: 2008-08-24
Posts: 75

Re: Ranger, a textbased filemanager

hut wrote:

It works for me now, after setting flushinput = False (by pressing "bi" or changing the configuration) and adding this line at the top of my keys.py:
# coding=utf-8

It works! Thanks! wink


Sin? What's all this about sin?

Offline

#41 2010-03-16 03:02:20

disturb
Member
Registered: 2009-12-18
Posts: 70

Re: Ranger, a textbased filemanager

looks great, congrats on your work

Offline

#42 2010-03-16 05:13:16

delcake
Member
Registered: 2008-07-28
Posts: 62

Re: Ranger, a textbased filemanager

I've been playing with this for a little bit now and I have to weigh in here and say that I like it! It's very comfy, and the file preview is a very nice feature for all the text files I play with daily. Methinks I'll be adding this one to my day-to-day usage.

Offline

#43 2010-03-16 07:12:48

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Ranger, a textbased filemanager

I love it! What would be _really_ great to for example edit one's fstab:

open ranger /, type "e" and it jumps to the first available e, i.e. etc, move up one level, type "f" and it jumps to fstab...

Is that at all feasible?

EDIT:
Ah, okay, it works with vi's / search function smile Brilliant big_smile

Last edited by toad (2010-03-16 07:13:50)


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#44 2010-03-16 08:43:23

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

Re: Ranger, a textbased filemanager

try the "f" key


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

Offline

#45 2010-03-16 10:01:46

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

Re: Ranger, a textbased filemanager

very promising, nice work hut!

would it be possible to make it parse vim colorschemes? smile


ᶘ ᵒᴥᵒᶅ

Offline

#46 2010-03-16 15:34:57

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

Re: Ranger, a textbased filemanager

Are you insane? smile

Well it's certainly possible. Just gotta write a converter which maps things like "Marked Text in Visual Mode" to "Marked File" etc. But what about, say, directories? where to get that color from? Numbers? Strings? Comments? Would look weird


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

Offline

#47 2010-03-16 18:56:44

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

Re: Ranger, a textbased filemanager

hut wrote:

Are you insane? smile

yeah i know, i just hate having to build custom colorschemes each time for every new cli application. tongue


ᶘ ᵒᴥᵒᶅ

Offline

#48 2010-03-16 20:00:03

Sirsurthur
Member
Registered: 2009-02-02
Posts: 124

Re: Ranger, a textbased filemanager

Very nice project hut ! I am looking for the key bindings of ranger ? Thanks for any advices !

Offline

#49 2010-03-16 20:52:39

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

Re: Ranger, a textbased filemanager

Hello sirsurthur. It depends on how you installed ranger. If you used git or the tarball, you can simply edit
ranger/defaults/keys.py

If you installed ranger with the AUR package, you can write this:
cp /usr/share/ranger/ranger/defaults/keys.py ~/.ranger/keys.py

and edit the keybindings in ~/.ranger/keys.py

Last edited by hut (2010-03-16 21:04:33)


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

Offline

#50 2010-03-16 21:05:02

paldepind
Member
From: Århus, Denmark
Registered: 2010-02-17
Posts: 141

Re: Ranger, a textbased filemanager

This is awesome!! I like how the horizontal scrolling works and the preview of text files is nice too.

For some time I've been thinking about setting up a complete CLI environment on my netbook (just for fun). This program is sure going to be usefull.

Thanks!

Offline

Board footer

Powered by FluxBB