dotfiles/.config/eww/bar/scripts/indicator

15 lines
293 B
Plaintext
Raw Permalink Normal View History

2023-12-25 11:21:57 +01:00
#!/bin/bash
query=$(xset q | grep -Po "(?:Caps|Num|Scroll)\s+Lock:\s*(\w*)" | grep -Po "(off|on)")
result=""
for i in $query
do
[ $i = "off" ] && result+="ﰊ "|| result+="ﰉ "
done
# somehow results are shown reversed. So i am reversing them here to fix it
echo $result | rev | xargs