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)
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.
19 * open files by extension.
21 * vim-like key bindings.
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/).
32 $ perf stat -r 100 $filemanager
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"/>
54 |:---------|:--------------------|
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 |
72 | `v` | start visual mode |
73 | `/` | start filter |
74 | `ENTER` | find filter |
75 | `ESC` | exit filter |
76 | `SPACE` | switch pane |
80 |:---------|:--------------------|
83 | `d` | delete selection |
84 | `y` | yank selection |
85 | `v` | exit visual mode |
86 | `q` | exit visual mode |
87 | `ESC` | exit visual mode |
93 git clone https://github.com/afify/sfm.git
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-*/
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.