Hello!

My version is

fvwm 2.5.16 compiled on May 17 2006 at 21:17:45
with support for: ReadLine, Stroke, XPM, PNG, Shape, XShm, SM, Xinerama,
XRender, XFT, NLS

I am using the following function to switch my keyboard between german
and greek:

##############################
AddToFunc switch_kbd
 +      I       PipeRead ~/.fvwm/exp.sh
##############################

The file exp.sh has the following content: 

##############################
#!/bin/bash

if [ "$kbd_layout" == "de" ]; then
        echo "Exec exec setxkbmap -model pc105 -layout el -variant basic"
        echo "SendToModule FvwmButtons ChangeButton kbd Icon gr.xpm"
        echo "SendToModule FvwmButtons ChangeButton kbd Title GR"
        echo "SetEnv kbd_layout gr"
else  
        echo "Exec exec setxkbmap -model pc105 -layout de -variant nodeadkeys"
        echo "SendToModule FvwmButtons ChangeButton kbd Icon de.xpm"
        echo "SendToModule FvwmButtons ChangeButton kbd Title DE"
        echo "SetEnv kbd_layout de"
fi
exit
##############################

It works fine, but it is slow, especially when I click on the button:

##############################
*FvwmButtons: (Id kbd, Title DE Icon de.xpm, Action Function switch_kbd)
##############################

Is it possible to create the same function whithout the PipeRead and the
shell variable $kbd_layout?

Thanks for any help!

Alexandros



Reply via email to