aboutsummaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/Status.qml8
1 files changed, 8 insertions, 0 deletions
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" }
}