public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] caps lock osd
@ 2010-06-07  2:41 Iain Buchanan
  2010-06-07  4:18 ` Iain Buchanan
  0 siblings, 1 reply; 2+ messages in thread
From: Iain Buchanan @ 2010-06-07  2:41 UTC (permalink / raw
  To: gentoo-user

Hi,

is there a way to get the num lock, caps lock and scroll lock state
displayed in an OSD?  I'm not looking for a panel applet, but something
that throws the state onto the screen for a second or so.

I thought lineakd and xosd might do it, but I can't figure out how to
get it to respond to caps lock.  There are various other utilities, but
they all seem panel or krell based.  Is there a way I can run a generic
command when caps lock is pressed?

thanks :)
-- 
Iain Buchanan               R&D
<iain@pcorp.com.au>  Phone: 138




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-user] caps lock osd
  2010-06-07  2:41 [gentoo-user] caps lock osd Iain Buchanan
@ 2010-06-07  4:18 ` Iain Buchanan
  0 siblings, 0 replies; 2+ messages in thread
From: Iain Buchanan @ 2010-06-07  4:18 UTC (permalink / raw
  To: gentoo-user

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-07  4:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07  2:41 [gentoo-user] caps lock osd Iain Buchanan
2010-06-07  4:18 ` Iain Buchanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox