- test how a new font would look like in a terminal quickly
- identify what fonts I even have
Dependencies:
- fc-match, fzf (sorry), urxvt
- urxvt-font-change
Code: Select all
fc-match -av | grep -E "family\:|file\:" | sed 's/family: //' | sed 's/file: //' | tr -d '[:blank:]' | cut -d '"' -f2 | sed 'N;s/\n/\t/' | sort | uniq | fzf --bind "space:execute:(echo {} | cut -f2 | xargs ftview 12)" --bind "enter:execute:(echo {} | cut -f1 | xargs -L1 -I '$' urxvt-font-change 'xft:$:pixelsize=12')"
How to use:
execute, press return to preview font, press space to apply to current terminal instance
The problem right now is that not all fonts look good at `pixelsize=12` and I'm not sure how to 'elegantly' tweak that on the fly.