trigger-launcher
Samuel Verstraete
samuel.verstraete at gmail.com
Fri Sep 15 14:49:52 CEST 2006
Hi Dannym
I'm a bit confused about how to configure the trigger launcher...
(i'm mailing this to both mailinglist as i think the trigger launcher
is a plugin (or a goodie) but it's in the main xfce tree)
What i want to do is create a trigger launcher that allows me to switch
from international qwerty to normal us....
what i did was first create 3 scripts :
1. info_keyboard
info=`setxkbmap -print | grep intl | cut -d"(" -f3 | cut -d")" -f1`
if [ "$info" = "intl" ];
then
echo 0
else
info=`setxkbmap -print | grep us | cut -d"/" -f3 | cut -d\" -f1`
if [ "$info" = "us" ];
then
echo 12
else
echo 255
fi
fi
(this is just a fairly complicated and inefficient script to find out
if the current layout is on intl or us.)
2. setxkb_us
#!/bin/bash
setxkbmap -model pc105 -layout us
notify-send
-i /usr/share/icons/Rodent/48x48/devices/gnome-dev-keyboard.png
"KEYBOARD" "Keyboard is set to generic US layout"
3. setxkb_intl
#!/bin/bash
setxkbmap -model pc105 -layout us -variant intl
notify-send
-i /usr/share/icons/Rodent/48x48/devices/gnome-dev-keyboard.png
"KEYBOARD" "Keyboard is set to International US layout"
All of them are in ~/bin and that is in my $PATH, i did chmod +x all of
them.
then i tried to configure the trigger launcher:
http://merlin.ugent.be/trigger_launcher.png
So default i start with the US keyboard layout and only when i have to
type in accents and stuff like that i switch to intl layout.
so imho
disabled >> us layout
enabled >> intl layout
My info_keyboard script will throw out a 0 when the keyboard is set at
intl and a 12 when it is set at us. A 255 when it is set at something
unknown. The funny thing is that the script checks the thing and it
makes my launcher go to the intl flag... which is not what i expected
when i was reading the documentation... (the README included in the svn)
any suggestions?
gr,S.
More information about the Xfce4-dev
mailing list