xswitch
xswitch is a small X helper application that executes certain actions when clicked and changes its display. It is meant to be sufficiently flexible to be able to provide several different uses.
The basic idea behind this program is to have a graphical keyboard selection utility for X users that don't use KDE, GNOME, Xfce or any other integrated window manager that provides a keyboard selector in the menu or task bar. Therefore this utility is a standalone application for X.
Actions are configured in a file and usually consist of a title, a tooltip, a graphic (e.g. a flag when it is used to switch keyboard settings) and, of course, a command to be executed.
The application consists of a graphical window that only contains a button that can be pressed. When the button is clicked, the underlying action is executed and based on its configuration the utility moves to the next state. This often refers to displaying a different graphic.
Example
In the following sample configuration file the keyboard mapping is switched between English and German, while German is the default setting. Thus the utility will display the US flag first and offer to switch to US keyboard. Flag graphics are used from the Internet.
[English] image = /home/joey/etc/flagge-vereinigte-staaten-von-amerika-usa-flagge-rechteckig-12x18.gif tooltip = Switch to US keyboard command = xmodmap /home/joey/.xmodmap.linux.us action = cycle [German] image = /home/joey/etc/flagge-deutschland-flagge-rechteckig-12x18.gif tooltip = Switch to German keyboard command = xmodmap /home/joey/.xmodmap.linux.de action = cycle
Source
CVS.
cvs -d :pserver:anonymous@cvs.infodrom.org:/var/cvs/infodrom login
cvs -d :pserver:anonymous@cvs.infodrom.org:/var/cvs/infodrom co scripts/xswitch