Suppress brightness OSD from display panel
This commit is contained in:
@@ -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 ))"
|
||||
|
||||
Reference in New Issue
Block a user