diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-16 08:27:27 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-16 08:27:27 +0200 |
| commit | e520610f5bb3512a4243f2f14f016cdd02badbcd (patch) | |
| tree | f35eeb1279d6bcf5a928c1215bdee985e7a3640f /bin | |
| parent | a183b4a054d96f310d867b79d7b9fb7a6b875bb8 (diff) | |
| download | unified-desktop-theme-e520610f5bb3512a4243f2f14f016cdd02badbcd.tar.gz unified-desktop-theme-e520610f5bb3512a4243f2f14f016cdd02badbcd.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/udt-accent | 36 | ||||
| -rwxr-xr-x | bin/udt-palette | 20 |
2 files changed, 8 insertions, 48 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) diff --git a/bin/udt-palette b/bin/udt-palette index 3fcb355..09731de 100755 --- a/bin/udt-palette +++ b/bin/udt-palette @@ -416,19 +416,6 @@ def gen_homepage(res, scheme, palette): """ -def gen_dunst(res, scheme, palette, template): - """dunst: substitute colours into the shipped template. - - Kept as a template rather than fully generated: dunstrc is mostly geometry - and behaviour that has nothing to do with colour. @ACCENT@ is left alone, - because udt-accent substitutes it per wallpaper after pywal renders it. - """ - out = template.replace("@SCHEME@", scheme) - for role in ("bg", "bg_alt", "fg", "fg_dim", "border", "critical"): - out = out.replace(f"@{role.upper()}@", hex6(res[role])) - return out - - def gen_sublime(res, scheme, palette, template): """Sublime Text: substitute the palette into the colour scheme. @@ -437,9 +424,9 @@ def gen_sublime(res, scheme, palette, template): costs no new roles and every shipped scheme satisfies it without touching nine role maps. - @ACCENT@ is left alone for udt-accent, exactly as in the dunst template: - Sublime colour schemes do not cascade, so the accent cannot arrive as a - second file and has to be substituted into this one. + @ACCENT@ is left alone for udt-accent: Sublime colour schemes do not + cascade, so the accent cannot arrive as a second file and has to be + substituted into this one. """ out = template.replace("@SCHEME@", scheme) for role in ("bg", "bg_alt", "bg_deep", "surface", "surface_alt", @@ -580,7 +567,6 @@ TARGETS = [ ("rofi/udt/palette.rasi", gen_rofi, None), ("templates/waybar/theme.css", gen_waybar, None), ("templates/terminal/kitty-theme.conf", gen_kitty, None), - ("templates/dunstrc", gen_dunst, "templates/dunstrc.in"), ("templates/conky.conf", gen_conky, "templates/conky.conf.in"), ("bin/udt_colors.py", gen_accent_py, None), ("templates/homepage/custom.css", gen_homepage, None), |
