[feat] merge bookmarks in Keys
[sfm.git] / README.md
bloba86170ddf32e0dca07cb49e3d3eb259aa9fdbe89
1 ![sfm](https://github.com/afify/sfm/blob/main/sfm.png?raw=true)
3 **simple file manager**
5 [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/afify/sfm.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/afify/sfm/context:cpp)
6 [![Build status](https://ci.appveyor.com/api/projects/status/goq88ahjyvtjrui2?svg=true)](https://ci.appveyor.com/project/afify/sfm)
7 [![code-inspector](https://www.code-inspector.com/project/19656/score/svg)](https://frontend.code-inspector.com/public/project/19656/sfm/dashboard)
8 [![code-inspector](https://www.code-inspector.com/project/19656/status/svg)](https://frontend.code-inspector.com/public/project/19656/sfm/dashboard)
10 Description
11 ------------
12 sfm is a simple file manager for unix-like systems.
14 * Use pthread to read events, no timers.
15 * BSD kqueue(2) - kernel event notification mechanism.
16 * Linux inotify(7) - monitoring filesystem events.
17 * dual pane.
18 * bookmarks.
19 * open files by extension.
20 * bottom statusbar.
21 * vim-like key bindings.
22 * filter.
23 * no dependencies.
24 * c99 static linking.
25 * based on [termbox](https://github.com/nsf/termbox).
26 * Inspired by [vifm](https://vifm.info/) and [noice](https://git.2f30.org/noice/).
27 * Follows the suckless [philosophy](https://suckless.org/philosophy/).
29 Performance
30 ------------
31 ```sh
32 $ perf stat -r 100 $filemanager
33 ```
34 | filemanager | cycles        | instructions  |
35 |:------------|:--------------|:--------------|
36 | `sfm`       | `1,137,335`   | `1,789,463`   |
37 | `noice`     | `5,380,103`   | `9,214,250`   |
38 | `nnn`       | `5,664,917`   | `9,790,040`   |
39 | `lf`        | `18,874,802`  | `33,281,073`  |
40 | `vifm`      | `38,792,656`  | `93,301,255`  |
41 | `ranger`    | `536,225,530` | `956,977,175` |
43 <img src="https://github.com/afify/afify.github.io/raw/main/img/sfm_sc.png" alt="drawing" width="800"/>
45 Options
46 -------
47 ```sh
48 $ sfm [-v]
49 $ man sfm
50 ```
52 **normal mode**
53 | key      | description         |
54 |:---------|:--------------------|
55 | `q`      | quit                |
56 | `h`      | back                |
57 | `j`      | down                |
58 | `k`      | up                  |
59 | `l`      | open                |
60 | `g`      | top                 |
61 | `G`      | bottom              |
62 | `M`      | middle              |
63 | `ctrl+u` | scroll up           |
64 | `ctrl+d` | scroll down         |
65 | `n`      | create new file     |
66 | `N`      | create new dir      |
67 | `d`      | delete file \| dir  |
68 | `y`      | yank                |
69 | `p`      | paste               |
70 | `P`      | move                |
71 | `c`      | rename              |
72 | `v`      | start visual mode   |
73 | `/`      | start filter        |
74 | `ENTER`  | find  filter        |
75 | `ESC`    | exit  filter        |
76 | `SPACE`  | switch pane         |
78 **visual mode**
79 | key      | description         |
80 |:---------|:--------------------|
81 | `j`      | select down         |
82 | `k`      | select up           |
83 | `d`      | delete selection    |
84 | `y`      | yank selection      |
85 | `v`      | exit visual mode    |
86 | `q`      | exit visual mode    |
87 | `ESC`    | exit visual mode    |
89 Installation
90 ------------
91 **current**
92 ```sh
93 git clone https://github.com/afify/sfm.git
94 cd sfm/
95 make
96 make install
97 ```
98 **latest release**
99 ```sh
100 wget --content-disposition $(curl -s https://api.github.com/repos/afify/sfm/releases/latest | tr -d '",' | awk '/tag_name/ {print "https://github.com/afify/sfm/archive/"$2".tar.gz"}')
101 tar -xzf sfm-*.tar.gz && cd sfm-*/
102 make
103 make install
107 ```sh
108 $ sfm
111 Configuration
112 -------------
113 The configuration of sfm is done by creating a custom config.h
114 and (re)compiling the source code. This keeps it fast, secure and simple.