diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-19 09:53:00 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-19 09:53:00 +0200 |
| commit | 47c2469aeb0e8f3ed40b995a560ab95ca1eb1074 (patch) | |
| tree | 320f6e1d1b888014f265c2a5413a89f84965b4bc /internal/notify/config_test.go | |
| parent | 7a4d76c5db3e7668796486a0a4d9db583f89b8e5 (diff) | |
| download | notifyd-47c2469aeb0e8f3ed40b995a560ab95ca1eb1074.tar.gz notifyd-47c2469aeb0e8f3ed40b995a560ab95ca1eb1074.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'internal/notify/config_test.go')
| -rw-r--r-- | internal/notify/config_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/notify/config_test.go b/internal/notify/config_test.go index 818e88f..52781ac 100644 --- a/internal/notify/config_test.go +++ b/internal/notify/config_test.go @@ -63,3 +63,15 @@ func TestLoadConfigClamps(t *testing.T) { t.Errorf("got %+v", got) } } + +func TestLoadConfigSoundTheme(t *testing.T) { + if got := LoadConfig(writeConfig(t, `{"soundTheme": "mine"}`)).SoundTheme; got != "mine" { + t.Errorf("soundTheme = %q, want mine", got) + } + if got := LoadConfig(writeConfig(t, `{"soundTheme": ""}`)).SoundTheme; got != "freedesktop" { + t.Errorf("empty soundTheme = %q, want freedesktop", got) + } + if got := LoadConfig(writeConfig(t, `{"soundTheme": 4, "liveCap": 3}`)); got.SoundTheme != "freedesktop" || got.LiveCap != 3 { + t.Errorf("got %+v", got) + } +} |
