Brightness controls

This commit is contained in:
2026-03-06 19:39:49 +00:00
parent 8ca70b0b49
commit 38a5880704
5 changed files with 109 additions and 16 deletions

View File

@@ -0,0 +1,15 @@
#!/bin/bash
# Display keyboard brightness level using SwayOSD on the current monitor.
# Usage: station-swayosd-kbd-brightness <percent>
percent="$1"
progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')"
[[ $progress == "0.00" ]] && progress="0.01"
swayosd-client \
--monitor "$(hyprctl monitors -j | jq -r '.[]|select(.focused==true).name')" \
--custom-icon keyboard-brightness \
--custom-progress "$progress" \
--custom-progress-text "${percent}%"