From a3fa6524b744ea062ea0197bb3a0fec7ec9c6b54 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 16 Nov 2026 13:28:21 +0100 Subject: status: nolamp mode and the agent-lamp forward nolamp keeps agent-lamp's bulb dark; notify-sound forwards opencode's event and session to agent-lamp before the quiet check. Co-Authored-By: Claude Opus 5.5 --- shared/Status.qml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'shared') diff --git a/shared/Status.qml b/shared/Status.qml index f32cd35..ab45e99 100644 --- a/shared/Status.qml +++ b/shared/Status.qml @@ -43,9 +43,13 @@ Singleton { // sound scripts read the file through statusctl, so this is only the // drawer's view of it. readonly property bool quiet: quietFile.value + // Keeps agent-lamp's bulb dark; agent-lamp reads the file itself, so + // this is only the drawer's view of it. + readonly property bool nolamp: nolampFile.value readonly property int activeCount: (root.dnd ? 1 : 0) + (root.presentation ? 1 : 0) + (root.nolock ? 1 : 0) + (root.quiet ? 1 : 0) + + (root.nolamp ? 1 : 0) // Set once by shell.qml. IdleInhibitor does nothing with a null window, // and the singleton has no window of its own to offer. @@ -81,6 +85,8 @@ Singleton { nolockFile.write(on); } else if (name === "quiet") { quietFile.write(on); + } else if (name === "nolamp") { + nolampFile.write(on); } } @@ -97,6 +103,7 @@ Singleton { else if (name === "presentation") root.setMode("presentation", !root.presentation); else if (name === "nolock") root.setMode("nolock", !root.nolock); else if (name === "quiet") root.setMode("quiet", !root.quiet); + else if (name === "nolamp") root.setMode("nolamp", !root.nolamp); } // The detector calls this every poll; a write on an unchanged value would @@ -224,6 +231,7 @@ Singleton { ModeFile { id: presFile; path: root.dir + "/status.presentation" } ModeFile { id: nolockFile; path: root.dir + "/status.nolock" } ModeFile { id: quietFile; path: root.dir + "/status.quiet" } + ModeFile { id: nolampFile; path: root.dir + "/status.nolamp" } // Written only by the game detector above, never by statusctl. ModeFile { id: gamingFile; path: root.dir + "/status.gaming" } } -- cgit v1.2.3