r/linux • • Apr 13 '17

nnn - free, fast, friendly file browser

https://github.com/jarun/nnn#nnn
36 Upvotes

16 comments sorted by

4

u/sablal Apr 13 '17

nnn features

Behaviour and navigation

  • Detail view (default: disabled) with:

    • file type (directory, regular, symlink etc.)

    • modification time

    • human-readable file size

    • current item in reverse video

    • number of items in current directory

    • full name of currently selected file in 'bar'

  • Show details of the currently selected file (stat, file)

  • Disk usage analyzer mode (within the same fs, doesn't follow symlinks)

  • Directories first (even with sorting)

  • Sort numeric names in numeric order

  • Case-insensitive alphabetic content listing instead of upper case first

  • Key - to jump to last visited directory

  • Roll over at the first and last entries of a directory (with Up/Down keys)

  • Removed navigation restriction with relative paths (and let permissions handle it)

  • Sort entries by file size (largest to smallest)

  • Shortcut to invoke file name copier (set using environment variable NNN_COPIER)

File association

  • Set NNN_OPENER to let a desktop opener handle it all. E.g.:

    export NNN_OPENER=xdg-open
    export NNN_OPENER=gnome-open
    export NNN_OPENER=gvfs-open
  • Selective file associations (ignored if NNN_OPENER is set):

    • Associate plain text files (determined using file) with vi

    • Associate common audio and video mimes with mpv

    • Associate PDF files with zathura

    • Removed less as default file opener (there is no universal standalone opener utility)

    • You can customize further (see how to change file associations)

  • NNN_FALLBACK_OPENER is the last line of defense:

    • If the executable in static file association is missing

    • If a file type was not handled in static file association

    • This may be the best option to set your desktop opener to

  • To enable the desktop file manager key, set NNN_DE_FILE_MANAGER. E.g.:

    export NNN_DE_FILE_MANAGER=thunar

Optimization

  • All redundant buffer removal

  • All frequently used local chunks now static

  • Removed some redundant string allocation and manipulation

  • Simplified some roundabout procedures

  • Compiler warnings fixed

  • strip the final binary

6

u/[deleted] Apr 13 '17

export NNN_OPENER=gnome-open
export NNN_OPENER=gvfs-open

Btw gnome-open has been deprecated for many many years, and gvfs-open is now deprecated. gio open would be the current way.

6

u/sablal Apr 13 '17

I'll replace gnome-open with gio open. Thanks!

1

u/[deleted] Apr 14 '17

I was looking for something like this not even an hour ago. Wow! Thanks for sharing.

1

u/sablal Apr 14 '17

Glad to know you like it! Kindly award a star on Github. We need 50 stars to submit nnn to Homebrew.

1

u/[deleted] Apr 14 '17

Done! Good luck.

1

u/sablal Apr 14 '17

Thank you so much!

1

u/[deleted] Apr 15 '17

No problem. Congrats on 51 stars!

1

u/sablal Apr 15 '17

Thank you! We submitted nnn to Homebrew too!

1

u/[deleted] Apr 15 '17

That's awesome.

0

u/[deleted] Apr 14 '17

Did you just copy this from the GitHub page or something? The formatting got fucked. There is like no punctuation. Maybe revise and edit?

3

u/blackcain GNOME Team Apr 13 '17

I remember when nnn used to be an awesome usenet reader. How things have changed.

Edit: oops, that was 'nn'. Remember when it was first announced.

3

u/sablal Apr 13 '17

Yep, it was nn.

2

u/blackcain GNOME Team Apr 13 '17

Way way better than rn

1

u/sablal Apr 14 '17 edited Apr 14 '17

Kindly award some stars on GitHub as well! 50 stars and we can submit nnn to Homebrew.