2 KiB
Customize the TUI
Goal: rebind the interactive TUI's keys and recolor its interface to your taste.
The TUI reads two optional config files from ~/.config/zfin/:
keys.srf for keybindings and
theme.srf for colors. When a file
is absent, built-in defaults apply; when present, it is the sole
source for that setting.
Rebind keys
Generate a fully-commented starting file from the current defaults, then edit it:
mkdir -p ~/.config/zfin
zfin interactive --default-keys > ~/.config/zfin/keys.srf
$EDITOR ~/.config/zfin/keys.srf
Each line binds one action to one key:
action::quit,key::q
action::next_tab,key::l
action::next_tab,key::right
- Add modifiers with
ctrl+,alt+,shift+(e.g.ctrl+d). - Bind several keys to an action by repeating the line.
- Scope a binding to one tab with
scope::<tab>(e.g.scope::options); theaction::then names that tab's local action. A tab-local binding may not reuse a globally-bound key -- zfin refuses to start if you create that conflict.
Full key vocabulary and the default bindings:
keys.srf reference.
Recolor the interface
Same pattern for the theme:
zfin interactive --default-theme > ~/.config/zfin/theme.srf
$EDITOR ~/.config/zfin/theme.srf
Every value is a hex RGB string:
#!srfv1
bg::#0a0a0a
text::#eeeeee
accent::#9d7cd8
positive::#7fd88f
negative::#e06c75
The keys cover backgrounds, tabs, text, status line, the modal input,
gains/losses, warnings, selection, and borders -- see the
theme.srf reference for the full
list.
See also
- The interactive TUI -- tabs, actions, and the
?help overlay. keys.srf/theme.srfreferences.
Previous: A periodic review | Next: Offline use and refreshing data | Documentation home