fontpreview-ueberzug icon indicating copy to clipboard operation
fontpreview-ueberzug copied to clipboard

Add xresources color support

Open nyxkrage opened this issue 3 years ago • 1 comments

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

nyxkrage avatar Oct 02 '20 22:10 nyxkrage

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.

xlucn avatar Oct 03 '20 03:10 xlucn