eHab-codeX/fm

A keyboard-driven terminal file manager built on fzf, eza, and Kitty — icons, thumbnails, gallery grid, trash browser.

Shell

2

3 commits

updated Oct 4, 2026

See the code

See what people are saying

SourceMessageScoreDate

fm: a single-file bash script that turns fzf into a file manager (r/commandline)

I wrote a \~1500-line bash file manager. fzf for the picker, eza for listing, Kitty's graphics protocol for inline previews. Everything else is stock coreutils — no build step, no daemon, no config directory. Features worth calling out: \- File list — eza icons, sort by name / size / mtime /…

12

Oct 5, 2026

README

fm

A keyboard-driven terminal file manager built on fzf, eza, and Kitty's image protocol.

License: MIT Bash 5+ Platform: Linux PRs welcome

fm demo

Features

  • 🗂️ Fuzzy navigation — fzf-driven file list with instant filtering
  • 🖼️ Inline previews — images, videos, PDFs, and Markdown, rendered by Kitty
  • 🖼️ Gallery grid — full-screen thumbnail browser with vim-style keys
  • 🗑️ Trash with undo — Ctrl-Z walks back through your last 10 trash operations
  • 🔍 Content search — Ctrl-F runs ripgrep on selected files
  • 📝 Bulk rename — edit a list of names in $EDITOR, then commit
  • 🌳 Smart sorting — by name, size, mtime, or extension
  • 🧭 Jump anywhere — zoxide frecency, bookmarks, git mode
  • ⚡ Cached thumbnails — invalidation via mtime+size, parallel workers
  • 🎨 Nerd Font icons — via eza, with syntax highlighting via bat

Install

Manual

git clone https://github.com/eHab-codeX/fm.git ~/.local/share/fm
ln -sf ~/.local/share/fm/fm ~/.local/bin/fm

Keybindings

Press F1 inside fm for the same list. All bindings work in a standard terminal; some mouse actions require Kitty.

File list

KeyAction
EnterOpen file / enter directory (on ..: go up)
TabMulti-select
EscQuit
F1 / Alt+HHelp

Actions

KeyAction
Ctrl+D / Alt+DMove selection to trash
Ctrl+ZUndo last trash batch (pops the undo stack)
Alt+TOpen trash browser
Ctrl+YCopy absolute path(s) to clipboard
Ctrl+OForce open externally (xdg-open)
Ctrl+NNew file (end with / for a directory)
Ctrl+ERename selected item
Alt+M / Ctrl+WBulk rename via $EDITOR
Ctrl+KMove selection to a destination
Ctrl+PCopy selection to a destination
Ctrl+LCreate symlink(s) to selection
Alt+IShow file info (stat, file, exiftool)

Search & jump

KeyAction
Ctrl+FSearch inside selected file(s) with ripgrep
Alt+ZZoxide jump (frecency-ranked directories)
Ctrl+BBookmarks (Enter: jump/add, Ctrl+X: delete)
fm <query>Shell-side: jump to best zoxide match

View

KeyAction
Ctrl+SCycle sort: name → size → mtime → ext
Ctrl+RToggle recursive listing (depth 1 ↔ 5)
Ctrl+H / Alt+.Toggle hidden files
Ctrl+GGit mode (modified/untracked files)
Ctrl+TToggle contact-sheet preview
Alt+J / Alt+KNext / previous page of contact sheet
Alt+N / Alt+PSame as above
Alt+GOpen full-screen gallery grid

Preview pane

KeyAction
Ctrl+VScroll text preview one page down
Ctrl+UScroll text preview one page up
F3 / F2Same as above (backup keys)

Contact sheets are a single image — use Alt+J / Alt+K to page them, not the scroll keys.

Trash browser (Alt+T)

KeyAction
EnterRestore selected item(s)
Ctrl+DPermanently delete (asks to confirm)
Ctrl+YCopy original path(s) to clipboard
Ctrl+FSearch inside all trashed files
Ctrl+XEmpty the entire trash (asks to confirm)
KeyAction
← ↓ ↑ → / H J K LMove selection
PgUp / PgDnMove one screen
g / GFirst / last
Mouse wheelScroll rows
Left clickSelect item
Double clickOpen (folder: enter / file: full screen)
EnterFolder: enter · File: full-screen view
Backspace / -Parent directory
SpaceMark / unmark
a / AMark-all visible / Unmark-all
oOpen marked (or selected) externally
yCopy absolute path(s)
x / DeleteMove to trash (asks to confirm)
sCycle sort: name / mtime / size
+ / = · _Bigger / smaller thumbnails
rReload
fLeave gallery, focus file in file list
?Help
q / EscClose gallery

Mouse

ActionWhereEffect
Double-clickFile listOpen file / enter directory
Right-clickFile listGo to parent directory
WheelFile listScroll list (or preview, if hovering it)
Double-clickAny pickerSelect
Right-clickAny pickerCancel

Note: Backspace can't go up in the file list — fzf uses it for editing the query. Use the .. entry, or Backspace in the gallery grid.

Requirements

DepPurposeRequired
bash >= 5Uses EPOCHREALTIME, ${var,,}✅
fzfThe picker itself✅
ezaIcons + colored listing✅
ripgrepCtrl-F content search✅
trash-cliCtrl-D / undo stack✅
kitty + kittenInline previews, gallery gridrecommended
batSyntax highlightingrecommended
imagemagickContact sheets, MD → PNGrecommended
fdFaster file discoveryoptional
pdftoppm (poppler)PDF thumbnailsoptional
ffmpeg / ffmpegthumbnailerVideo thumbnailsoptional
glow or mdcatRendered Markdown previewsoptional
zoxideAlt-Z frecency jumpoptional

Arch one-liner:

sudo pacman -S fzf eza ripgrep trash-cli bat imagemagick fd poppler ffmpegthumbnailer glow zoxide

eHab-codeX/fm

A keyboard-driven terminal file manager built on fzf, eza, and Kitty — icons, thumbnails, gallery grid, trash browser.

Shell

2

3 commits

updated Oct 4, 2026

See the code

See what people are saying

SourceMessageScoreDate

fm: a single-file bash script that turns fzf into a file manager (r/commandline)

I wrote a \~1500-line bash file manager. fzf for the picker, eza for listing, Kitty's graphics protocol for inline previews. Everything else is stock coreutils — no build step, no daemon, no config directory. Features worth calling out: \- File list — eza icons, sort by name / size / mtime /…

12

Oct 5, 2026

README

fm

A keyboard-driven terminal file manager built on fzf, eza, and Kitty's image protocol.

License: MIT Bash 5+ Platform: Linux PRs welcome

fm demo

Features

  • 🗂️ Fuzzy navigation — fzf-driven file list with instant filtering
  • 🖼️ Inline previews — images, videos, PDFs, and Markdown, rendered by Kitty
  • 🖼️ Gallery grid — full-screen thumbnail browser with vim-style keys
  • 🗑️ Trash with undo — Ctrl-Z walks back through your last 10 trash operations
  • 🔍 Content search — Ctrl-F runs ripgrep on selected files
  • 📝 Bulk rename — edit a list of names in $EDITOR, then commit
  • 🌳 Smart sorting — by name, size, mtime, or extension
  • 🧭 Jump anywhere — zoxide frecency, bookmarks, git mode
  • ⚡ Cached thumbnails — invalidation via mtime+size, parallel workers
  • 🎨 Nerd Font icons — via eza, with syntax highlighting via bat

Install

Manual

git clone https://github.com/eHab-codeX/fm.git ~/.local/share/fm
ln -sf ~/.local/share/fm/fm ~/.local/bin/fm

Keybindings

Press F1 inside fm for the same list. All bindings work in a standard terminal; some mouse actions require Kitty.

File list

KeyAction
EnterOpen file / enter directory (on ..: go up)
TabMulti-select
EscQuit
F1 / Alt+HHelp

Actions

KeyAction
Ctrl+D / Alt+DMove selection to trash
Ctrl+ZUndo last trash batch (pops the undo stack)
Alt+TOpen trash browser
Ctrl+YCopy absolute path(s) to clipboard
Ctrl+OForce open externally (xdg-open)
Ctrl+NNew file (end with / for a directory)
Ctrl+ERename selected item
Alt+M / Ctrl+WBulk rename via $EDITOR
Ctrl+KMove selection to a destination
Ctrl+PCopy selection to a destination
Ctrl+LCreate symlink(s) to selection
Alt+IShow file info (stat, file, exiftool)

Search & jump

KeyAction
Ctrl+FSearch inside selected file(s) with ripgrep
Alt+ZZoxide jump (frecency-ranked directories)
Ctrl+BBookmarks (Enter: jump/add, Ctrl+X: delete)
fm <query>Shell-side: jump to best zoxide match

View

KeyAction
Ctrl+SCycle sort: name → size → mtime → ext
Ctrl+RToggle recursive listing (depth 1 ↔ 5)
Ctrl+H / Alt+.Toggle hidden files
Ctrl+GGit mode (modified/untracked files)
Ctrl+TToggle contact-sheet preview
Alt+J / Alt+KNext / previous page of contact sheet
Alt+N / Alt+PSame as above
Alt+GOpen full-screen gallery grid

Preview pane

KeyAction
Ctrl+VScroll text preview one page down
Ctrl+UScroll text preview one page up
F3 / F2Same as above (backup keys)

Contact sheets are a single image — use Alt+J / Alt+K to page them, not the scroll keys.

Trash browser (Alt+T)

KeyAction
EnterRestore selected item(s)
Ctrl+DPermanently delete (asks to confirm)
Ctrl+YCopy original path(s) to clipboard
Ctrl+FSearch inside all trashed files
Ctrl+XEmpty the entire trash (asks to confirm)
KeyAction
← ↓ ↑ → / H J K LMove selection
PgUp / PgDnMove one screen
g / GFirst / last
Mouse wheelScroll rows
Left clickSelect item
Double clickOpen (folder: enter / file: full screen)
EnterFolder: enter · File: full-screen view
Backspace / -Parent directory
SpaceMark / unmark
a / AMark-all visible / Unmark-all
oOpen marked (or selected) externally
yCopy absolute path(s)
x / DeleteMove to trash (asks to confirm)
sCycle sort: name / mtime / size
+ / = · _Bigger / smaller thumbnails
rReload
fLeave gallery, focus file in file list
?Help
q / EscClose gallery

Mouse

ActionWhereEffect
Double-clickFile listOpen file / enter directory
Right-clickFile listGo to parent directory
WheelFile listScroll list (or preview, if hovering it)
Double-clickAny pickerSelect
Right-clickAny pickerCancel

Note: Backspace can't go up in the file list — fzf uses it for editing the query. Use the .. entry, or Backspace in the gallery grid.

Requirements

DepPurposeRequired
bash >= 5Uses EPOCHREALTIME, ${var,,}✅
fzfThe picker itself✅
ezaIcons + colored listing✅
ripgrepCtrl-F content search✅
trash-cliCtrl-D / undo stack✅
kitty + kittenInline previews, gallery gridrecommended
batSyntax highlightingrecommended
imagemagickContact sheets, MD → PNGrecommended
fdFaster file discoveryoptional
pdftoppm (poppler)PDF thumbnailsoptional
ffmpeg / ffmpegthumbnailerVideo thumbnailsoptional
glow or mdcatRendered Markdown previewsoptional
zoxideAlt-Z frecency jumpoptional

Arch one-liner:

sudo pacman -S fzf eza ripgrep trash-cli bat imagemagick fd poppler ffmpegthumbnailer glow zoxide