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"
|
device_cache="${XDG_RUNTIME_DIR:-/tmp}/omarchy-brightness-display-apple.device"
|
||||||
no_osd=0
|
no_osd=0
|
||||||
args=()
|
if [[ ${1:-} == "--no-osd" ]]; then
|
||||||
|
no_osd=1
|
||||||
for arg in "$@"; do
|
shift
|
||||||
if [[ $arg == "--no-osd" ]]; then
|
fi
|
||||||
no_osd=1
|
|
||||||
else
|
|
||||||
args+=("$arg")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
set -- "${args[@]}"
|
|
||||||
|
|
||||||
detect_apple_display_device() {
|
detect_apple_display_device() {
|
||||||
local devices=()
|
local devices=()
|
||||||
|
|||||||
@@ -4,17 +4,10 @@
|
|||||||
# omarchy:args=[--no-osd] <up|down|cycle|off|restore>
|
# omarchy:args=[--no-osd] <up|down|cycle|off|restore>
|
||||||
|
|
||||||
no_osd=0
|
no_osd=0
|
||||||
args=()
|
if [[ ${1:-} == "--no-osd" ]]; then
|
||||||
|
no_osd=1
|
||||||
for arg in "$@"; do
|
shift
|
||||||
if [[ $arg == "--no-osd" ]]; then
|
fi
|
||||||
no_osd=1
|
|
||||||
else
|
|
||||||
args+=("$arg")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
set -- "${args[@]}"
|
|
||||||
|
|
||||||
direction="${1:-up}"
|
direction="${1:-up}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user