You are not logged in.
anrxc wrote:veox wrote:thanks for the code, weird there was no such utility already.
So certainly similar software existed, but still there was none that did exactly what I wanted.
Of course it existed, not only it existed as some obscure utility, but was also in the repos. That is all. I don't think your utility is a waste of time.
You need to install an RTFM interface.
Offline
Does this work with Ruby 1.9? On a quick check, there's some trouble with SWIG or something. Sorry, I don't have the time to investigate right now.
Offline
jbromley, thanks for the code, it works perfectly.
...
...
I uses two layouts under Window Maker: hungarian and usa. (Yes my favorite window manager is very old, but quick, and small).
I set my wm, when I push the ScrollLock button it is changes the actual layout another and vica versa (flip-flop).
I wrote an example file with doityourself adesklet http://adesklets.sourceforge.net/desklets.html which is check and show the actual Xorg keyboard layout, and can change it (predefinied values) if I click on.
Here is my xkeyboard.sh script:
#!/bin/bash
#
# This is a back-end script for doityourself. It displays the output
# of the setxkbmap layout, and changes from us to hungarian layout
# or from hungarian to us layout
case $1 in
init) echo "<font 'VeraMono/15'/>"
echo "<background.color None/>" ;;
test) keymap=$(setxkbmap -v | awk -F "+" '/symbols/ {print $2}')
echo ${keymap:0:2} ;;
click) if (setxkbmap -v | grep -q hu)
then exec setxkbmap us
else exec setxkbmap -layout "hu(qwerty)"
fi ;;
*) echo "Usage: $0 [ init | test | click ] test-value"
esac
This code should just copy your ~/.desklets/doityourself-0.4.1/scripts/ directory, and should to change a ~/.desklets/doityourself-0.4.1/scripts/ config.txt last lines:
id0 = {'rawmode': False, 'script': 'xkeyboard.sh'}
That's it!
Last edited by Goosfrabaa (2010-01-31 21:38:29)
Offline