Files
omarchycn/bin/omarchy-swayosd-brightness
T

15 lines
393 B
Bash
Executable File

#!/bin/bash
# Display brightness level using SwayOSD on the current monitor.
# Usage: omarchy-swayosd-brightness <percent>
percent="$1"
progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')"
[[ $progress == "0.00" ]] && progress="0.01"
omarchy-swayosd-client \
--custom-icon display-brightness-symbolic \
--custom-progress "$progress" \
--custom-progress-text "${percent}%"