From 47c2469aeb0e8f3ed40b995a560ab95ca1eb1074 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 19 Oct 2026 09:53:00 +0200 Subject: feat(notify): publish each notification's sound and suppress-sound The sound-name lookup uses config.json's soundTheme, default freedesktop. The quickshell settings page mirrors that key to gsettings; the daemon only reads the file. Co-Authored-By: Claude Opus 5.5 --- internal/notify/config.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'internal/notify/config.go') diff --git a/internal/notify/config.go b/internal/notify/config.go index fcba5a8..98a6f51 100644 --- a/internal/notify/config.go +++ b/internal/notify/config.go @@ -29,16 +29,18 @@ type Timeouts struct { // Config is the daemon's share of ~/.config/notifyd/config.json. The file // also carries the balloon shell's keys (placement, DND, mute); they are not -// declared here and the decoder ignores them. +// declared here and the decoder ignores them. The daemon reads timeouts, caps +// and the sound theme for sound-name hints. type Config struct { Timeouts Timeouts `json:"timeouts"` LiveCap int `json:"liveCap"` HistoryCap int `json:"historyCap"` + SoundTheme string `json:"soundTheme"` } // DefaultConfig is the behaviour before the file existed. func DefaultConfig() Config { - return Config{Timeouts: Timeouts{Low: 10, Normal: 10, Critical: 0}, LiveCap: 20, HistoryCap: 20} + return Config{Timeouts: Timeouts{Low: 10, Normal: 10, Critical: 0}, LiveCap: 20, HistoryCap: 20, SoundTheme: "freedesktop"} } // ConfigPath is $XDG_CONFIG_HOME/notifyd/config.json, ~/.config when unset. @@ -74,6 +76,9 @@ func LoadConfig(path string) Config { } c.LiveCap = clamp(c.LiveCap, 1, 100) c.HistoryCap = clamp(c.HistoryCap, 1, 100) + if c.SoundTheme == "" { + c.SoundTheme = def.SoundTheme + } c.Timeouts.Low = seconds(c.Timeouts.Low, def.Timeouts.Low) c.Timeouts.Normal = seconds(c.Timeouts.Normal, def.Timeouts.Normal) c.Timeouts.Critical = seconds(c.Timeouts.Critical, def.Timeouts.Critical) -- cgit v1.2.3