Skip to content

sanderboer/sfm

Repository files navigation

sfm logo

simple file manager

Language grade: C/C++ Build status code-inspector code-inspector

Description

sfm is a simple file manager for unix-like systems.

  • Use pthread to read events, no timers.
  • BSD kqueue(2) - kernel event notification mechanism.
  • Linux inotify(7) - monitoring filesystem events.
  • dual pane.
  • bookmarks.
  • open files by extension.
  • bottom statusbar.
  • vim-like key bindings.
  • filter.
  • no dependencies.
  • c99 static linking.
  • based on termbox.
  • Inspired by vifm and noice.
  • Follows the suckless philosophy.

Performance

$ perf stat -r 100 $filemanager
filemanager cycles instructions
sfm 1,137,335 1,789,463
noice 5,380,103 9,214,250
nnn 5,664,917 9,790,040
lf 18,874,802 33,281,073
vifm 38,792,656 93,301,255
ranger 536,225,530 956,977,175

sfm screenshot

Options

$ sfm [-v]
$ man sfm

normal mode

key description
q quit
h back
j down
k up
l open
g top
G bottom
M middle
ctrl+u scroll up
ctrl+d scroll down
n create new file
N create new dir
d delete file | dir
D duplicate file | dir
y yank
p paste
P move
c rename
. toggle dotfiles
v start visual mode
/ start filter
ENTER find filter
ESC exit filter
SPACE switch pane

visual mode

key description
j select down
k select up
d delete selection
y yank selection
v exit visual mode
q exit visual mode
ESC exit visual mode

Installation

current

git clone git://git.afify.dev/sfm
cd sfm/
make
make install

latest release

[ "$(uname)" = "Linux" ] && shacmd="sha256sum" grepf="--color=never"|| shacmd="sha256"
latest=$(curl -s https://git.afify.dev/sfm/tags.xml | grep $grepf -m 1 -o "\[v.*\]" | tr -d '[]')
tgz="https://git.afify.dev/sfm/releases/sfm-${latest}.tar.gz"
sha="${tgz}.sha256"
wget "${tgz}"
wget "${sha}"
${shacmd} -c "sfm-${latest}.tar.gz.sha256" && \
tar -xzf "sfm-${latest}.tar.gz" && cd "sfm-${latest}" && \
make
make install

Run

$ sfm

Configuration

The configuration of sfm is done by creating a custom config.h and (re)compiling the source code. This keeps it fast, secure and simple.

About

simple file manager

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 96.7%
  • Roff 1.8%
  • Makefile 1.5%