[core/theme] add xresources support

add support for reading foreground and background, and colors, from
xresources.py

many thanks to @Aliuakbar for the addition!

fixes #731
This commit is contained in:
tobi-wan-kenobi 2020-12-07 08:59:56 +01:00
parent 13b06793da
commit fa66873582
2 changed files with 21 additions and 2 deletions

View file

@ -0,0 +1,10 @@
import subprocess
import shutil
def query(key):
if shutil.which("xgetres"):
return subprocess.run(["xgetres", key],
capture_output=True).stdout.decode("utf-8").strip()
else:
raise Exception("xgetres must be installed for this theme")