commit ea10292e2c04efff760b2a55db00d0f03fd59a72
parent b3474e85dcce03e7de0b4a4e30ff7fad1f38ee26
Author: ryukamish <[email protected]>
Date: Sat, 11 Apr 2026 18:26:09 +0530
add: module indicator for screen recording
Diffstat:
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/waybar/config.jsonc b/waybar/config.jsonc
@@ -3,6 +3,7 @@
"position": "top",
"modules-left": [
"clock",
+ "custom/screenrecording-indicator",
"niri/window"
],
"modules-center": [
@@ -26,8 +27,7 @@
"format": "{app_id}"
},
"clock": {
- "format": "{:%a, %b %d %H:%M}",
- "format-alt": "{:%Y-%m-%d}"
+ "format": "{:%a, %b %d %H:%M}"
},
"memory": {
"format": " {used}GiB"
@@ -112,5 +112,11 @@
"on-scroll-down": "~/.config/waybar/brightness down",
"on-click": "~/.config/waybar/brightness left_click",
"on-click-right": "~/.config/waybar/brightness right_click"
+ },
+ "custom/screenrecording-indicator": {
+ "on-click": "~/.config/waybar/screenrecord",
+ "exec": "~/.config/waybar/waybar-screenrecord",
+ "signal": 8,
+ "return-type": "json"
}
}
diff --git a/waybar/style.css b/waybar/style.css
@@ -27,3 +27,8 @@ window#waybar {
#tray {
padding: 0 8px;
}
+
+/* custom modules */
+#custom-screenrecording-indicator {
+ color: #ff0000;
+}
diff --git a/waybar/waybar-screenrecord b/waybar/waybar-screenrecord
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+if pgrep gpu-screen-reco >/dev/null; then
+ echo '{"text": "Recording ", "tooltip": "Stop recording", "class": "active"}'
+else
+ echo '{"text": ""}'
+fi