summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--waybar/config.jsonc10
-rw-r--r--waybar/style.css5
-rwxr-xr-xwaybar/waybar-screenrecord7
3 files changed, 20 insertions, 2 deletions
diff --git a/waybar/config.jsonc b/waybar/config.jsonc
index 4345162..25616c3 100644
--- 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
index f6734ca..3e0f04a 100644
--- 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
new file mode 100755
index 0000000..ea7b046
--- /dev/null
+++ 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