elenapan/Scripts/keys.sh
elena 9a2fdf5c79 updated some scripts and uploaded some new ones
Former-commit-id: 6c9faff508
Former-commit-id: 17d19dad6bdde82ff8c2bcc983f87a49bb4a5e6f
Former-commit-id: 4f66d0d17a4bb9ceb3eedf158bae309fa71fb8b1
2017-12-07 09:45:55 +02:00

30 lines
No EOL
733 B
Bash
Executable file

#!/bin/bash
#XSET_OUTPUT="$(xset -q)"
#KEYS="$(echo $XSET_OUTPUT | grep Caps | awk '{print $4 " " $8;}')"
#CAPS="$(echo $KEYS | awk '{if ($1 == "off") {print ""} else {print ""}}')"
#NUM="$(echo $KEYS | awk '{if ($2 == "off") {print ""} else {print ""}}')"
#echo " "$CAPS $NUM $LANG
# if [ $LANG_CODE -gt "1000" ]; then
# # greek is around 1000-1003, and i only have gr and en so this is enough
# LANG="gr"
# else
# # english
# LANG="en"
# fi
#LANG_CODE="$(xset -q | grep LED | awk '{print $10}')"
LANG="$(xset -q | grep LED | awk '{if ($10 >= 1000) {print "gr"} else {print "en"}}')"
echo "$LANG "
# 
# C N
#    both off
#    num on
#    caps on
#    both on