xrus - X localized keyboard switch and autolock
xrus [OPTIONS] [keyboard_map_file]
is a X client that watches keyboard and mouse events and serves as
localized keyboard switch and autolock.
To switch the keyboard, it swaps 1,2 and 3,4 columns of the keyboard map. If the
map has more columns, xrus swaps the halves. Thus for xrus
properly, keyboard map has to have four or more columns. If it does not,
terminates with error message. If keyboard_map_file
specified, xrus calls xmodmap
to load the file as keyboard map. If the
specified keymap file does not exist, xrus
tries to find the keymap in
and then tries to append .xmm
name, also looking in that directory.
By default, xrus
switches the keyboard mode when left and right shifts
are pressed simultaneously; it is possible to tune the key combinations either
in resources or in the properties sheet.
When a time period passed without keyboard and mouse events, xrus
a locker, "xlock -remote" by default.
To tune various parameters, to lock screen or terminate xrus,
mouse button on the icon and select appropriate action from popup menu.
- Turn on/off the bell when switching. You can also set this in properties
or resources (*bell)
- Show/not show the icon with keyboard mode indication. Also in resources
- -led led_no
- Use keyboard led led_no to indicate keyboard mode. Resource
- Don't use led for indication
- Allow/disable autolock function
- -locker locker cmd
- Specify locker command
- -timeout sec
- Set autolock timeout
- Don't fork to background. This is default for -wmaker option too.
- Display state in Window Maker appicon.
- Display state in window manager's icon for xrus. In this case you won't be
able to click on xrus' icon to switch or call menu, because window
managers usually trap clicks to their icons.
- Remember keyboard state for each top level window and switch keyboard on
- Log all key presses to specified file.
Here are described only Xrus' own resources, to change resources of widgets used
look into their documentation and xrus.doc
. Some useful resources can
be seen in Xrus.ad
- (type boolean; default false; option -autolock) Specifies whether to use
the autolock feature. This option can be changed in properties sheet.
- (type string; default "xlock -remote"; option -locker
<command>) Specifies the locker to launch to lock screen. This
option can be changed in properties sheet.
- (type int; default 30; option -timeout <value>) Specifies the amount
of minutes without keyboard and mouse activity before starting locker.
This option can be changed in properties sheet.
- (type boolean; default false; option -bell,+bell) Specifies whether to
beep when switching keyboard mode. This option can be changed in
- (type string; option <filename>) Specifies a file name to load with
xmodmap at startup.
- (type string; default Shift_L+Shift_R) Specifies key combination on which
Xrus switches keyboard mode. This option can be changed in properties
- (type string) Specifies key combination on which Xrus sets latin (primary)
keyboard mode. This option can be changed in properties sheet.
- (type string) Specifies key combination on which Xrus sets russian
(secondary) keyboard mode. This option can be changed in properties
- (type string) Specifies key combination on which Xrus changes input mode
for one following key.
- (type int; option -led <num>) Specifies led number to light in
secondary keyboard mode. 0 means none.
- (type string) Defines a list of file names with alternative keyboard maps.
If you want to use it, define also resources *altmapX.labelString, where X
- the number of file in *altMaps starting with 0. If you have compiled
Xrus with Xaw, use resources *altmapX.label instead. The strings will be
shown in menu then.
- (type boolean; default true; option -icon,+icon) Specifies whether to show
- (type boolean; default true) Specifies whether the icon size is the same
in both states (true) or can differ (false).
- (type boolean; default false) Specifies whether the icon should float
above other windows.
- (type boolean; default true) Specifies whether to map the icon back when
it is unmapped. This option works only with certain window managers (mwm,
dtwm, ovwm, probably some other).
- (type boolean; default false) Emulate capslock key. Useful when Xlib is
not localized properly.
- (type int) Specifies which led to light when emulated capslock is pressed.
0 means none.
- (type int; default 1500) Sets time interval in milliseconds between window
mapping and rechecking of event mask of the main application. This is
useful when some application first asks for an event and then withdraws
its request, expecting event propagation to work. This situation is quite
rare, and X does not provide an event on change of event mask.
- (type bool; default false) Same as -wmaker option.
- (type bool; default false) Same as -wmicon option.
- (type bool; default false) Same as -nofork option.
- (type string; default BINDIR/xrusmodmap) Use specified program for
keyboard map loading.
- *title0 and *title1
- (type string; default Xrus:LAT and Xrus:RUS) Set icon name for window
manager in primary and secondary mode accordingly.
- (type bool; default false) Same as -perwindow option.
- *titlePerWindow0 and *titlePerWindow1
- (type string; default (LAT) and (RUS)) Append these strings to window
title in per-window mode.
- (type string; no default) Same as -keylog option.
- switch to primary keyboard mode and terminate.
- switch to primary keyboard mode.
- switch to secondary keyboard mode.
was written by Alexander V. Lukyanov