FVWMICONMAN(1) | Fvwm Modules | FVWMICONMAN(1) |
FvwmIconMan - an fvwm icon manager
FvwmIconMan is spawned by fvwm, so no command line invocation will work.
FvwmIconMan is an icon manager modeled after the TWM icon manager. The user may have multiple icon managers, each of which armed with a list of window types which it manages. For example, the user may have one manager which lists only emacs windows, and another which lists everything else. You may also specify what resolution each icon manager uses, for example, one icon manager may manage windows on all desks, and another may manage only those on the current desk, page or screen. FvwmIconMan can display the miniature icons provided by fvwm for its managed windows. The managers may have a maximum number of columns (and so grows vertically), a maximum number of rows (and then grows horizontally), or stay at a fixed size, and adjust the size of the window buttons to fit (think win95’s Taskbar). And when support is compiled in for the X Shape extension, then the manager windows may be shaped.
You can specify actions to be run when mouse, or key events are received. For example, you could bind the first mouse button to iconify the selected window, and make bindings for the arrow keys to navigate the manager window without the mouse.
FvwmIconMan can be set to display which window currently has the keyboard focus, and by binding the select event (see below) to the fvwm Focus function, you can emulate the TWM icon manager’s behavior.
During initialization, FvwmIconMan searches though the fvwm configuration file for the options which are described below. It is highly recommended that you make FvwmIconMan be a sticky window. And if you want to make use of the followfocus option, and/or binding an action to Focus, then you should make FvwmIconMan clicktofocus. Also, when using the Shape option, it’s recommended that the FvwmIconMan window not be decorated at all by fvwm.
FvwmIconMan can be invoked by inserting the line 'Module FvwmIconMan' in the .fvwm2rc file. If FvwmIconMan is to be spawned during fvwm’s initialization, then this line should be placed in the StartFunction declarations, or it can be bound to a menu, mouse button, or keystroke to invoke it later.
If you wish to run FvwmIconMan in a transient mode, such as with the built in window list, then pass "-Transient" as an argument. The invocation "Module FvwmIconMan -Transient" will do nicely. In this mode, FvwmIconMan will pop up one manager window directly under the cursor. When the mouse button is released, it will execute the appropriate action, and then exit. Things are somewhat complicated by the fact that you can specify that FvwmIconMan creates multiple manager windows, behavior which is unsuitable when running transiently. So, when running transiently, FvwmIconMan will only create one manager window. Use the manager id 'transient' to specify options for this manager window.
FvwmIconMan may accept an alias name as an argument. For example, "Module FvwmIconMan FvwmIconMan-Variant2".
FvwmIconMan has acquired quite a few options. I assume others share my dislike of paging though a long man page, so here is a terse reference chart describing the available options. They are described in more detail in the next section.
Name Description Default NumManagers number of managers 1 Action binds command to event Mouse 0 N sendcommand Iconify Background default background gray ButtonGeometry size of button in pixels Colorset default colorset DontShow list of windows to ignore DrawIcons use mini icons false FocusAndSelectButton flat grey black FocusAndSelectColorset FocusButton style for focused buttons up grey black FocusColorset FollowFocus show which win has focus false Font 8x13 Foreground default text color white Format describes button label "%c: %i" IconName manager icon name FvwmIconMan IconAndSelectButton up black grey IconAndSelectColorset IconButton style for icon buttons up black grey IconColorset ManagerGeometry size of manager in buttons 0x1 MaxButtonWidth max width of a button MaxButtonWidthByColumns NoIconAction animate iconification NOP PlainButton style for normal buttons up black grey PlainColorset ReliefThickness size of button relief 2 Resolution window filters desk page Reverse normal, icon or none none SelectButton style for selected buttons flat black grey SelectColorset Shape use shape extension false Show list of windows to show ShowOnlyIcons only icons visible false ShowNoIcons icons are not displayed false ShowTransient transient windows visible false ShowOnlyFocused only focused visible false Sort keep managers sorted name SortWeight weight for sorting Tips Tool Tips mode none TipsDelays Tool Tips mapping delays 1000 300 TipsFont Font for Tool Tips default fvwm font TipsColorset Tool Tips Colorset 0 TipsFormat describes Tips label the Format value TipsBorderWidth Tool Tips border size 1 TipsPlacement Tips placement vs button updown TipsJustification Tips Just vs button leftup TipsOffsets Tips placement Offsets 3 2 Title manager title FvwmIconMan TitleButton style for title button raisededge black grey TitleColorset UseWinList honor WinListSkip? true
With the exception of the nummanagers option, all of the options may be defined on a per-manager basis. So, for example, the user may have his emacs manager with a red foreground, and his xterm manager with a blue one. A configuration line may therefore have one of two forms:
*FvwmIconMan: OptionName OptionValue
*FvwmIconMan: ManagerId OptionName OptionValue
The old syntax, that uses an asterisk instead of white spaces before ManagerId and OptionName, is supported too, but it is obsolete now.
The following options may be specified:
*FvwmIconMan: NumManagers num
*FvwmIconMan: [id] Action type binding
*FvwmIconMan: [id] Background background
*FvwmIconMan: [id] ButtonGeometry geometry
*FvwmIconMan: [id] Colorset colorset
*FvwmIconMan: [id] DrawIcons value
*FvwmIconMan: [id] FocusAndSelectButton style [forecolor backcolor]
*FvwmIconMan: [id] FocusAndSelectColorset colorset
*FvwmIconMan: [id] FocusButton style [forecolor backcolor]
*FvwmIconMan: [id] FocusColorset colorset
*FvwmIconMan: [id] FollowFocus boolean
*FvwmIconMan: [id] Font font
*FvwmIconMan: [id] Foreground foreground
*FvwmIconMan: [id] Format formatstring
*FvwmIconMan: [id] IconName iconstring
*FvwmIconMan: [id] IconAndSelectButton style [forecolor backcolor]
*FvwmIconMan: [id] IconButton style [forecolor backcolor]
*FvwmIconMan: [id] IconAndSelectColorset colorset
*FvwmIconMan: [id] IconColorset colorset
*FvwmIconMan: [id] ManagerGeometry geometry
*FvwmIconMan: [id] MaxButtonWidth width
*FvwmIconMan: [id] MaxButtonWidthByColumns col
*FvwmIconMan: [id] NoIconAction action
*FvwmIconMan: [id] PlainButton style [forecolor backcolor]
*FvwmIconMan: [id] PlainColorset colorset
*FvwmIconMan: [id] ReliefThickness num
*FvwmIconMan: [id] Resolution [filter(s)]
Notes: page and desk are independent. If the only filter is page, then you will see windows on the current page on all desks. To only see windows on the current page and desk (the default) you need both filters, 'desk page'. You can only have one of desk/!desk, page/!page, or screen/!screen, the last one issued take precedence. The invert filter reverses the whole filter so 'invert desk page' is not the same as '!desk !page'. Sticky windows are visible on all pages and desks, so they match all page and desk filters, but won’t match the inverted filter.
The filters can take additional parameters to state which desk, page, or screen to show (or not show). [!]desk [n] can take the desk number, which will only show windows (not) on the stated desk. [!]page [x] [y] can take the horizontal, x, and vertical, y, page numbers, which will only show windows (not) on the stated page.
[!]screen [S] shows windows (not) on monitor S, which can be:
NAME: The "NAME" of the specific RandR monitor.
c: The current RandR monitor (containing the pointer)
p: The primary RandR monitor
g: The global monitor
Since all windows are on the global monitor, screen g effectively does nothing. c is the current monitor at the time resolution is issued, and once set will not change. This filter is best used with a RandR NAME.
This configuration line is respected when FvwmIconMan is running as well, the resolution is changed dynamically when sent to fvwm.
*FvwmIconMan: [id] Reverse class
*FvwmIconMan: [id] SelectButton style [forecolor backcolor]
*FvwmIconMan: [id] SelectColorset colorset
*FvwmIconMan: [id] Shape boolean
*FvwmIconMan: [id] Sort value
*FvwmIconMan: [id] SortWeight weight pattern-list
*FvwmIconMan: Sort weighted
*FvwmIconMan: SortWeight 1 class=XTerm title=special*
*FvwmIconMan: SortWeight 10 class=XTerm
*FvwmIconMan: SortWeight 5
In this example, xterm windows whose titles start with "special" (weight 1) are listed first, followed by everything but other xterms (weight 5), and the other xterms (weight 10) are listed last. If no default weight (empty pattern list) is given, the default weight is 0. Only relevant if the sort type is set to weighted.
*FvwmIconMan: [id] Title title-string
*FvwmIconMan: [id] TitleButton style [forecolor backcolor]
*FvwmIconMan: [id] UseWinList boolean
The two following options control which windows get handled by which managers. A manager can get two lists, one of windows to show, and one of windows to ignore. If only the show list is given, then that manager will show only the windows in the list. If only the DontShow list is given, then the manager will show all windows except those in the list. If both lists are given, then a window will be shown if it is not in the DontShow list, and in the Show list. And finally, if neither list is given, then the manager will handle all windows. Each list is made up of patterns of the form type=pattern, where type is one of class, resource, title, or icon, and pattern is an expression of the same format used in the fvwm style command (minimalistic shell pattern matching). Quotes around the pattern will be taken as part of the expression. If a window could be handled by more than one manager, then the manager with the lowest id gets it.
*FvwmIconMan: [id] Show pattern list
*FvwmIconMan: [id] DontShow pattern list
*FvwmIconMan: [id] ShowTransient boolean
*FvwmIconMan: [id] ShowOnlyIcons boolean
*FvwmIconMan: [id] ShowNoIcons boolean
*FvwmIconMan: [id] ShowOnlyFocused boolean
The following two options control tips.
*FvwmIconMan: [id] Tips value
*FvwmIconMan: [id] TipsDelays delay [mappeddelay]
*FvwmIconMan: [id] TipsFont fontname
*FvwmIconMan: [id] TipsColorset colorset
*FvwmIconMan: [id] TipsFormat formatstring
*FvwmIconMan: [id] TipsBorderWidth pixels
*FvwmIconMan: [id] TipsPlacement value
*FvwmIconMan: [id] TipsJustification value
*FvwmIconMan: [id] TipsOffsets placementoffset justoffset
Actions are commands which may be bound to an event of the type: a key press, a mouse click, or the mouse entering a window manager button - denoted by the action types Key, Mouse, and Select.
Normally, actions bound to a mouse click are executed when the button is pressed. In transient mode, the action is executed when the button is released, since it is assumed that FvwmIconMan was bound to some mouse event. A tip/warning: FvwmIconMan still keeps track of the mouse button and any modifier keys in this case, so if you bind FvwmIconMan to say, meta-button3, then it would be wise to ensure that the action you want to execute will be executed when the meta-button3 event occurs (which would be the button release, assuming you kept your finger on the meta key).
The syntax for actions are:
Key actions: Key Keysym Modifiers FunctionList
Mouse actions: Mouse Button Modifiers FunctionList
Select actions: Select FunctionList
Most of the available commands then modify this "current" button, either by moving it around, making it become the selected button, or sending commands to fvwm acting on the window represented by that button. Note that while this current button is initialized to be the selected button, the selected button does not implicitly follow it around. This way, the user can send commands to various windows, without changing which button is selected.
Commands take five types of arguments: Integer, Manager, Window, Button, and String. A String is a string specified exactly as for fvwm - either in quotes or as a single word not in quotes. Again, you may bind a sequence of commands to an event, by listing them separated by commas.
Window and Button types look exactly the same in the .fvwm2rc file, but are interpreted as either specifying a managed window, or a FvwmIconMan button representing a window. They can either be an integer (which is interpreted module N where N is the number of buttons - so 0 is the first and -1 is the last), or one of the strings: Select, Focus, Up, Down, Right, Left, Next, Prev. Select and Focus refer to the currently selected or focused button or window. Up, Down, Right, and Left refer to the button or window above, below, to the right of, or to the left of the current button in the manager window, allowing navigation around the manager window. Next and Prev designates the window, button, or manager after or before the current button, allowing navigation of the one dimensional list of windows which is drawn in the manager window. If the manager is sorted, Next and Prev move through the windows in the sorted order.
The Manager type can either be an integer, Next, or Prev. The meaning is analogous to that of the Button type, but in terms of the integral index of the managers, restricted to managers which are nonempty.
The following functions are currently defined:
bif Button Integer/String
bifn Button Integer/String
gotobutton Button
gotomanager Manager
jmp Integer/String
label String
print String
printdebug
quit
refresh
ret
searchback String
searchforward String
select
sendcommand Command
warp
Examples: gotobutton select, gotobutton Down, select
Selects the button below the currently selected button. Since the current button is already initialized to the selected button, this may be shortened to "gotobutton Down, select".
gotobutton Up, select
Selects the button above the currently selected button.
gotobutton 0, select
Selects the first button of the current manager. If there is no current manager, which is the case when no button is selected, then this does nothing.
gotobutton -1, select
Selects the last button of the current manager.
gotobutton focus, select
Selects the button corresponding to the focused window.
gotobutton focus, Iconify
Sends the fvwm command Iconify to the focused window. Note that this does not change the selected button.
bif Next 3, gotobutton 0, select, ret, gotobutton Next, select
If a button is selected, and it’s the last button, go to button 0. If it’s not the last button, go to the next button. Otherwise, do nothing. Basically, this action cycles through all buttons in the current manager.
bif select 7, bif focus 3, gotomanager 0, select, ret, gotobutton focus, \ select, ret, gotobutton down, select
This is good for sending to FvwmIconMan with a SendToModule command. If there is a selected button, it moves down. Otherwise, if there is a focused button, it is selected. Otherwise, button 0 of manager 0 gets selected.
bif select Select, bif focus Focus, gotomanager 0, select, ret, label Focus, \ gotobutton focus, select, ret, label Select, gotobutton down, select
Same as previous, but using the label instruction.
In addition to being bound to keys and mice, actions can be sent from fvwm to FvwmIconMan via the SendToModule command. Don’t quote the command when using SendToModule. Also, due to a bug in the current version of fvwm, don’t quote FvwmIconMan either.
This first example is of a the simplest invocation of FvwmIconMan, which only has one manager, and handles all windows:
############################################################## # Load any modules which should be started during # fvwm initialization ModulePath /usr/lib/X11/fvwm:/usr/bin/X11 Module FvwmIconMan # Make FvwmIconMan title-bar-less, sticky, and give it an icon Style "Fvwm*" Icon toolbox.xpm,NoTitle,NoHandles,Sticky Style "FvwmIconMan" HandleWidth 5, Handles, BorderWidth 5 ############################################################## ############################################################## #Definitions used by the modules *FvwmIconMan: NumManagers 1 *FvwmIconMan: Resolution global *FvwmIconMan: Background slategrey *FvwmIconMan: Foreground white *FvwmIconMan: Font 7x13 *FvwmIconMan: ButtonGeometry 100x0 *FvwmIconMan: ManagerGeometry 1x0-0+0
This example is the Reader’s Digest version of my personal configuration. It has two managers, one for emacs and one for everything else, minus things with no icon title. Only windows on the current page are displayed. The use of the drawicons and shape options requires that fvwm and FvwmIconMan are compiled with the correct options. Note how the geometry and show options are specified per manager, and the others are common to all:
Style "FvwmIconMan" NoTitle, Sticky, WindowListSkip, BorderWidth 0 Style "FvwmIconMan" HandleWidth 0 Key F8 A N SendToModule FvwmIconMan bif select Select, bif focus Focus, \
gotomanager 0, select, sendcommand WarpToWindow, ret, label Focus, \
gotobutton focus, select, sendcommand WarpToWindow, ret, label Select, \
gotobutton prev, select, sendcommand WarpToWindow Key F9 A N SendToModule FvwmIconMan bif select Select, bif focus Focus, \
gotomanager 0, select, sendcommand WarpToWindow, ret, label Focus, \
gotobutton focus, select, sendcommand WarpToWindow, ret, label Select, \
gotobutton next, select, sendcommand WarpToWindow *FvwmIconMan: NumManagers 2 *FvwmIconMan: Resolution page *FvwmIconMan: Background steelblue *FvwmIconMan: Foreground white *FvwmIconMan: Font 7x13 *FvwmIconMan: UseWinList true *FvwmIconMan: DrawIcons true *FvwmIconMan: Shape true *FvwmIconMan: FollowFocus true *FvwmIconMan: Sort name *FvwmIconMan: PlainButton up white steelblue *FvwmIconMan: SelectButton down white steelblue *FvwmIconMan: FocusButton up white brown *FvwmIconMan: FocusAndSelectButton down white brown *FvwmIconMan: TitleButton raisededge white steelblue *FvwmIconMan: NoIconAction "SendToModule FvwmAnimate animate" *FvwmIconMan: 1 Title "Emacs windows" *FvwmIconMan: 1 IconName "FvwmIconMan: Emacs" *FvwmIconMan: 1 Format "%i" *FvwmIconMan: 1 Show resource=emacs resource=gemacs *FvwmIconMan: 1 ManagerGeometry 1x0-400+0 *FvwmIconMan: 1 ButtonGeometry 200x0 *FvwmIconMan: 2 Title "All windows" *FvwmIconMan: 2 IconName "FvwmIconMan: all" *FvwmIconMan: 2 Format "%c: %i" *FvwmIconMan: 2 DontShow icon=Untitled *FvwmIconMan: 2 ManagerGeometry 2x4-0+0 *FvwmIconMan: 2 ButtonGeometry 200x0 *FvwmIconMan: transient Geometry 194x100 *FvwmIconMan: transient DontShow icon=Untitled *FvwmIconMan: transient Action Mouse 0 A sendcommand select select Iconify *FvwmIconMan: Action Mouse 1 N sendcommand Iconify *FvwmIconMan: Action Mouse 2 N sendcommand WarpToWindow *FvwmIconMan: Action Mouse 3 N sendcommand "Module FvwmIdent FvwmIdent" *FvwmIconMan: Action Key Left N gotobutton Left, select *FvwmIconMan: Action Key Right N gotobutton Right, select *FvwmIconMan: Action Key Up N gotobutton Up, select *FvwmIconMan: Action Key Down N gotobutton Down, select *FvwmIconMan: Action Key q N quit
There is one bug that I know of. A honest to goodness solution to this would be appreciated. When an icon manager is set to grow upwards or leftwards, on some machines it may wander occasionally.
It doesn’t handle windows without resource names as gracefully as it should.
Brady Montz ( <bradym@cs.arizona.edu>).
Thanks to:
David Berson <berson@cs.pitt.edu>,
Gren Klanderman <greg@alphatech.com>,
David Goldberg <dsg@mitre.org>,
Pete Forman <gsez020@compo.bedford.waii.com>,
Neil Moore <amethyst@maxwell.ml.org>,
Josh M. Osborne <stripes@va.pubnix.com,
Adam Rice <wysiwyg@glympton.airtime.co.uk>,
Chris Siebenmann <cks@hawkwind.utcs.toronto.edu>,
Bjorn Victor <victor@delial.docs.uu.se>. for contributing either code or truly keen ideas.
2023-01-17 |