| 1 | FM (Fast Move: minimalistic ncurses file system viewer) |
| 2 | ======================================================= |
| 3 | Small, simple and efficient file system viewer for the console. It offers fast navigation, easy invocation of your common tools (`Emacs`/`Vim`/`Xpdf`/`less`/...) and instant access to your favorite shell. |
| 4 | |
| 5 | ### How to compile |
| 6 | It should run in any modern UNIX-like with minimal effort. You just need to have installed `ncursesw`, `glib` and its development headers. Then just run: |
| 7 | |
| 8 | make |
| 9 | |
| 10 | ### Hacking |
| 11 | Internally the file system hierarchy is represented in a N-ary tree in which each node represents a file and its associated information. Additionally a double-linked list is used to represent the lines from screen. The `glib` is used for its N-ary trees and double-linked lists. Also some string manipulation functions are used for commodity. The rest is standard POSIX code. |
| 12 | |
| 13 | ### Screenshot |
| 14 |  |
| 15 | |
| 16 | ### Invocation |
| 17 | Just run: |
| 18 | |
| 19 | fm [<root_directory>] |
| 20 | |
| 21 | ### Keyboard commands |
| 22 | Most commands are based in text navigation of `Vim`. |
| 23 | |
| 24 | Moving the cursor: |
| 25 | |
| 26 | * j: select next file. |
| 27 | * k: select previous file. |
| 28 | * l: open selected directory (open the directory twice to show dot files). |
| 29 | * h: close current/selected directory. |
| 30 | * Ctrl + f: move one page forward the cursor. |
| 31 | * Ctrl + b: move one page backward the cursor. |
| 32 | * Ctrl + d: move half page forward the cursor. |
| 33 | * Ctrl + u: move half page backward the cursor. |
| 34 | * gg: select first file. |
| 35 | * G: select last file. |
| 36 | * zz: center selected file on screen. |
| 37 | * H: select first line from screen. |
| 38 | * L: select last line from screen. |
| 39 | * }: selects next file without going deeper in the hierarchy. |
| 40 | * {: selects previous file without going deeper in the hierarchy. |
| 41 | * [[: selects parent directory. |
| 42 | * f + <letter>: selects next file that begins with <letter>. |
| 43 | * F + <letter>: selects previous file that begins with <letter>. |
| 44 | |
| 45 | Running external programs: |
| 46 | |
| 47 | * l: opens the selected file with text pager/PDF viewer/PS viewer/image viewer (based on the file name extension). |
| 48 | * s: spawns the shell in the current directory (Use Ctrl + d to return). |
| 49 | * Enter: starts the editor with selected file. |
| 50 | |
| 51 | Miscellanea: |
| 52 | |
| 53 | * q: quits fm. |
| 54 | * Ctrl + l: redraws the entire screen and reloads the content of the current working directory. |
| 55 | * Ctrl + g: prints info from the selected like `ls -l`. |
| 56 | * Esc: clear info window. Set command repetitions to one. |
| 57 | |
| 58 | The default choices for the external programs are `vim`/`xpdf`/`gv`/`display`. They are configured from `fm.h`. Also the can be customized setting the environment variables `PAGER` and `EDITOR` from the shell. The commands `h j k l` can be repeated several times with just one keystroke if a number is given first, just like `Vim` commands repetitions. The cursor can also be moved with the arrows from the keyboard. |
| 59 | |
| 60 | ### Project status |
| 61 | Version 1.0 finished, pending to add Linux `inotify` support. |
| 62 | |
| 63 | ### License |
| 64 | The program is under the `GPLv3`. |
| 65 | |
| 66 | ### Feedback |
| 67 | Send me an email if you have any question about the code, you found a bug or you have a feature request. Send it to: |
| 68 | |
| 69 | jimenezrick@gmail.com |