sfm

simple file manager
git clone git://git.afify.dev/sfm
Log | Files | Refs | README | LICENSE

README.md (3810B)


      1 <img src="https://afify.dev/img/sfm.png" alt="sfm logo"/>
      2 
      3 **simple file manager**
      4 
      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)
      9 
     10 Description
     11 ------------
     12 sfm is a simple file manager for unix-like systems.
     13 
     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/).
     28 
     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` |
     42 
     43 <img src="https://afify.dev/img/sfm_sc.png" alt="sfm screenshot" width="800"/>
     44 
     45 Options
     46 -------
     47 ```sh
     48 $ sfm [-v]
     49 $ man sfm
     50 ```
     51 
     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 | `.`      | toggle dotfiles     |
     73 | `v`      | start visual mode   |
     74 | `/`      | start filter        |
     75 | `ENTER`  | find  filter        |
     76 | `ESC`    | exit  filter        |
     77 | `SPACE`  | switch pane         |
     78 
     79 **visual mode**
     80 | key      | description         |
     81 |:---------|:--------------------|
     82 | `j`      | select down         |
     83 | `k`      | select up           |
     84 | `d`      | delete selection    |
     85 | `y`      | yank selection      |
     86 | `v`      | exit visual mode    |
     87 | `q`      | exit visual mode    |
     88 | `ESC`    | exit visual mode    |
     89 
     90 Installation
     91 ------------
     92 **current**
     93 ```sh
     94 git clone git://git.afify.dev/sfm
     95 cd sfm/
     96 make
     97 make install
     98 ```
     99 **latest release**
    100 ```sh
    101 [ "$(uname)" = "Linux" ] && shacmd="sha256sum" grepf="--color=never"|| shacmd="sha256"
    102 latest=$(curl -s https://git.afify.dev/sfm/tags.xml | grep $grepf -m 1 -o "\[v.*\]" | tr -d '[]')
    103 tgz="https://git.afify.dev/sfm/releases/sfm-${latest}.tar.gz"
    104 sha="${tgz}.sha256"
    105 wget "${tgz}"
    106 wget "${sha}"
    107 ${shacmd} -c "sfm-${latest}.tar.gz.sha256" || exit
    108 tar -xzf "sfm-${latest}.tar.gz" && cd "sfm-${latest}" || exit
    109 make
    110 make install
    111 ```
    112 Run
    113 ---
    114 ```sh
    115 $ sfm
    116 ```
    117 
    118 Configuration
    119 -------------
    120 The configuration of sfm is done by creating a custom config.h
    121 and (re)compiling the source code. This keeps it fast, secure and simple.