On Mon, 2010-06-07 at 12:11 +0930, Iain Buchanan wrote: 
> Hi,
> 
> is there a way to get the num lock, caps lock and scroll lock state
> displayed in an OSD?

Still looking for a good solution, but the best I've come up with so far
is this:

1. add to .xbindkeysrc:

"/home/iain/.bin/capstog"
    m:0x12 + c:66
    Mod2 + Caps_Lock

2. /home/iain/.bin/capstog is simply:
#!/bin/sh
mkdir -p ~/.run/
if ( grep On ~/.run/capstog 1>/dev/null 2>&1 ) ; then
   echo Caps Off > ~/.run/capstog
else
   echo Caps On > ~/.run/capstog
fi

3. then run in another shell:
tail -f .run/capstog 2>/dev/null | osd_cat --delay=1 --lines=1 --pos=bottom 
--offset=100 --indent=800 --shadow=3  --font=-*-times-*-*-*-*-34-*-*-*-*-*-*-*

4. finally run "xbindkeys"

Now I get a "Caps On" and "Caps Off" message every time I press the caps
lock.  A lot of manual steps to get there though!

Surely there's a tool to do this already?!

-- 
Iain Buchanan <iaindb at netspace dot net dot au>

I have never been one to sacrifice my appetite on the altar of appearance.
                -- A.M. Readyhough


Reply via email to