Simpler
This commit is contained in:
@@ -5,17 +5,10 @@
|
|||||||
# omarchy:examples=omarchy brightness display | omarchy brightness display +5% | omarchy brightness display --no-osd 50% | omarchy brightness display off | omarchy brightness display on
|
# omarchy:examples=omarchy brightness display | omarchy brightness display +5% | omarchy brightness display --no-osd 50% | omarchy brightness display off | omarchy brightness display on
|
||||||
|
|
||||||
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[@]}"
|
|
||||||
|
|
||||||
# Get the brightness of the passed display
|
# Get the brightness of the passed display
|
||||||
display_brightness() {
|
display_brightness() {
|
||||||
|
|||||||
Reference in New Issue
Block a user