aboutsummaryrefslogtreecommitdiffstats
path: root/modules/custom/presentation.jsonc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/custom/presentation.jsonc')
-rw-r--r--modules/custom/presentation.jsonc28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/custom/presentation.jsonc b/modules/custom/presentation.jsonc
new file mode 100644
index 0000000..3843cb5
--- /dev/null
+++ b/modules/custom/presentation.jsonc
@@ -0,0 +1,28 @@
+// Presentation mode, the same module the DP-1 bar runs.
+//
+// `statusctl presentation watch` streams waybar JSON on every change: it
+// already emits an empty text and a class of activated, deactivated or down,
+// so the icon is chosen in CSS from that class and no format is needed here.
+// Dropping format-icons is the whole difference from the DP-1 copy, which
+// draws the same two states as Nerd Font glyphs.
+//
+// `down` means the state file is missing, which is not the same as off: the
+// mode cannot be read at all. It gets its own icon rather than borrowing the
+// off one, so a broken watcher does not read as a working bar.
+//
+// statusctl talks to files under XDG_RUNTIME_DIR rather than to quickshell,
+// so this keeps working while the shell is down.
+// The format is a single space, and it has to be something. It defaults to
+// "{text}", statusctl emits an empty text, and waybar draws no widget at all
+// for a custom module whose formatted output is empty: not an empty pill, no
+// pill. A space gives the label real content to be allocated for, shows
+// nothing itself, and leaves the icon to the CSS background.
+{
+ "custom/presentation": {
+ "exec": "$HOME/bin/statusctl presentation watch",
+ "return-type": "json",
+ "on-click": "$HOME/bin/statusctl presentation toggle",
+ "format": " ",
+ "tooltip": true
+ }
+}