168 lines
4.2 KiB
Plaintext
168 lines
4.2 KiB
Plaintext
sfm - Simple File Manager
|
|
==========================
|
|
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
sfm is a lightweight, terminal-based file manager written entirely in
|
|
POSIX sh. It runs in your terminal with no external dependencies beyond
|
|
standard Unix tools (ls, awk, tput, stty, mv, cp, rm). Designed to be
|
|
fast, flicker-free, and keyboard-driven with a vim-inspired key layout.
|
|
|
|
|
|
REQUIREMENTS
|
|
------------
|
|
- A POSIX-compatible shell (sh, dash, bash, etc.)
|
|
- Standard Unix tools: ls, awk, tput, stty, cp, mv, rm, mkdir, touch
|
|
- Optional: wl-copy / xclip / xsel / pbcopy (for clipboard support)
|
|
- Optional: mpv, vlc, feh, zathura, etc. (for smart file opening)
|
|
- Optional: readlink (for symlink display)
|
|
|
|
|
|
INSTALLATION
|
|
------------
|
|
Using make (recommended):
|
|
|
|
make install
|
|
|
|
This installs sfm to /usr/local/bin by default. To change the prefix:
|
|
|
|
make install PREFIX=/usr
|
|
|
|
To uninstall:
|
|
|
|
make uninstall
|
|
|
|
Manual installation:
|
|
|
|
cp sfm /usr/local/bin/sfm
|
|
chmod +x /usr/local/bin/sfm
|
|
|
|
|
|
USAGE
|
|
-----
|
|
sfm
|
|
|
|
sfm will opens in the current directory.
|
|
|
|
|
|
NAVIGATION
|
|
----------
|
|
j / k or up/down arrows Move up / down
|
|
h or left arrow Go to parent directory
|
|
l or right arrow / enter Open file or enter directory
|
|
g Jump to top of list
|
|
G Jump to bottom of list
|
|
~ Go to home directory
|
|
` (backtick) Jump to previous directory
|
|
|
|
|
|
SEARCH & FILTER
|
|
---------------
|
|
/ Enter search mode (filters listing as you type)
|
|
esc Clear filter and exit search mode
|
|
enter Exit search mode but keep filter active
|
|
|
|
|
|
DISPLAY TOGGLES
|
|
---------------
|
|
. Toggle hidden files (dotfiles)
|
|
T Toggle size/date detail column
|
|
s Cycle sort mode: name -> size -> date
|
|
i Show file info (permissions, size, date) in status bar
|
|
R Refresh current directory listing
|
|
|
|
|
|
FILE OPERATIONS
|
|
---------------
|
|
r Rename selected entry
|
|
m Make new directory
|
|
n New empty file
|
|
d Delete (single or selection)
|
|
u Move to trash (safe delete)
|
|
U Open trash directory
|
|
o Open with custom program
|
|
|
|
|
|
CLIPBOARD
|
|
---------
|
|
y Yank / copy (works on multi-selection)
|
|
x Cut (works on multi-selection)
|
|
p Paste into current directory
|
|
c Copy full path of selected entry to system clipboard
|
|
|
|
|
|
MULTI-SELECT
|
|
------------
|
|
space Toggle multi-select on current entry (cursor advances)
|
|
a Select all / deselect all
|
|
|
|
|
|
BOOKMARKS
|
|
---------
|
|
b Bookmark current directory (press again to remove)
|
|
B Open bookmark picker (j/k navigate, enter jump)
|
|
|
|
Bookmarks are saved to: ~/.config/sfm/bookmarks
|
|
|
|
|
|
SHELL & UTILITIES
|
|
-----------------
|
|
! Drop into $SHELL in current directory (type "exit" to return)
|
|
|
|
|
|
HELP
|
|
----
|
|
? Show keyboard shortcuts overlay
|
|
|
|
|
|
QUIT
|
|
----
|
|
q Quit sfm
|
|
|
|
|
|
STATUS BAR INDICATORS
|
|
---------------------
|
|
[hidden] Hidden files are visible
|
|
[sort:size] Active sort mode (size or date; name is default)
|
|
[copy] A file is in the clipboard (copy mode)
|
|
[cut] A file is in the clipboard (cut mode)
|
|
[sel:N] N items are currently selected
|
|
[details] Size/date column is visible
|
|
|
|
|
|
SMART FILE OPENER
|
|
-----------------
|
|
When you open a file, sfm detects the file type by extension and
|
|
MIME type, then picks an appropriate program automatically:
|
|
|
|
Text / code $EDITOR (or vi)
|
|
Images imv, feh, sxiv, eog, gimp
|
|
Video mpv, vlc, mplayer, totem
|
|
Audio mpv, vlc, cmus, mocp
|
|
PDF zathura, evince, okular, mupdf
|
|
Office docs libreoffice
|
|
Archives atool / bsdtar (lists contents in pager)
|
|
|
|
Falls back to xdg-open, open (macOS), or $EDITOR if nothing matches.
|
|
Use 'o' to manually specify any program.
|
|
|
|
|
|
TRASH
|
|
-----
|
|
Files deleted with 'u' are moved to:
|
|
|
|
~/.local/share/sfm-trash/
|
|
|
|
Files are prefixed with a timestamp: YYYYMMDD_HHMMSS_filename
|
|
Use U to browse the trash directory. To restore a file, rename it
|
|
(press r) to remove the timestamp prefix, then cut (x) and paste (p)
|
|
it back to the desired location.
|
|
|
|
|
|
DATA FILES
|
|
----------
|
|
~/.config/sfm/bookmarks Saved bookmarks (one path per line)
|
|
~/.local/share/sfm-trash/ Trashed files
|
|
|