reload: Fix rofi colors not changing.

This commit is contained in:
Dylan Araps 2018-01-01 07:53:13 +11:00
parent 9029a16d29
commit e59c7f866e
2 changed files with 5 additions and 11 deletions

View File

@ -10,12 +10,14 @@ from .settings import CACHE_DIR, HOME, MODULE_DIR, OS
from . import util
def xrdb(xrdb_file=None):
def xrdb(xrdb_files=None):
"""Merge the colors into the X db so new terminals use them."""
xrdb_file = xrdb_file or os.path.join(CACHE_DIR, "colors.Xresources")
xrdb_files = xrdb_files or \
[os.path.join(CACHE_DIR, "colors.Xresources"),
os.path.join(CACHE_DIR, "colors-rofi.Xresources")]
if shutil.which("xrdb") and OS != "Darwin":
subprocess.Popen(["xrdb", "-merge", xrdb_file],
subprocess.Popen(["xrdb", "-merge", *xrdb_files],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL).wait()

View File

@ -60,13 +60,5 @@ XClock*hourColor: rgba:{color15.xrgba}
XClock*minuteColor: rgba:{color15.xrgba}
XClock*secondColor: rgba:{color15.xrgba}
! Rofi (fallback)
rofi.color-normal: {background}, {foreground}, {background}, {color10}, {background}
rofi.color-active: {background}, {foreground}, {background}, {color10}, {background}
rofi.color-urgent: {background}, {color10}, {background}, {color10}, {foreground}
rofi.color-window: {background}, {background}, {background}
! Set depth to make transparency work.
URxvt*depth: 32
#include "colors-rofi.Xresources"