diff options
-rwxr-xr-x | leds | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#! /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 "C." + ;; + '2') + echo ".N" + ;; + '3') + echo "CN" + ;; + *) + echo ".." +esac |