TUIs and mouseless computing
The goal of the presentation
To learn at least one thing which will help you to improve your workflow.
Notes to myself:
- use
screenkey
--scr 0 -s small
and - record the presentation.
Basic setup, keyboard, layout
The goal is to maximally exploit the screen space (on 13" laptop), avoid using mouse and repetitions.
- I use Xubuntu, xfce4,
- gnome-terminal
- Bash (ubiquitous)
- layout
- QWERTY
- xmodmap (not anymore with Kinesis SmartSet), setup with
.Xmodmap
- CapsLock → Mod4 (some people remap it to Ctrl),
- AwesomeWM tiling window manager
- configuration in Lua
.config/awesome/rc.lua
- Mod4+Enter (terminal)
- Mod4+hjkl (navigation)
- Mod4+Ctr+j (jump to screen)
- Mod4+j (next window)
- Mod4+n/m/…
- alternative: dwm, i3, xmonad,
- Compose key,
- aliases:
- j (opens journal (creates if necessary) for last 4 days; git commit upon quitting)
- ee (let me fuzzy search file in my personal wiki, edit it and commit)
- fvim (let me fuzzy search in subdirs and then edit)
- xdell (setups monitors at home), xfi (at work)
- setup in
.bashrc
?? <query>
(opens a search result from Google/DuckDuckGo in qutebrowser/firefox) and
- dotfiles.
See also what I use.
Vim
- vi (1976), Vim (1991), Neovim (2014)
- modal editing
- by default in normal mode
- modes “simulate” keyboard layers
- normal: navigation
- insert: editing (i, I, a, o, O, A)
- visual mode: highlighting
- visual block
- ex mode (
q:
): commands (:vi
for visual)
- movement on home row; do not use arrow keys
- hjkl (some people disable arrows)
- HLM
- ^E, ^Y
- (N)gg, G
- ^o
- text objects and motions
- words, WORDS, sentences, paragraphs, tags
- in-line motions: w, W, e, E, f, F, t, ^, $
- commands: d, c, y, v; dd, yy
{command}[{number}]{motion}{object}
; caw, yi), d1000j- paste: p,
xp
,ddp
- repetition with
.
- J, / (n, N), :s, :g
- macros
- sequence recorded in register
q{register}
, do,q
- run with
{number}@{register}
qagUw<Esc>/^:<Enter>nk<Esc>q
%sort
,:!csv2md
,:r!date
:term
,^w N
gqq
,gx
,gf
,ga
, C+a, C+x- undo (u),
:earlier 2m
- integrated
:help
- customization in
~/.vimrc
ff
for fuzzy search in the current directory
- buffers, windows, tabs, sessions
set -o vi
in Bash (.bashrc
) for vi bindings in the command line
Terminal multiplexer
- nohup, disown
- GNU screen (1987)
- tmux (2007)
tmux
- session: detach (prefix + d), attach (tmux a)
- window: prefix + c,n,p,l,
- copy mode: prefix + [, Space, Enter, ?, /, prefix + [
- panes: prefix + %, “; move with prefix + arrows
- vim bindings!
- terminal > ssh > tmux > window > pane > vim > window > terminal > …
File manager, navigation, …
- fzf (ee, fvim, CtrlR)
- ranger (Vim-inspired file manager), mc (clumsy), Nautilus (GUI)
- alternatives: lf, nnn
locate
command- z – jump to dirs based on frecency
Mouseless browsing and tools
- Vim Vixen, vimium (Firefox)
- qutebrowser (based on Chromium)
- TUI browsing: w3m, links
- neomutt (mutt), vim bindings
- newsboat (RSS)
- pass (password manager)
Data processing, Unix philosophy
- grep, sed, tr, sort, uniq, awk (1984)
- parallel, xargs, pv (hn; see htop)
- jq (json), jc
- visidata (csv, tsv, json, sqlite, …)
Virtual server
- backup with rsync
- cron (crontab -e)
- websites with Hugo
Time management
- LeechBlock in Firefox
- arbtt – automatic time tracking
- flameshot
References
Related content
published: 2023-12-10
last modified: 2024-01-14
https://vit.baisa.cz/notes/work/inject/tui-mouseless/
last modified: 2024-01-14
https://vit.baisa.cz/notes/work/inject/tui-mouseless/