From 9181c40eae371a758a68db47a79b124cf4141986 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 18 Sep 2014 16:38:30 -0300 Subject: Initial import --- leds | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 leds (limited to 'leds') diff --git a/leds b/leds new file mode 100755 index 0000000..22ff769 --- /dev/null +++ b/leds @@ -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 -- cgit v1.2.3