[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:
parent
13b06793da
commit
fa66873582
2 changed files with 21 additions and 2 deletions
10
bumblebee_status/util/xresources.py
Normal file
10
bumblebee_status/util/xresources.py
Normal 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")
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue