The user may define several layouts with net domains of interest to him and label them with a name. This name will show in the menu and can be used to change the layout of the client.
Every host is represented by a button. If this host is watched by an XWho-server, then the button will show the currently logged in user of this host.
By clicking on this button you activate a popup-window with general data of this host. In the configuration the user is able to define shell commands, that are executed by buttons on this popup-window. This commands contain variables with values derived from the context of the attached host. This way the command may be called on the remote host.
Example:
DISPLAY-LAYOUT "Where I spend my whole days" {
default {
# this will be shown on all hosts except hosts matching 'my.*1'
MENU
"This is myhost1" myhost1
"This is myhost2" myhost2
}
my.*1 {
# this will be shown, if the client displays on myhost1
MENU
"This is myhost2" myhost2
"This is myhost1" myhost1
}
}
If you leave the layout-label out, the default is "default".
This layout is shown at the start.
If there is no default-layout the client takes the first from
xwhorc.default.
The layout may be adapted to the position of the display-host. That is very nice with rows of facing displays in a terminal room. The individual layouts have to be preceded by a whitespace-separated list of regular expressions, that are matched against the client's display-hostname. The token default matches any hostname, if there is no other match.
Every line from the file will appear as a line of the window. Strings in quotes appear as text-labels all other strings have to be hostnames or hostaliases.
The strings are separated by whitespace and will be displayed in single columns. If you want a label or a host to cover e.g. 3 columns, you have to append [3] to the string.
The special token MENU defines the position of the menu-button and should appear in any layout.
The variables consist of one letter preceded by '%'.
Example:
COMMAND-BUTTONS {
"rlogin" xterm -display %d:0.0 -T "rlogin `whoami`@%h" -n "`whoami`@%h" -e rlogin %h &
"xauth" rsh %d /usr/local/bin/X11/xauth extract - %d:0 2>/dev/null | rsh %h /usr/local/bin/X11/xauth merge - 2>/dev/null
}
The first string in quotes is the label of the button.
The rest to the line end is taken as shell command.
Example:
NOUSER-STRING " "The string has to have exactly 8 chars.
Example:
NICKNAMES {
nick1 (group) = login1
nick2 (group) = login2
someone = hislogin
}
For certain groups of people you may choose special colors.
These colors are defined in your X resource database
(see xrdb(1)):
XWho.group.background: red XWho.group.foreground: white
A server using all defaults doesn't have to appear in this file.
THIS_DOMAIN {
server-host:
[port = portnumber]
[subhost = served-host [utmp-file [local-tty]]]
:
:
}