
Filecon
Description
Filecon is a terminal-based file manager built on the Typr terminal UI toolkit. It packs everything a file manager should do into a keyboard-driven terminal program: every file, command, and directory is reachable in a few keystrokes, and the most common operations take the fewest key presses.
Filecon is designed to be intuitive, complete, powerful, and the fastest possible file manager. The whole interface is built around that principle:
- Hint navigation — every visible row carries a number hint (1–9, 0); pressing it acts on that row immediately, no cursor movement needed.
- Live search in popups — command and history popups open in
/search mode; type to distill the list, then pick one of the few remaining results with a number. - Frequency-ordered history — directory and command history are ranked by use count, so the most likely choice is always near the top.
Filecon's long-term goal is to become an interactive shell: a separate companion program will handle command building, and combined with Filecon the two will form a full interactive shell that competes with interactive CLI shells.
Filecon runs on Typr, whose self-contained terminal layer ships its own precompiled terminfo key table and MIME-type database in the gem — no ncurses or external tooling required — so Filecon works on any raw, ANSI-capable terminal (including Termux).
Features
- Directory browsing with MIME-type detection — files are typed from a packaged MIME database and colored accordingly, with optional
file --mime-typemagic detection for unknowns - Fastest possible navigation — hint numbers (1–9, 0) open rows directly; TAB pages hints beyond the first ten
- Default
[/]:searchin popups — command and history popups open in search mode: start typing to distill the list down to the matches, then press a number hint to pick from the few remaining results. The listing itself searches the same way - Mouse support — click a row to open it with its default action; the mouse wheel scrolls the listing (pointer-only mode is planned)
- Command execution modes — commands run in one of four ways, chosen by prefix:
|status line,=text viewer,+new terminal window,!Ruby eval; per-MIME-type command sets with%name,%dir,%file,%strsubstitution - Customizable column views — view columns run shell commands with
%namesubstitution (content preview, char/word/line counts, type info, disk usage, man-page descriptions) - Directory and command history with a frequency counter — entries stored as
[count, entry]pairs, most-used first then most-recent;frequency_limitcontrols how many frequent entries lead the list - Shell history import — on first run,
~/.bash_historyand~/.zsh_historyare validated, alias-resolved, and merged into the command history; directory paths referenced by those commands are collected into the directory history - Power browsing — recursive directory listing,
execute($PATH browser), marking, filtering, sorting, and switchable column views - Fully documented configuration — a self-documenting
config.yamlcovers colors, commands, views, history, and terminal settings
Installation
gem install filecon
Usage
filecon [directory]
Keybindings
Navigation
- Arrow keys / Page Up/Down / Home / End — Navigate files
- Backspace — Go to parent directory
- Number keys — Open file with default command
- Tab — Cycle hint numbers for rows beyond the first 10
Actions
o— Open list of all commands for selected filec— Command historyx— List all executables from $PATH directoriesh— Helpv— Viewss— Sort viewf— Filter viewr— Reset viewR— Recursive file listing/— Search the listing by name
Marking
m— Mark fileM— Mark rangea— Mark alli— Invert mark
Directory
~— Go to home directory`— Open commands for current directoryd— Directory history
Other
- Enter — Select / confirm
- Esc — Quit
Mouse
Click a row to open it with its default action; the mouse wheel scrolls the listing. Mouse reporting is enabled automatically when Filecon starts.
Popups and search
Command and history popups open in / search mode. Type a few characters to distill the list down to the matching entries; when only a handful remain, press the number hint of the one you want. Large lists can be narrowed in a keystroke or two. The main listing searches the same way when you press /.
Configuration
Config is stored at ~/.config/filecon/config.yaml (YAML). On first run the bundled, fully documented config.yaml is copied there. It includes:
- Color settings (named colors, 8-bit palette, RGB triplets) — including the
colors.commandspair used by the command picker and status line - Command definitions per MIME type, with execution-mode prefixes
- View configurations (columns that run shell commands)
- History limits and terminal settings
State and history files live under ~/.local/share/filecon/.
Command execution modes:
|— pipe output to the status line+— run in a new terminal window=— display output in the text viewer!— evaluate as Ruby code
Substitution variables: %name (file path), %dir (directory picker), %file (file picker), %str (text input)
See filecon(1) for the full manual.
Roadmap
- Pointer-only mode — full mouse-driven operation of the entire interface, building on the click/wheel mouse support already present
- Interactive shell — a separate command-building program that combines with Filecon into an interactive shell competing with interactive CLI shells
Development
git clone https://codeberg.org/typr/filecon
cd filecon
rake test
License
GPL-2.0-only