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

15 lines
293 B
Bash
Executable File

#!/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