mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-11-14 21:19:37 +01:00
15 lines
293 B
Plaintext
15 lines
293 B
Plaintext
|
#!/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
|
||
|
|