From e520610f5bb3512a4243f2f14f016cdd02badbcd Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 16 Sep 2026 08:27:27 +0200 Subject: refactor(dunst): drop dunst as a consumer, quickshell presents now dunst no longer runs on this desktop. notifyd owns org.freedesktop.Notifications and the quickshell notifications shell draws the balloons, reading the palette from ~/.cache/wal/udt-palette.qml like every other quickshell component. So the whole dunst path was generating a config nothing read. It was also actively wrong. pywal rendered ~/.cache/wal/dunstrc from the installed template, then wal.sh restarted dunst on it while @ACCENT@ was still an unsubstituted placeholder, and udt-accent restarted it a second time after substituting. Two restarts per wallpaper change, the first on a broken config, for a daemon that could not claim the bus name anyway. Removes gen_dunst and its TARGETS entry, write_dunst and DUNSTRC, the install block, templates/dunstrc.in and the gitignore entry. The reload table now lists quickshell, which needs no signal: it watches the generated palette and re-reads it in place. The [state] roles stay. They were never dunst-only; waybar module states and conky warnings use the same four. Co-Authored-By: Claude Opus 5 --- bin/udt-accent | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) (limited to 'bin/udt-accent') 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) -- cgit v1.2.3