summaryrefslogtreecommitdiffstats
path: root/.local/bin/statusbar
diff options
context:
space:
mode:
authorAlaa Eddine <138128843+ArgusGuardian@users.noreply.github.com>2024-05-03 12:23:53 +0100
committerGitHub <noreply@github.com>2024-05-03 12:23:53 +0100
commit3fb60852de6d6d9011afdf65b247690ae54dfa5b (patch)
treea0dc28e590013edbf45b7c222dd069530efd62ba /.local/bin/statusbar
parentcf4a12acb3a70951fd59d67e0738bf3ab2d1045c (diff)
downloadeibhear-3fb60852de6d6d9011afdf65b247690ae54dfa5b.tar.gz
eibhear-3fb60852de6d6d9011afdf65b247690ae54dfa5b.tar.zst
eibhear-3fb60852de6d6d9011afdf65b247690ae54dfa5b.zip
Create sb-bghitness, show brightness in the bar.
script to add brightness to the dwmblocks.
Diffstat (limited to '.local/bin/statusbar')
-rw-r--r--.local/bin/statusbar/sb-bghitness13
1 files changed, 13 insertions, 0 deletions
diff --git a/.local/bin/statusbar/sb-bghitness b/.local/bin/statusbar/sb-bghitness
new file mode 100644
index 0000000..afccf3e
--- /dev/null
+++ b/.local/bin/statusbar/sb-bghitness
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# show the current brightness level.
+
+case $BLOCK_BUTTON in
+ 1) setsid -w -f "$TERMINAL" -e brightnessctl; pkill -RTMIN+20 "${STATUSBAR:-dwmblocks}" ;;
+ 3) notify-send "💡 Brightness module" "\- Shows brightness level ☀️." ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
+esact
+
+brightness=$(brightnessctl -m | grep -m 1 "backlight" | cut -d "," -f 4)
+
+echo "💡 $brightness"