diff options
author | ZachIR <zachir@librem.one> | 2025-08-09 08:45:00 -0500 |
---|---|---|
committer | ZachIR <zachir@librem.one> | 2025-08-09 08:45:00 -0500 |
commit | 746ef9801cb5da6f29ddb11707aad3f414e3fde2 (patch) | |
tree | c2fd00b9b96b3aeb01d75659f9ac51aaa6b0c1c5 /backlight | |
parent | 37a597e7fd364b39efda3b912fb6b35265f73c67 (diff) |
Add backlight block using bl
Diffstat (limited to 'backlight')
-rwxr-xr-x | backlight | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/backlight b/backlight new file mode 100755 index 0000000..aba0945 --- /dev/null +++ b/backlight @@ -0,0 +1,19 @@ +#!/bin/sh + +case $BLOCK_BUTTON in + 1) + pgrep -x pipewire >/dev/null && MIXER="pulsemixer" || \ + pgrep -x pulseaudio >/dev/null && MIXER="pulsemixer" || \ + MIXER="alsamixer" + setsid -f $TERMINAL -e $MIXER + ;; + 2) notify-send "Volume module" "\- Shows volume, X if muted. +- Middle click to show this message. +- Right click to mute. +- Scroll to change." ;; + 3) volsv -t ;; + 4) volsv -i ;; + 5) volsv -d ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac +printf "[%3.0f%%]" "$(bl -g)" |