aboutsummaryrefslogtreecommitdiffstats
path: root/bin/udt-accent
diff options
context:
space:
mode:
Diffstat (limited to 'bin/udt-accent')
-rwxr-xr-xbin/udt-accent36
1 files changed, 5 insertions, 31 deletions
diff --git a/bin/udt-accent b/bin/udt-accent
index 1a542a6..3cb9438 100755
--- a/bin/udt-accent
+++ b/bin/udt-accent
@@ -31,7 +31,6 @@ MIN_CHROMA = 10.0
OUTPUT = Path.home() / ".cache" / "wal" / "udt-accent.rasi"
BORDER_OUTPUT = Path.home() / ".cache" / "wal" / "udt-border.lua"
-DUNSTRC = Path.home() / ".cache" / "wal" / "dunstrc"
SUBLIME = (Path.home() / ".config" / "sublime-text" / "Packages" / "User"
/ "udt.sublime-color-scheme")
QML_OUTPUT = Path.home() / ".cache" / "wal" / "udt-palette.qml"
@@ -258,41 +257,17 @@ def write_colors_json(name, image):
subprocess.run(["pywalfox", "update"], capture_output=True, check=False)
-def write_dunst(name):
- """Substitute the accent into the dunst config pywal just rendered.
-
- pywal owns that file, so this runs after it and rewrites in place. A
- missing file is not an error: dunst simply may not be configured here.
- """
- try:
- text = DUNSTRC.read_text()
- except FileNotFoundError:
- return
-
- if "@ACCENT@" not in text:
- return
-
- write_atomic(DUNSTRC, text.replace("@ACCENT@", ACCENTS[name]))
-
- # Restart dunst so it rereads the file. It must be started again, not just
- # killed: nothing else respawns it, and a dead dunst means no notifications
- # at all.
- if subprocess.run(["pkill", "-x", "dunst"], capture_output=True).returncode == 0:
- subprocess.Popen(["dunst"], start_new_session=True,
- stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
-
-
def write_sublime(name):
"""Substitute the accent into the Sublime colour scheme install.sh copied.
- In place, like dunst: Sublime colour schemes do not cascade, so the accent
- cannot arrive as a second file. Sublime watches Packages/User and reloads a
+ In place: Sublime colour schemes do not cascade, so the accent cannot
+ arrive as a second file. Sublime watches Packages/User and reloads a
scheme when its file changes, so no signal is needed. A missing file is not
an error, Sublime simply may not be installed here.
- Unlike dunst, this reads the installed copy and has nowhere to recover
- @ACCENT@ from once substituted, so the previous accent is replaced by
- matching the variable line rather than a placeholder.
+ This reads the installed copy and has nowhere to recover @ACCENT@ from
+ once substituted, so the previous accent is replaced by matching the
+ variable line rather than a placeholder.
"""
try:
text = SUBLIME.read_text()
@@ -316,7 +291,6 @@ def main(image):
write_accent(name)
write_border(name)
write_qml(name)
- write_dunst(name)
write_sublime(name)
write_colors_json(name, image)