Suppress brightness OSD from display panel

This commit is contained in:
David Heinemeier Hansson
2026-05-22 11:35:36 +02:00
parent 7b6a03fa08
commit c522757acf
4 changed files with 52 additions and 10 deletions
+15 -2
View File
@@ -1,7 +1,20 @@
#!/bin/bash
# omarchy:summary=Adjust keyboard backlight brightness using available steps.
# omarchy:args=<up|down|cycle|off|restore>
# omarchy:args=[--no-osd] <up|down|cycle|off|restore>
no_osd=0
args=()
for arg in "$@"; do
if [[ $arg == "--no-osd" ]]; then
no_osd=1
else
args+=("$arg")
fi
done
set -- "${args[@]}"
direction="${1:-up}"
@@ -49,4 +62,4 @@ fi
# Set the new brightness.
brightnessctl -d "$device" set "$new_brightness" >/dev/null
omarchy-osd -i keyboard -p "$(( new_brightness * 100 / max_brightness ))"
(( no_osd )) || omarchy-osd -i keyboard -p "$(( new_brightness * 100 / max_brightness ))"