Gentoo Archives: gentoo-user

From: Iain Buchanan <iaindb@××××××××××××.au>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] caps lock osd
Date: Mon, 07 Jun 2010 04:21:56
Message-Id: 1275884323.25447.16.camel@localhost
In Reply to: [gentoo-user] caps lock osd by Iain Buchanan
1 On Mon, 2010-06-07 at 12:11 +0930, Iain Buchanan wrote:
2 > Hi,
3 >
4 > is there a way to get the num lock, caps lock and scroll lock state
5 > displayed in an OSD?
6
7 Still looking for a good solution, but the best I've come up with so far
8 is this:
9
10 1. add to .xbindkeysrc:
11
12 "/home/iain/.bin/capstog"
13 m:0x12 + c:66
14 Mod2 + Caps_Lock
15
16 2. /home/iain/.bin/capstog is simply:
17 #!/bin/sh
18 mkdir -p ~/.run/
19 if ( grep On ~/.run/capstog 1>/dev/null 2>&1 ) ; then
20 echo Caps Off > ~/.run/capstog
21 else
22 echo Caps On > ~/.run/capstog
23 fi
24
25 3. then run in another shell:
26 tail -f .run/capstog 2>/dev/null | osd_cat --delay=1 --lines=1 --pos=bottom --offset=100 --indent=800 --shadow=3 --font=-*-times-*-*-*-*-34-*-*-*-*-*-*-*
27
28 4. finally run "xbindkeys"
29
30 Now I get a "Caps On" and "Caps Off" message every time I press the caps
31 lock. A lot of manual steps to get there though!
32
33 Surely there's a tool to do this already?!
34
35 --
36 Iain Buchanan <iaindb at netspace dot net dot au>
37
38 I have never been one to sacrifice my appetite on the altar of appearance.
39 -- A.M. Readyhough