FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 06-07-2010, 02:41 AM
Iain Buchanan
 
Default caps lock osd

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
 
Old 06-07-2010, 04:18 AM
Iain Buchanan
 
Default caps lock osd

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
 

Thread Tools




All times are GMT. The time now is 12:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org