From: Silvio Rhatto Date: Thu, 21 Feb 2013 22:41:35 +0000 (-0300) Subject: Adding leds script X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=4f06899111090b694b2e441495f9a1c521e4708c;p=scripts.git Adding leds script --- diff --git a/leds b/leds new file mode 100755 index 0000000..40c8392 --- /dev/null +++ b/leds @@ -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