Files
arthur-os/bin/omarchy-swayosd-kbd-brightness
T

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}%"