Support single-key keyboard backlight cycling (#4672)
* Support single-key keyboard backlight cycling (like Asus F4) and add keyboard specific OSD icon * We don't need an alias --------- Co-authored-by: Ryan Latimer <ryan@example.com> Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
co-authored by
Ryan Latimer
David Heinemeier Hansson
parent
e99afc98f8
commit
db3ba3501a
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Display keyboard brightness level using SwayOSD on the current monitor.
|
||||
# Usage: omarchy-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}%"
|
||||
Reference in New Issue
Block a user