Commit | Line | Data |
---|---|---|
db4042d6 H |
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. It also can use Linux inotify to update the file tree. | |
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 | ![fm screenshot](/imgs/fm-screenshot.png) | |
15 | ||
16 | ### Invocation | |
17 | Usage: fm [-h|-d] [<tree_root>] | |
18 | The root of the displayed tree is `tree_root'. | |
19 | -h: show this help | |
20 | -d: print on stderr inotify events debug info | |
21 | ||
22 | ### Keyboard commands | |
23 | Most commands are based in text navigation of `Vim`. | |
24 | ||
25 | Moving the cursor: | |
26 | ||
27 | j: select next file. | |
28 | k: select previous file. | |
29 | l: open selected directory (open the directory twice to show dot files). | |
30 | h: close current/selected directory. | |
31 | Ctrl + f: move one page forward the cursor. | |
32 | Ctrl + b: move one page backward the cursor. | |
33 | Ctrl + d: move half page forward the cursor. | |
34 | Ctrl + u: move half page backward the cursor. | |
35 | gg: select first file. | |
36 | G: select last file. | |
37 | zz: center selected file on screen. | |
38 | H: select first line from screen. | |
39 | L: select last line from screen. | |
40 | }: selects next file without going deeper in the hierarchy. | |
41 | {: selects previous file without going deeper in the hierarchy. | |
42 | [[: selects parent directory. | |
43 | f + <letter>: selects next file that begins with <letter>. | |
44 | F + <letter>: selects previous file that begins with <letter>. | |
45 | ||
46 | Running external programs: | |
47 | ||
48 | l: opens the selected file with text pager/PDF viewer/PS viewer/image viewer (based on the file name extension). | |
49 | s: spawns the shell in the current directory (Use Ctrl + d to return). | |
50 | Enter: starts the editor with selected file. | |
51 | ||
52 | Miscellanea: | |
53 | ||
54 | q: quits fm. | |
55 | Ctrl + l: redraws the entire screen and reloads the content of the current working directory. | |
56 | Ctrl + g: prints info from the selected like `ls -l`. | |
57 | Esc: clear info window. Set command repetitions to one. | |
58 | ||
59 | 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. | |
60 | ||
61 | ### Project status | |
62 | Version 1.1 finished, Linux inotify support added. | |
63 | ||
64 | ### License | |
65 | The program is under the `GPLv3`. | |
66 | ||
67 | ### Feedback | |
68 | 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: | |
69 | ||
70 | jimenezrick@gmail.com |