You are not logged in.

#1 2010-03-12 20:47:21

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

Ranger, a textbased filemanager

Update:
There's now an IRC channel, #ranger on freenode!

Update:
Check out ranger's github page too: http://github.com/hut/ranger
There's all the information you need: The README, the source code, a download link.

Ranger, a filemanager made for comfortable browsing with a text-based user interface. Multiple columns show you a preview and backview, VIM users will find the hotkeys intuitive, though most actions can also be done with arrow keys etc.

Everything's written in python and licensed under the GNU GPL v3.

Features:
* Multi-column display
* Preview of the selected file/directory
* Common file operations (create/chmod/copy/delete/...)
* Quickly find files or text inside files
* VIM-like console and hotkeys
* Open files in external programs
* Mouse support
* Change the directory of your shell after exiting ranger
* Bookmarks

Dependencies:
* A Unix-like Operating System
* Python 2.6 or 3.1
* Python curses module  (often but not always included with Python)

And here's a screenshot:
screenshot2.png

Check out the project page!
http://nongnu.org/ranger/

Submit bug reports here (or just post at this forum):
https://savannah.nongnu.org/bugs/?func= … oup=ranger

Get the git repository by typing:
git clone git://git.sv.gnu.org/ranger.git

Or use the PKGBUILD

I advise you to read the README and INSTALL file, but for the lazy, here's a download link and quickstart instructions:
http://git.savannah.gnu.org/cgit/ranger … ter.tar.gz

cd /the/download/path/
tar xf ranger-master.tar.gz && cd ranger-master
./ranger.py --clean

(the --clean option makes it leave no traces on your system.)

There you go. Press ? for help.

Thanks for reading. Of course I would appreciate any comments and contributions.

Last edited by hut (2014-10-15 20:10:09)


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

Offline

#2 2010-03-12 23:48:00

Lokaltog
Member
From: Norway
Registered: 2009-12-04
Posts: 53
Website

Re: Ranger, a textbased filemanager

Incredible! I love the simplicity and vim-like commands, and it feels very natural to use. This seems like a great application, and I'm looking forward to use it on a regular basis smile

Offline

#3 2010-03-13 00:57:53

alterecco
Member
Registered: 2009-07-13
Posts: 152

Re: Ranger, a textbased filemanager

This is really nice. Can't wait to look at the source. I love what you have done with the keybinds and command line. It feels very vim like and seems very full featured.

I do however feel a little disturbed by the large amount of horizontal movement. When I am in a directory and and enter a subdirectory it feels odd that the subdirectory switches place. It means every time I switch directory my eyes have to move back and forth. This might be something that just come from habit, but it might also be something that could keep me from using it. I am not sure.
I used osx for a while, and this multi-column layout feels a bit like their Finder. However, in Finder the position of the column only switches if you reach the edge, which I at the time found very easy on the eyes. I am not sure if it could be feasible to code this behaviour in as an option or if one is generally preferred over the other.

In any case. Thumbs up... this program might make me use a filemanager again... and python!!

Offline

#4 2010-03-13 02:09:06

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: Ranger, a textbased filemanager

For those that would prefer having an actual package, here's a package for ranger-git.


.:[My Blog] || [My GitHub]:.

Offline

#5 2010-03-13 02:48:28

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

Re: Ranger, a textbased filemanager

alterecco wrote:

the position of the column only switches if you reach the edge

Lazy horizontal scrolling sounds like an interesting suggestion. I never considered that, but now that you mention it, I might even prefer that myself

Ghost1227 wrote:

For those that would prefer having an actual package, here's a package for ranger-git.

Thanks a lot. And it works, wee! Though I'd rather replace the line
echo -e '#!/bin/sh\n/usr/share/ranger/ranger.py $*' >> ${pkgdir}/usr/bin/ranger

with:
ln -s /usr/share/ranger/ranger.py ${pkgdir}/usr/bin/ranger

I tested it and it works, though I might miss some bad implications (?)

If /usr/bin/ranger is a symlink rather than a wrapper, it allows a specific feature to work.(You can write "source ranger ranger", browse around and when you exit the program, the directory of your shell is magically changed to the last directory in ranger. bash/zsh only)


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

Offline

#6 2010-03-13 02:59:48

Ghost1227
Forum Fellow
From: Omaha, NE, USA
Registered: 2008-04-21
Posts: 1,422
Website

Re: Ranger, a textbased filemanager

hut wrote:

I'd rather replace the line
echo -e '#!/bin/sh\n/usr/share/ranger/ranger.py $*' >> ${pkgdir}/usr/bin/ranger

with:
ln -s /usr/share/ranger/ranger.py ${pkgdir}/usr/bin/ranger

Done


.:[My Blog] || [My GitHub]:.

Offline

#7 2010-03-13 07:13:36

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

Re: Ranger, a textbased filemanager

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"

Last edited by JohannesSM64 (2010-03-13 07:32:50)

Offline

#8 2010-03-13 10:13:39

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: Ranger, a textbased filemanager

Nice. Works quite well in a full screen term.

Offline

#9 2010-03-13 10:59:17

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: Ranger, a textbased filemanager

This reminds me of the Mac file manager thingy I've used at work. It was atrocious to work with it using a one-button mouse, but looks very, very promising when using a keyboard. smile

Offline

#10 2010-03-13 11:20:01

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

Re: Ranger, a textbased filemanager

JohannesSM64 wrote:

how do i get it to open text files in vim ($EDITOR) instead of it asking for which program to use every time?

It's hard to decide whether a file is a "text file" or not smile. Now you can either implement some efficient way of doing that, or open all "unknown" files in vim. The latter can be done easily, just change

if f.document:
    return self.app_editor(c)

to

return self.app_editor(c)

at the end of app_defaults()

Alternatively, use this as your ~/.ranger/apps.py

from ranger.defaults.apps import CustomApplications as DefaultApps
from ranger.api.apps import *
class CustomApplications(DefaultApps):
    def app_default(self, c):
        return DefaultApps.app_default(self, c) or self.app_editor(c)

It's not as complicated as it seems. I'm just making a subclass of the original class in apps.py, calling the original method, but in case it returns a zero value ("None", which means it found no suitable application), it falls back to app_editor.



Runiq wrote:

This reminds me of the Mac file manager thingy I've used at work. It was atrocious to work with it using a one-button mouse, but looks very, very promising when using a keyboard. smile

In fact, when all I need to do is browse around and start files, I frequently find myself using the mouse ^^. Click where you want to go, click on the preview to execute the file.

Last edited by hut (2010-03-13 11:32:46)


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

Offline

#11 2010-03-13 11:53:42

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

Re: Ranger, a textbased filemanager

file -bizL foo|cut -d/ -f1

if it prints "text" it's text

Offline

#12 2010-03-13 14:55:29

compuda
Member
From: Prague
Registered: 2010-03-06
Posts: 14
Website

Re: Ranger, a textbased filemanager

Runiq wrote:

This reminds me of the Mac file manager thingy I've used at work. It was atrocious to work with it using a one-button mouse, but looks very, very promising when using a keyboard. smile

It is very much like finder in terms of navigation.
I have actually been searching for a finder like (three pane) file manager.
This thing is great.

Thanks hut! I'll report back if any issues come up.

Offline

#13 2010-03-13 20:20:18

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Ranger, a textbased filemanager

I have to put some words here, this file manager really seems very promising! I have to take a deeper look into the config files, because there are a bunch of things I'd like to add, like previews for media files displayed by mediainfo (can be found in the AUR) the way textfiles are being displayed etc. Really very very nice work hut. Until now I used mc as default fm, but I never really liked it 100%. So thanks a lot for this!!

Offline

#14 2010-03-13 22:56:47

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

Re: Ranger, a textbased filemanager

I will try to include a more reliable check for text files, though I want to avoid using external programs like "find".


Btw, indeed there is some inspiration drawn from finder. Though I have never used a Mac. The only connection there was: I had a brief glance at this filemanager on my professors macbook during a Scheme lecture at university. This concept, which I later learned of to be known as Miller Columns, looked pretty neat to me and I wanted that on my console =P and here we are.

And about the code: I tried hard, but there must be plenty of cases where you just think "wtf is this shit" or "why so complicated?" Don't hesitate to contact me in such a case. On the other hand, if you manage to fight your way through the jungle of python code and write nice additions to the program, I'd love to see them and might even add them to my branch. (The safest way to contact me is write me an email.)


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

Offline

#15 2010-03-13 23:28:46

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: Ranger, a textbased filemanager

I tried it now, and it's every bit as awesome as I thought. Blazing fast even with my 2K dir music collection. Still have to find my way around the configuration, though. All in all, big kudos to you, hut!

Offline

#16 2010-03-13 23:34:51

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Ranger, a textbased filemanager

This is awesome.

Any chance you could put the config under ~/.config?

Offline

#17 2010-03-14 00:02:52

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

Re: Ranger, a textbased filemanager

falconindy wrote:

This is awesome.

Any chance you could put the config under ~/.config?

By default?

I don't know, what would be the benefit?

(for your own use, you can simply invoke ranger with --confdir=~/.config/ranger)


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

Offline

#18 2010-03-14 00:26:31

droog
Member
Registered: 2004-11-18
Posts: 877

Re: Ranger, a textbased filemanager

Really nice, giving it a go right now and love the navigation.


hut wrote:
falconindy wrote:

This is awesome.

Any chance you could put the config under ~/.config?

By default?

I don't know, what would be the benefit?

(for your own use, you can simply invoke ranger with --confdir=~/.config/ranger)

No benefit, I prefer configs in home some people like them in .config
A few apps follow a xdg config spec and unless all apps do it you have configs in 2 places making it more of a pain.

Offline

#19 2010-03-14 02:56:47

alterecco
Member
Registered: 2009-07-13
Posts: 152

Re: Ranger, a textbased filemanager

I like the invocation --with-config...

But, should you ever choose to set a default config directory in the home folder, .config is the place to put it (imo).

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 got as far as browserview.py when I realized I would need to spend some time logging vars to find out what does what and when. smile The code looks nice and clean, it is just a matter of getting an overview I imagine smile

All in all, I would like to repeat, nice work... Are you still developing on the app or do you consider it more or less complete for your needs?

Offline

#20 2010-03-14 03:25:35

MP2E
Member
Registered: 2009-09-05
Posts: 115

Re: Ranger, a textbased filemanager

WOW. This is great big_smile I feel right at home, one step towards a more Vim-like desktop.


17:23 < ConSiGno> yeah baby I release the source code with your mom every night
17:24 < ConSiGno> you could call them nightly builds if you know what I mean

Offline

#21 2010-03-14 03:33:36

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

Re: Ranger, a textbased filemanager

.config is not necessarily the proper place per the spec, it should instead be $XDG_CONFIG_HOME if anything. Just sayin' wink


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

Offline

#22 2010-03-14 04:08:16

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

Re: Ranger, a textbased filemanager

Thanks for the comments.

alterecco wrote:

Are you still developing

Meh. I wanted the basic program to be complete and easily extendable before I release it, but at that pace, I would never release anything. So I decided to do it now, after ensuring that it's sufficiently user-friendly and functioning. It's still far from perfect, so I'll keep refining it.


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

Offline

#23 2010-03-14 05:19:16

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Ranger, a textbased filemanager

This is nice hut. I'll have to work with it a while, but the first impression is a good one.

Offline

#24 2010-03-14 07:13:08

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

Re: Ranger, a textbased filemanager

Surprisingly nice fm....thank you for your fine contribution.


transcend to the fifth abode

Offline

#25 2010-03-14 10:06:06

ga01f4733
Member
From: NYC
Registered: 2008-12-05
Posts: 117

Re: Ranger, a textbased filemanager

Nice and neat, good idea, thanks guys


There are no foreign lands. It is the traveler only who is foreign. --R.L Stevenson

Offline

Board footer

Powered by FluxBB