xpanel(1) — USER COMMANDS
NAME
xpanel − set X server defaults interactively
SYNOPSIS
xpanel [X Toolkit options]
DESCRIPTION
xpanel allows the user to interactively modify X server settings. When invoked, the window consists of nine scrollbars with associated pushbuttons and meters, and nine function/toggle pushbuttons, with their associated indicator labels. This client replaces xset in all aspects except two: first, the font path modification commands are not yet implemented; second, xpanel does not try to set color values, although it will display the values in the current colormap.
OPTIONS
xpanel only accepts the standard X Toolkit options, plus −help.
UNITS
Refer to “WIDGET TREE” below; the widget groups like the following
Form − pitch
Command − button
Label − meter
Scbar − scroll
are known as “Units.” Each unit is composed of a parent and three children.
| button |
| meter |
| knob |
1. Unit layout
The name of the Form widget parent is the name of the variable controlled by the setting of the scroll widget’s knob. The button widget simply controls whether or not the associated scroll widget should receive events; thus, clicking on the button turns on or off (locks or unlocks) the scrollbar. Since no text or bitmap is by default associated with these button widgets, all of them will realize with the word “button” set as text for the label; see “SPECIAL CONSIDERATIONS” below for suggestions on changing this behaviour.
The meter widget is a Label widget that merely displays the current scroll widget’s current setting/value. With resource settings, you can control the format of the (integer) value displayed in the various meter widgets.
The scroll widgets, class Scbar, are not the standard Athena Scrollbar widgets; for resources in the Scbar widgets, see “SCBAR WIDGET RESOURCES”, below.
SCROLLBARS
To activate the scrollbars, press the button at the top of the scrollbar; this turns the scrollbar on, letting it receive events. You can now control settings by clicking on the knob in the scrollbar, moving the knob, and letting go of the knob; you can also control the position of the knob by moving the pointer into the appropriate scrollbar and pressing the up or down arrow keys. As the knob is moved, the resulting setting is immediately transferred to the X server, which illustrates dynamically the effect of that setting. In the case of the three bell scrollbars, the keyboard bell is activated.
In the following explanation, the name of the scrollbar in fixed space font stands for the scrollbar widget, while the name of the scrollbar in italics stands for the value set on the X server by the current knob position in the named scrollbar. The scrollbars are (in order, from left to right):
volume
Controls the volume of the keyboard bell; the normal range is from 0 through 100 percent.
pitch Controls the frequency, in hertz, of the tone sounded by the keyboard bell. The normal range is from 0 through 20000 hertz.
duration
Controls the duration, in milliseconds, of the keyboard bell. The normal range is 0 through 1000 milliseconds, although the maximum can be raised through the use of the bellDurationMax resource.
click Controls the volume of the keyboard keyclick; the normal range is from 0 through 100, although some servers only implement on or off values.
acceleration
Controls the acceleration of the mouse pointer; when the pointer is moved more than threshold pixels, it will go acceleration times as fast as the base acceleration (which is 1, or unity). The normal range is from 1 through 10, although the maximum can be raised by the setting of the mouseAccelerationMax resource.
threshold
Controls the number of pixels on the screen that the mouse pointer must be moved before the acceleration multiplier takes effect. The normal range is from 0 through 1000, although the maximum can be changed through the use of the mouseThresholdMax resource.
timeout
Controls the length of time, in seconds, that the mouse and keyboard must remain inactive before the screen−saver is triggered. The normal range is from 0 through 2000 seconds, but the maximum can be raised by the saverTimeoutMax resource.
interval
Controls the interval, in seconds, at which the screen background must be changed in order to prevent screen burn. interval is only effective if preferBlank is turned on (see “BUTTONS”, below).
colors
Controls the entry in the currently installed colormap which is displayed as the background of the scrollbar. Normal range is 0 through the number of colorcells available for the display; for monochrome displays, the maximum is 1 (color 0 and color 1); for the Motorola 393 display/server, the maximum is 15; for the 395 display/server it is 255, and for the NCD color X terminals it is also 255. The background of the scrollbar merely displays the RGB value of the selected color cell; there are no means by which the RGB value can be changed.
BUTTONS
xpanel also provides a number of pushbuttons which either toggle current on or off states, or activate certain built−in functions. The buttons (to the left of the last, color, scrollbar, and from top to bottom) are:
exit Pressing this button exits the client.
undo Pressing this button causes xpanel to restore all user preference settings to the value saved when the client started running; this button always restores the startup values, as xpanel never modifies them.
default
Pressing this button causes all user preferences to be unilaterally set to the server default values; fontpath is excluded from the list of preferences restored. Again, xpanel never modifies the server default values.
reread
Pressing this button causes xpanel to reread the current server settings of all user preferences. This is useful when a different client program (such as xset) has been used to modify the server settings.
lock Pressing this button causes the CAPS LOCK key to be removed from the server’s modifier map, which means that you cannot place the keyboard, either intentionally or accidentally, into the mode whereby all alphabetic keys produce their uppercase (shifted) values. The SHIFT keys are not removed from the modifier map. Note, however, that on some servers this capability is not available; specifically, it is not available on the Motorola 393/395 server.
led Pressing this button turns on or off all settable keyboard leds. On some servers (Motorola 393/395) this button has no effect. On others (NCD), the leds must be placed into a state such that client programs can modify their settings; on the NCD, this means that the setup screen must be displayed and the led functions must all be changed to “X LED [1,2,3].”
repeat
Pressing this button turns on or off the global keyboard repeat; when on, all keys on the keyboard will repeat if held down more than several milliseconds (the exact value depends upon the manufacturer of the keyboard). When off, no keys repeat.
blank
Pressing this button toggles the preferBlank setting in the server. When preferBlank is on, the screen will be blanked (turned completely black) if the keyboard and mouse are inactive more than timeout seconds. When it is off, the screen will have a uniform pattern overlaid, with probably a large X on it, and the pattern shifted every interval seconds.
expose
Pressing this button controls the allowExpose parameter in the server. When on, it sets the user preference to allow window exposures (the server can freely discard window contents); if off, it sets the preference to disable screen saver unless the server can regenerate the screens without causing exposure events.
LIGHTS
To the left of the on/off/function buttons, there is a matching column of widgets which indicate the state of the corresponding buttons. These are “tri−state” displays, indicating that the corresponding button is either on or off, or that on/off states are not applicable. The on or off state is indicated by the color of the light widget, and these colors are controlled by the lightOn and lightOff resources. For the off state, lightOff is treated as the background color, while lightOn is the foreground color. For the on state, lightOff is the foreground and lightOn is the background. The “not applicable” state is indicated by the light widget being set to the background color set in resources for either the Label class or the color set for the lights widget (the parent of all the light widgets, which are of labelWidgetClass). For a monochrome display, lightOff is white, lightOn is black, and the not applicable color is also white. All of the light indicator widgets are named “ ” (space).
COLOR READOUTS
To the right of the light widgets, there is a column of three Label widgets; the Form widget parent is named readouts, and the three children are named red, green and blue. When the colors scrollbar’s background color changes, red, green and blue change correspondingly to indicate the correct RGB values for the current scrollbar background color. The format of the readouts is controlled by the rgbFormat resource, another printf string.
TIME READOUTS
Below the color readouts, there is another group of widgets. These will display the time that xpanel started up. The first button below the blue readout is the enable button, which, when pressed, allows you to modify the time display widgets interactively. Once the enable button is on, the buttons below are sensitized, and, by clicking on the appropriate button, you can change the time. Button presses for the weekday, month, day, year, hour, minute and second widgets cause the widget to increment its display; no decrement is available. By clicking enough times, you can cause the widget’s value to wrap around. The year widget, for example, has a value range of 1970−2038; when the widget reads 2038, the next button press will cause the display to read 1970.
After the desired time is set, and if xpanel was started as root, you can press the set button. If the process has appropriate permission, the time will be set to correspond to that shown on the buttons. If the process is unable to set the time, you’ll get a visible error message in the form of an error message widget, which will hang around for a full minute before it goes away; you won’t be able to operate any of the controls on xpanel again until the error message unrealizes.
WIDGET TREE
Here is the widget tree for xpanel, useful in setting resources:
xpanel − xpanel
Form − frame
Form − panel
Form − volume
Command − button
Label − meter
Scbar − scroll
Form − pitch
Command − button
Label − meter
Scbar − scroll
Form − duration
Command − button
Label − meter
Scbar − scroll
Form − click
Command − button
Label − meter
Scbar − scroll
Form − acceleration
Command − button
Label − meter
Scbar − scroll
Form − threshold
Command − button
Label − meter
Scbar − scroll
Form − timeout
Command − button
Label − meter
Scbar − scroll
Form − interval
Command − button
Label − meter
Scbar − scroll
Form − colors
Command − button
Label − meter
Scbar − scroll
Form − menu
Command − quit
Command − undo
Command − default
Command − reread
Command − lock
Command − led
Command − repeat
Command − blank
Command − expose
Form − lights
Label −
Label −
Label −
Label −
Label −
Label −
Label −
Label −
Label −
Form − readouts
Label − red
Label − green
Label − blue
Command − enable
Command − weekday
Command − month
Command − day
Command − year
Command − hour
Command − minute
Command − second
Command − set
Command − run
TransientShell − please
Box − box
Label − wait
TransientShell − error
Box − box
Label − error
2. xpanel Widget tree
Note that the Label widgets’ names are “ ” (a space). It is indeed possible to set resources in these widgets:
xpanel∗ ∗bitmap: bulb.pb
RUN BUTTON
Pressing on the run button executes the runJob resource, if it has been set.
WAIT POPUP
When you push the run button, a widget pops up and stays popped until the job finishes. The default label for this widget is wait; users have control, as usual, over all the resources of this popup. The parent popup is please, its immediate child is box, and the label widget itself is wait.
APPLICATION SPECIFIC RESOURCES
Resource names are shown in fixed space below, while the class names follow in parentheses; the type of the resource is shown in square brackets.
allowExposures (AllowExposures) [Boolean]
Controls the allowExpose user preference setting on the server; True means to allow such exposures, while False means to not allow such exposures. If this resource is set, the setting becomes the user’s default, or the setting that will be restored when the undo button is pressed.
bellDuration (BellDuration) [int]
Controls the user default setting for bell duration in milliseconds. If set, the value becomes the value restored on undo.
bellDurationMax (BellDurationMax) [int]
Sets the maximum allowable value for the duration scrollbar. Any positive integer is a legal value but not all servers may honor unreasonable requests.
bellPitch (BellPitch) [int]
Controls the user default setting for bell pitch in hertz. If set, the value becomes the value restored on undo.
bellPitchMax (BellPitchMax) [int]
Sets the maximum allowable pitch setting; the range of the scrollbar is scaled so that as the maximum is set lower, the granularity of the scrollbar grows larger. If you can’t hear above 15000 hertz, this resource is for you.
bellVolume (BellVolume) [int]
Controls the user default volume setting; if set, the value becomes the value restored on undo.
bellVolumeMax (BellVolumeMax) [int]
Sets the maximum allowable bell volume in percent.
blinkClock (BlinkClock) [Boolean]
This resource indicates whether the time display widgets should be continuously updated every update seconds or not. The default setting is False; if it is True, then the time display will change from sensitive to insensitive, and will be updated, every update seconds. See the update resource, below.
buttonOnBackground (Background) [Pixel]
This resource controls the background color of the buttons above each scrollbar when the button has been pressed to put the scrollbar in the on, or event−receiving, state.
buttonOnForeground (Foreground) [Pixel]
Controls the foreground color for scrollbar buttons in the on state.
click (Click) [int]
Controls the user default setting of the keyboard click value in percent; if set, the value becomes the value restored by pressing undo.
clickMax (ClickMax) [int]
Sets the maximum allowable keyclick percent.
fillBitmap (FillBitmap) [Bitmap file name]
The bitmap created from this file name, if set and if the file exists, will be used to fill the background of the scrollbars; an example bitmap is provided with this distribution that sets the background with guaged markings at 4−pixel intervals (guage.bm).
lightOff (Background) [Pixel]
Controls the color used to indicate the on state of pushbutton user preferences. On a monochrome display, this is white.
lightOn (Foreground) [Pixel]
Controls the color used to indicate the off state of pushbutton user preferences. On a monochrome display, this is black.
meterFormat (MeterFormat) [%format string]
This is a standard printf format string; it is used in displaying the numeric value shown in the meter widgets associated with the scrollbars. The default value is “%d”; any legal printf value is allowed, so that you may set it to display in hex or octal and any number of digits. The only restriction is that the format string be suitable for integer or unsigned values; anything else will probably cause a core dump, for which the user must take responsibility.
mouseAcceleration (MouseAcceleration) [int]
Controls the default acceleration setting; if set, the value will be reset whenever the undo button is pushed.
mouseAccelerationMax (MouseAccelerationMax) [int]
Controls the maximum value allowed for the acceleration scrollbar; the default value is 10, which is probably too fast.
mouseThreshold (MouseThreshold) [int]
Controls the default threshold setting; if set, the value will be reset whenever the undo button is pushed.
mouseThresholdMax (MouseThresholdMax) [int]
Controls the maximum allowable value of the threshold scrollbar; its default is 1000, which is probably too much.
preferBlanking (PreferBlanking) [String]
Controls the default user preference setting for allowBlank; if set, the value becomes the value restored when the undo button is pushed. True turns on screen blanking; False turns it off.
repeatMode (RepeatMode) [String]
Controls the user default setting of global keyboard repeat; if set, the value is what is restored on undo. Legal values are AutoRepeatModeOn and AutoRepeatModeOff.
rgbFormat (RGBFormat) [String]
This is a standard printf format string; it is used in displaying the numeric value shown in the readout widgets associated with the colors scrollbar background. The default value is “0x%03x”; any legal printf value is allowed, so that you may set it to display in decimal or octal and any number of digits. The only restriction is that the format string be suitable for unsigned short values; anything else will probably cause a core dump, for which the user must take responsibility.
runJob (RunJob) [String]
This resource is a string that is sent to /bin/sh as a command line. Any string that the shell will accept is legal; one possibility might be xmodcmap (X). Clicking on the run button executes the job, if the resource is set.
saverInterval (SaverInterval) [int]
Sets the user default for interval; if set, this value is restored when undo is pressed.
saverIntervalMax (SaverIntervalMax) [int]
Controls the maximum value for the interval scrollbar; the default is 1000 seconds.
saverTimeout (SaverTimeout) [int]
Sets the user default for timeout; if set, this value is restored when undo is pressed.
saverTimeoutMax (SaverTimeoutMax) [int]
Controls the maximum value for the timeout scrollbar; the default is 2000 seconds.
scrollee (Scrollee) [String]
Valid values for this resource are any of the names of the various scrollbars; volume, pitch, duration, click, acceleration, threshold, timeout, interval and colors. If this resource is set to one of the foregoing names, then that scrollbar will be incremented by upVal every update seconds. No decrement is available.
update (Update) [int]
If blinkClock is true and this resource is set to a value greater than 0, the time display will be updated every update seconds. If the scrollee resource is also set to a valid scrollbar name, then that scrollbar will be incremented every update seconds. If both blinkClock and scrollee are set correctly, then both clock and scrollbar are updated.
upVal (UpVal) [int]
This resource controls the increment value used when the scrollee scrollbar is incremented. The default value is one.
There are no special translations supplied for any of the normal Athena widgets; for translations on the Scbar widget, see the next section.
SCBAR WIDGET RESOURCES
All the Core widget resources apply; the resources availble for the Scbar widget follow. Note that many of these resources are either not settable from user resources or, if set by user resources, are overridden by xpanel.
changeProc (Callback) [XtCallbackProc]
A procedure to call when the scrollbar value changes; not settable from user resources.
greaterDown (Greater) [Boolean]
If True, the minimum value is at the top of a vertical scrollbar and the maximum (greater) value is at the bottom. The default setting is False, and puts the maximum at the top.
greaterRight (Greater) [Boolean]
For a horizontal scrollbar, setting this value to True places the greater value at the right−hand side; the default setting is False, which places the maximum at the left. For scrollbars that have the orientation both, values increase in the appropriate direction according to the settings of the greaterDown and greaterRight resources; you may mix and match.
knobBackground (Foreground) [Pixel]
Controls the color of the background of the scrollbar knob.
knobBitmap (Bitmap) [Bitmap file name]
If you wish a bitmap placed into the knob as part of the background, specify the name of a file here. No default.
knobBorder (BorderWidth) [int]
The border width, in pixels, of the border around the scrollbar knob. Unlike standard widgets, this border width is subtracted from the area of the knob; thus, if knobWidth and knobHeight are both 20 (the default), then the area left for the knob proper is really 16x16 (since the knobBorder default value is 2).
knobBorderColor (Background) [Pixel]
Color of the border surrounding the scrollbar knob.
knobForeground (Foreground) [Pixel]
Color of the foreground of the knob.
knobHeight (KnobHeight) [int]
Height, in pixels, of the knob. The default value is 20.
knobWidth (KnobWidth) [int]
Width, in pixels, of the knob. The default value is 20.
orientation (Orientation) [String]
Legal values are vertical, horizontal or both; xpanel sets this to vertical.
scrollCursor (Cursor) [cursor name/filename]
The value of this resource can be either the name of any standard cursor from the cursor font, or it can be the name of a bitmap file from which to construct a pixmap cursor. The default cursor is “fleur,” from the cursor font.
smoothScroll (SmoothScroll) [Boolean]
startProc (Callback) [XtCallbackProc]
A callback called when the scrolling is started. Not settable from user resources.
stopProc (Callback) [XtCallbackProc]
A callback called when the scrolling is stopped. Not settable from user resources.
stretchKnob (StretchKnob) [Boolean]
A setting of True means to stretch the knob dimensions to either the width or height of the scrollbar, depending on the orientation. A setting of False, the default under xpanel, indicates that the measurement not be stretched. This resource is ignored if the orientation is set to both.
warpPointer (WarpPointer) [Boolean]
The default setting is True, which means that if you scroll the knobs by using the keyboard arrow keys the mouse pointer will be warped to the center of the knob. False disables this highly desirable feature.
xMax (XMax) [int]
Sets the maximum value for the range of the scrollbar in the X direction; this is overridden by xpanel.
xMin (XMin) [int]
Sets the minimum value for the range of the scrollbar in the X direction; this is overridden by xpanel.
xValue (XValue) [int]
Sets the current X value for the scrollbar; this is overridden by xpanel and by any scrolling of the knob.
yMax (YMax) [int]
Sets the maximum value for the range of the scrollbar in the Y direction; this is overridden by xpanel.
yMin (YMin) [int]
Sets the minimum value for the range of the scrollbar in the Y direction; this is overridden by xpanel.
yValue (YValue) [int]
Sets the current Y value for the scrollbar; this is overridden by xpanel and by any scrolling of the knob.
The default translations supplied by the Scbar widget are:
<BtnDown>: StartScroll() MoveKnob() NotifyScroll() \n\
<BtnMotion>: MoveKnob() NotifyScroll() \n\
<BtnUp>: StopScroll() \n\
<KeyPress>Up: MoveOne(^,1) NotifyScroll() \n\
<KeyPress>Down: MoveOne(v,1) NotifyScroll() \n\
<KeyPress>Left: MoveOne(<,1) NotifyScroll() \n\
<KeyPress>Right: MoveOne(>,1) NotifyScroll()
3. Default Scbar translations
The associated actions are:
| Action | Parameters | Description |
| StartScroll | None | Starts scrolling; calls startProc |
| MoveKnob | None | Moves the knob; calls changeProc |
| NotifyScroll | None | Notifies the scrollbar that its value has changed |
| StopScroll | None | Stops scrolling; calls stopProc |
| MoveOne | direction (^,V,<,>); increment | Moves the knob increment pixels in direction∗. |
4. Scbar actions
∗Note: direction is one of ^, V, v, < or >; V is a synonym for v. When the arrow keys are pressed, the knob will move towards the minimum (<, ^) or maximum (>, V, v) end of the scrollbar by one increment at a time. This means that if the minimum value of the scrollbar is at the visual bottom, then pressing the Up arrow key will make the knob move down. See “SPECIAL CONSIDERATIONS”, below.
SEE ALSO
xset(1), xmodcmap(1), xmodmap(1), xrdb(1).
BUGS AND SPECIAL CONSIDERATIONS
No bugs are known.
The following lists the fallback resources, which you will get if you provide nothing to override them:
XPanel∗volume∗button∗Label: volume
XPanel∗pitch∗button∗Label: pitch
XPanel∗duration∗button∗Label: duration
XPanel∗click∗button∗Label: click
XPanel∗acceleration∗button∗Label: acceleration
XPanel∗threshold∗button∗Label: threshold
XPanel∗timeout∗button∗Label: timeout
XPanel∗interval∗button∗Label: interval
XPanel∗colors∗button∗Label: colors
XPanel∗Scbar∗Translations:#override \n\
<KeyPress>Up: MoveOne(V,1) NotifyScroll() \n\
<KeyPress>Down: MoveOne(^,1) NotifyScroll()
5. Button labels
If you would rather use bitmaps in your buttons, you could instead add these resource settings (all the bitmaps below are provided with this distribution):
XPanel∗fillBitmap: guage.bm
XPanel∗lock∗bitmap: padlock.pb
XPanel∗blank∗bitmap: blank.pb
XPanel∗expose∗bitmap: expose.pb
XPanel∗colors∗button∗bitmap: palette.pb
XPanel∗volume∗button∗bitmap: twonote.pb
XPanel∗pitch∗button∗bitmap: twonote.pb
XPanel∗duration∗button∗bitmap: twonote.pb
XPanel∗acceleration∗button∗bitmap: mouse.pb
XPanel∗threshold∗button∗bitmap: mouse.pb
XPanel∗interval∗button∗bitmap: tv.pb
XPanel∗timeout∗button∗bitmap: tv.pb
XPanel∗click∗button∗bitmap: cricket.pb
XPanel∗ ∗bitmap: bulb.pb
6. Button bitmaps
If you wish to modify your color values, or otherwise manipulate your color values, use xmodcmap as your runJob:
XPanel∗runJob: xmodmcmap &
FILES
The following bitmap files are supplied with this distribution, and should be installed in a standard location on your system:
bulb.pbcricket.pbtv.pb
mouse.pbtwonote.pbpalette.pb
expose.pbblank.pbpadlock.pb
guage.bm