mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
16 lines
521 B
Bash
Executable File
16 lines
521 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Display keyboard brightness level using SwayOSD on the current monitor.
|
|
# omarchy:args=<0-100>
|
|
# omarchy:examples=omarchy swayosd kbd brightness 0 | omarchy swayosd kbd brightness 50 | omarchy swayosd kbd brightness 100
|
|
|
|
percent="$1"
|
|
|
|
progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')"
|
|
[[ $progress == "0.00" ]] && progress="0.01"
|
|
|
|
omarchy-swayosd-client \
|
|
--custom-icon keyboard-brightness-symbolic \
|
|
--custom-progress "$progress" \
|
|
--custom-progress-text "${percent}%"
|