[feat] visual mode, commands
[sfm.git] / README.md
blobea4728fae35709c3eaf757a08676b0915a690f51
1 ![sfm](https://github.com/afify/sfm/blob/master/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 [![License](https://img.shields.io/github/license/afify/sfm?color=blue)](https://github.com/afify/sfm/blob/master/LICENSE)
9 Description
10 ------------
11 sfm is a simple file manager for unix-like systems based on [termbox](https://github.com/nsf/termbox).
12 dual pane, bottom statusbar, bookmarks, open files by extention, vim-like key bindings as default configuration. cwd is left pane dir. No dependencies, static linking, c99.
14 * Inspired by [vifm](https://vifm.info/) and [noice](https://git.2f30.org/noice/).
15 * Follows the suckless [philosophy](https://suckless.org/philosophy/) and [code style](https://suckless.org/coding_style/).
17 <img src="https://github.com/afify/afify.github.io/raw/master/img/sfm_sc.png" alt="drawing" width="800"/>
19 Options
20 -------
21 ```sh
22 $ sfm [-v]
23 $ man sfm
24 ```
26 **normal mode**
27 | key      | description         |
28 |:---------|:--------------------|
29 | `q`      | quit                |
30 | `h`      | back                |
31 | `j`      | down                |
32 | `k`      | up                  |
33 | `l`      | open                |
34 | `g`      | top                 |
35 | `G`      | bottom              |
36 | `M`      | middle              |
37 | `ctrl+u` | scroll up           |
38 | `ctrl+d` | scroll down         |
39 | `n`      | create new file     |
40 | `N`      | create new dir      |
41 | `D`      | delete file \| dir  |
42 | `/`      | start filter        |
43 | `ENTER`  | find  filter        |
44 | `ESC`    | exit  filter        |
45 | `SPACE`  | switch pane         |
47 **visual mode**
48 | key      | description         |
49 |:---------|:--------------------|
50 | `v`      | enter visual mode   |
51 | `j`      | select down         |
52 | `k`      | select up           |
53 | `ESC`    | exit visual mode    |
55 Installation
56 ------------
57 **current**
58 ```sh
59 git clone https://github.com/afify/sfm.git
60 cd sfm/
61 make
62 make install
63 ```
64 **latest release**
65 ```sh
66 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"}')
67 tar -xzf sfm-*.tar.gz && cd sfm-*/
68 make
69 make install
70 ```
71 Run
72 ---
73 ```sh
74 $ sfm
75 ```
77 Configuration
78 -------------
79 The configuration of sfm is done by creating a custom config.h
80 and (re)compiling the source code.