mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-11-14 04:59:36 +01:00
15 lines
293 B
Bash
Executable File
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
|
|
|