fontpreview-ueberzug
fontpreview-ueberzug copied to clipboard
Add xresources color support
This will use the current terminals foreground and background colors as set in the currently used xresources.
New order of colors is then: ARG -> ENV -> XRES -> Fallback(black and white)
This does not add any additional dependencies. NOTE: This uses currently active window for getting the colors! As such this could fail. Example if used with sleep
sleep 5; fontpreview-ueberzug
Well, for me I use *.{fore,back}ground
in my Xresources file, in which case the method in the PR does not work. And there are some terminal emulators that does not use Xresources but their own config files. So I am afraid the PR could only cover a small part of all cases.
The users might not mind to add one or two lines of env var definitions in their shell rc file if they want to achieve a more blend-in look.