Simplify brightness no-osd parsing

This commit is contained in:
David Heinemeier Hansson
2026-06-24 13:52:37 +02:00
parent 0bf29e2f4a
commit 1d364fc988
2 changed files with 8 additions and 22 deletions
+4 -11
View File
@@ -6,17 +6,10 @@
device_cache="${XDG_RUNTIME_DIR:-/tmp}/omarchy-brightness-display-apple.device"
no_osd=0
args=()
for arg in "$@"; do
if [[ $arg == "--no-osd" ]]; then
no_osd=1
else
args+=("$arg")
fi
done
set -- "${args[@]}"
if [[ ${1:-} == "--no-osd" ]]; then
no_osd=1
shift
fi
detect_apple_display_device() {
local devices=()
+4 -11
View File
@@ -4,17 +4,10 @@
# 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[@]}"
if [[ ${1:-} == "--no-osd" ]]; then
no_osd=1
shift
fi
direction="${1:-up}"