Simplify brightness no-osd parsing
This commit is contained in:
@@ -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,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}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user