diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-09-18 16:38:30 -0300 |
---|---|---|
committer | Silvio Rhatto <user@example.org> | 2014-09-18 16:38:30 -0300 |
commit | 9181c40eae371a758a68db47a79b124cf4141986 (patch) | |
tree | d1ade9808bf715a7b47e8a976a15e761b1ec1939 /leds | |
download | utils-x11-9181c40eae371a758a68db47a79b124cf4141986.tar.gz utils-x11-9181c40eae371a758a68db47a79b124cf4141986.tar.bz2 |
Initial import
Diffstat (limited to 'leds')
-rwxr-xr-x | leds | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#! /bin/bash +# +# Get keyboard led state. +# See https://bbs.archlinux.org/viewtopic.php?id=68511 +# + +ledstate="`xset q 2>/dev/null | grep LED`" +ledstate="`echo $ledstate | sed s/[^1-9]//g`" +case "$ledstate" in + '1') + echo "[CapsLock] " + ;; + '2') + # Right now we're not interested on NumLock status + #echo "[NumLock]" + echo "" + ;; + '3') + # Right now we're not interested on NumLock status + #echo "[CapsLock][NumLock]" + echo "[CapsLock] " + ;; + *) + echo "" +esac |