aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop/modules/status/StatusPage.qml2
-rw-r--r--notifications/Balloons.qml15
-rw-r--r--notifications/README.md3
3 files changed, 18 insertions, 2 deletions
diff --git a/desktop/modules/status/StatusPage.qml b/desktop/modules/status/StatusPage.qml
index e0de86b..8a21ad5 100644
--- a/desktop/modules/status/StatusPage.qml
+++ b/desktop/modules/status/StatusPage.qml
@@ -51,7 +51,7 @@ Column {
width: page.width
mode: "quiet"
label: "Quiet"
- description: "Mutes Claude and opencode sounds. Popups still appear."
+ description: "Mutes every sound: notifications, Claude and opencode. Popups still appear."
value: Status.quiet
}
diff --git a/notifications/Balloons.qml b/notifications/Balloons.qml
index abeb13a..8574f9d 100644
--- a/notifications/Balloons.qml
+++ b/notifications/Balloons.qml
@@ -46,6 +46,19 @@ Scope {
// silent. seen is rebuilt from the queue each time, so it never grows.
property var seen: ({})
property bool primed: false
+ // Quiet mutes every sound and leaves the balloons, as it does for the
+ // Claude and opencode hooks. Read from the status registry's file, like
+ // Notify's dnd, so this shell never instantiates Status and its writes.
+ property bool quiet: false
+ FileView {
+ id: quietFile
+ path: (Quickshell.env("XDG_RUNTIME_DIR") || "/tmp") + "/status.quiet"
+ watchChanges: true
+ printErrors: false
+ onFileChanged: reload()
+ onLoaded: root.quiet = quietFile.text().trim() === "1"
+ onLoadFailed: root.quiet = false
+ }
Connections {
target: Notify
function onQueueChanged() {
@@ -61,7 +74,7 @@ Scope {
}
root.seen = next;
root.primed = true;
- if (file !== "") {
+ if (file !== "" && !root.quiet) {
// ponytail: one player, a new sound cuts the last; a queue of
// sounds if bursts ever need every one heard.
player.command = ["pw-play", file];
diff --git a/notifications/README.md b/notifications/README.md
index 19ad41f..24be81b 100644
--- a/notifications/README.md
+++ b/notifications/README.md
@@ -24,6 +24,9 @@ the app's own `sound`, then `sounds[urgency]` from the config. A restart
records the queue without playing it. There is one player, so a new sound cuts
the last.
+The status registry's quiet mode (`status.quiet`) silences every sound and
+leaves the balloons, as it does for the Claude and opencode hooks.
+
## The files are the interface
$XDG_RUNTIME_DIR/notifyd/queue.json the live queue