Difference between revisions of "FVWM"

From ArchWiki
Jump to: navigation, search
(Starting FVWM: from FVWM official faq: we completely returned to the "fvwm" name. fvwm2 is symlinked to fvwm, so its superflous to list it as an alternative)
(Configuration: mention that fvwm ships with a new default config)
 
(36 intermediate revisions by 13 users not shown)
Line 1: Line 1:
[[Category:Stacking WMs]] [[it:FVWM]]
+
[[Category:Stacking WMs]]
 +
[[de:FVWM]]
 +
[[it:FVWM]]
 +
[[ja:FVWM]]
 
[[ru:FVWM]]
 
[[ru:FVWM]]
 
[[zh-CN:FVWM]]
 
[[zh-CN:FVWM]]
FVWM is a stable, powerful, efficient, and ICCCM-compliant multiple virtual desktop window manager for the X Window system. It requires some effort to learn to use it well, since it is almost entirely configured by editing configuration files with a text editor, but those who persist end up with a desktop environment that works exactly the way they want it to work. Although using FVWM does not require an knowlege of programming languages, it is possible to extend the power of FVWM with [http://www.fvwm.org/documentation/manpages/stable/FvwmM4.php M4], [http://www.fvwm.org/documentation/manpages/stable/FvwmCpp.php C], and [http://www.fvwm.org/documentation/manpages/stable/FvwmPerl.php Perl] preprocessing. FVWM has a [http://www.fvwm.org/documentation/perllib/ Perl library] that makes creating FVWM modules in Perl possible and easy. Development is active, and support is excellent. And for those who wonder, FVWM means Feeble Virtual Window Manager.
+
{{Related articles start}}
 +
{{Related|Window manager}}
 +
{{Related articles end}}
 +
FVWM is an ICCCM-compliant multiple virtual desktop window manager for the X Window system. It is configured by editing text-based configuration files. Although using FVWM does not require any knowledge of programming languages, it is possible to extend FVWM with [http://www.fvwm.org/documentation/manpages/stable/FvwmM4.php M4], [http://www.fvwm.org/documentation/manpages/stable/FvwmCpp.php C], and [http://www.fvwm.org/documentation/manpages/stable/FvwmPerl.php Perl] preprocessing. FVWM also has a [http://www.fvwm.org/documentation/perllib/ Perl library] which allows one to create [[#Modules|modules]]. FVWM stands for F Virtual Window Manager. The official stance is that the F does not stand for anything in particular [http://fvwm.org/documentation/faq/#what-does-fvwm-stand-for].
  
==Installing FVWM==
+
== Installing ==
  
[[pacman|Install]] the package {{Pkg|fvwm}} which is available in the [[Official Repositories|official repositories]].
+
[[Install]] {{Pkg|fvwm}} or {{AUR|fvwm-cvs}} (for the development version). Alternatively, you can install {{AUR|fvwm+}} which provides a patched version of FVWM.
  
You can also install {{AUR|fvwm-patched}} from the [[Arch User Repository|AUR]], or if you have archlinuxfr (see [[Unofficial user repositories]]) added to your {{ic|/etc/pacman.conf}} it can be installed with [[pacman]] like a regular package.
+
The following packages provide themes and icons for FVWM: {{Pkg|fvwm-crystal}}, {{AUR|fvwm-icons}}, {{AUR|fvwm-themes}}, {{AUR|fvwm-themes-extra}}. FVWM Crystal provides a separate session for a desktop environment like experience.
  
==Starting FVWM==
+
== Starting ==
  
FVWM will automatically be listed in kdm/gdm in the sessions menu. Otherwise, add  
+
Select ''FVWM'' from the session menu in a [[display manager]] of choice. Otherwise, add {{ic|exec fvwm}} to your user's {{Ic|.xinitrc}}.
exec fvwm
+
to your user's {{Ic|.xinitrc}}.
+
  
See [[xinitrc]] for details, such as preserving the logind (and/or consolekit) session.
+
For FVWM Crystal, select ''FVWM-Crystal'' from the session menu or add {{ic|exec fvwm-crystal}} to your user's {{ic|.xinitrc}}.
  
==Bringing Out its Power==
+
See [[xinitrc]] for details, such as preserving the logind session.
  
When you start FVWM for the first time, you will get something that looks very blank. When you left-click on the desktop, you will be able to select a very basic configuration for FVWM. Chose the modules you want and you are ready to get started. You will undoubtedly want to do more to create your desktop, so here are some tips:
+
=== Startup functions ===
  
*Although it is outdated, the Zensites FVWM beginners guide[http://zensites.net/fvwm/guide/] helps to understand how FVWM functions and how to build '''your''' basic setup.
+
{{Note|It is [http://www.fvwmforums.org/phpBB3/viewtopic.php?f=40&t=1505 recommended] that you only use the StartFunction and make use of the {{ic|Test}} command - explained below.}}
  
*The Gentoo Linux Wiki has a useful guide on configuration.[http://en.gentoo-wiki.com/wiki/FVWM/Configuration]
+
FVWM provides a number of functions to start modules or applications when initialising, restarting or exiting the window manager.
  
*The FVWM homepage[http://fvwm.org/] includes documentation[http://fvwm.org/documentation/], a FAQ [http://fvwm.org/documentation/faq/], and links to a Wiki[http://fvwmwiki.xteddy.org/]) and the FVWM forums[http://www.fvwmforums.org].
+
* StartFunction - executed when FVWM is first initialised and on restarts.
 +
* InitFunction - executed only when FVWM is first initialised.
 +
* RestartFunction - executed only when FVWM is restarted.
 +
* ExitFunction - executed when exiting FVWM.
  
*The best way to come up with the desktop you want is probably to check out the configurations in the FVWM forum[http://www.fvwmforums.org/phpBB3/viewforum.php?f=39&sid=468469f95f9a2a90cd9d5a0819d26eec] or at Box-Look.org,[http://www.box-look.org] choose one you like, install it, and modify it to taste.
+
You can add your own actions to any of these functions using the {{ic|AddToFunc}} command. For example, if one wanted to start ''network-manager-applet'' on startup (but not for any subsequent restarts of the window manager) one could add the ''nm-applet'' command to the InitFunction:
 +
AddToFunc InitFunction
 +
+ I Exec nm-applet &
  
*As you work with what other people have done, you may find it helpful to look at the tips on configuration files by Thomas Adam, the most active FVWM developer.[http://www.fvwmforums.org/phpBB3/viewtopic.php?f=40&t=1505]
+
You can also use just StartFunction and prepend your commands with Test commands which check whether the window manager has started or restarted and run the action only if the test is true. Using this method, ''nm-applet'' could be started in the following manner:
 +
AddToFunc StartFunction
 +
+ I Test (Init) Exec nm-applet &
  
*A page[http://web.archive.org/web/20070912061152/abdn.ac.uk/~u15dm4/fvwm/] in the [http://archive.org/ Internet Archive] is outdated, but seems to be the only significant online documentation for fvwm-patched.
+
== Configuration ==
  
*FVWM-Crystal, which is also in the Arch repositories as package {{Pkg|fvwm-crystal}}, is an add-on that makes FVWM much easier to configure, although the easier configuration allows much less flexibility than direct editing of configuration files.
+
The following configuration file locations are supported:
  
*[[XdgMenu]] is a useful utility for generating menus.
+
* {{ic|$HOME/.fvwm/config}}
 +
* {{ic|/usr/local/share/fvwm/config}}
  
*Fvwm plays well with [[xcompmgr]] for simple compositing effects.
+
The following configuration locations are supported as of version 2.6.7, but may not be supported in the future:
 +
* {{ic|$HOME/.fvwm/.fvwm2rc}}
 +
* {{ic|$HOME/.fvwm2rc}}
 +
* {{ic|/usr/local/share/fvwm/.fvwm2rc}}
 +
* {{ic|/usr/local/share/fvwm/system.fvwm2rc}}
 +
* {{ic|/etc/system.fvwm2rc}}
  
*Useful applications are similar to those suggested for [[Openbox]] or [[Fluxbox]].
+
As of version 2.6.7, FVWM ships with a new default configuration, located in {{ic|/usr/share/fvwm/default-config}}. As such, the older sample configuration files are no longer provided. However, they can still be viewed on [https://github.com/fvwmorg/fvwm/tree/4fc2bf68493c098da54af63cff3ebf3c58882a8d/sample.fvwmrc GitHub]. The [http://fvwm-themes.sourceforge.net/ fvwm-themes] project also provides ready-made configurations.
  
== References ==
+
{{Tip|You can split up your configuration into multiple files and then source those files from the main configuration file using the {{ic|read}} command. The syntax is {{ic|read /path/to/file}}.}}
  
# Zensites [http://zensites.net/fvwm/guide/ FVWM beginners guide].
+
=== The virtual desktop ===
# Gentoo Wiki [http://en.gentoo-wiki.com/wiki/FVWM/Configuration configuration guide].
+
 
# [http://fvwm.org/ FVWM Homepage].
+
For its virtual desktop, FVWM implements both workspaces (used by window managers such as Metacity and [[Openbox]]) and viewports (used by window managers such as Compiz). See [http://www.circuitousroot.com/artifice/programming/useful/fvwm/viewports/index.html] for a description of the differences between workspaces and viewports. FVWM refers to workspaces as desks and viewports as pages.
# FVWM Homepage [http://fvwm.org/documentation/ documentation].
+
 
# FVWM Homepage [http://fvwm.org/documentation/faq/ FAQ].
+
Pages in FVWM are arranged in a grid. The number of pages used can be defined with the {{ic|DesktopSize}} command. For instance, adding {{ic|DesktopSize 3x3}} to your configuration file will give you 9 pages, arranged in a 3x3 grid. Pages can be navigated using the [[#FvwmPager|pager module]] or with the {{ic|MoveToPage}} command which could be mapped to a keyboard shortcut or menu entry. For instance, the command {{ic|MoveToPage -1p +0p}} will move the viewport 1 page to the left of the current page.
# [http://fvwmwiki.xteddy.org/ FVWM Wiki].
+
 
# [http://www.fvwmforums.org FVWM Forums].
+
The number of desks available in FVWM is very large, the minimum desk number is -2147483648 and the maximum is 2147483647. By default, FVWM starts on desk 0. Desks can be navigated using the pager module (if it is configured to show a number of desks) or with the {{ic|MoveToDesk}} command - {{ic|MoveToDesk +1}} will move to the next desk, relative to the currently used desk.
# [http://www.fvwmforums.org/phpBB3/viewforum.php?f=39&sid=468469f95f9a2a90cd9d5a0819d26eec Configurations] in the FVWM forum.
+
 
# [http://www.box-look.org/ Box-Look].
+
=== Keyboard and mouse bindings ===
# Thomas Adam on [http://www.fvwmforums.org/phpBB3/viewtopic.php?f=40&t=1505 common mistakes in configuration files].
+
 
# [http://web.archive.org/web/20070912061152/abdn.ac.uk/~u15dm4/fvwm/ Fvwm Patches] in the [http://archive.org/ Internet Archive].
+
Keyboard or bindings can be defined in the configuration file with the {{ic|Key}} or {{ic|Mouse}} command. The syntax of the command takes the following form: {{ic|Key/Mouse ''(window)'' ''button/key name'' ''context'' ''modifiers'' ''action''}}. For instance, the following example will launch an XTerm on an {{ic|Alt+F2}} keypress: {{ic|Key F2 A 1 Exec xterm}}. Note that the {{ic|''(window)''}} argument is optional.
# [http://petermblair.com/2009/02/my-first-fvwm-module/ An example of a Fvwm module written in Perl]
+
 
 +
The context value defines where the binding will be applied. The following contexts are valid: '''R''' (root window), '''W''' (application window), '''D''' (desktop manager window - PCManFM desktop manager for instance), '''T''' (title bar), '''S''' (window side, top, bottom), '''[ ] - _''' (left side, right side, top, bottom respectively), '''F''' (window frame corners), '''< > ^ v''' (left, right, top, bottom corners respectively), '''I''' (icon window), '''0-9''' (titlebar buttons) and '''A''' (all contexts). Any combination of these letters is also acceptable.
 +
 
 +
The modifier value can be one of the following: '''A''' (any), '''C''' (control), '''S''' (shift), '''M''' (meta), '''N''' (none), or '''1-5''', representing the X Modifiers - run {{ic|xmodmap}} to see which X modifier is which. Multiple modifiers should not be spaced. For instance, to use the modifier {{ic|Control+Alt}}, you would supply as the modifier argument {{ic|C1}}.
 +
 
 +
The action must be an FVWM [[#Functions|function]] to run, such as the ''Quit'' function or ''Menu'' function. Execution of external commands, such as ''xterm'', can be achieved with the ''Exec'' function, as shown above.
 +
 
 +
=== Window decoration ===
 +
 
 +
==== Titlebar buttons ====
 +
 
 +
FVWM can provide up to 10 window buttons. These are numbered 0-9. Even numbers indicate buttons located on the right hand side of the titlebar whilst odd numbers indicate buttons located on the left. The layout is as follows:
 +
1 3 5 7 9    0 8 6 4 2
 +
Window buttons will remain hidden unless a {{ic|Mouse}} command is used which specifies one of the titlebar buttons as the context. For instance, to activate the rightmost titlebar button and make it close the window on a left click, one would use the following command:
 +
Mouse 1 2 A Close
 +
''Mouse'' is the name of the command, ''1'' is the mouse button, ''2'' is the number of the rightmost titlebar button, ''A'' is the modifier (any) and ''Close'' is the action to be taken. See [[#Keyboard and mouse bindings]] for more information.
 +
 
 +
==== Button styles ====
 +
 
 +
The style of your titlebar buttons can be configured with the {{ic|ButtonStyle}} command. This takes the following syntax:
 +
ButtonStyle ''button-number'' ''state'' ''style'' -- ''flag''
 +
 
 +
The state can be one of ''ActiveUp'', ''ActiveDown'', ''InactiveUp'', ''InactiveDown''. ''ActiveUp'' and ''ActiveDown'' refer to the un-pressed and pressed button states of the active window. Likewise for the Inactive states. One can also use just ''Active'' or ''Inactive'' which are shortcuts for both the pressed and un-pressed button states.
 +
 
 +
The style argument can be one of the following:
 +
* Simple - does nothing.
 +
* Default - takes argument of button number for default style to load.
 +
* Solid - fill button a solid color.
 +
* ColorSet - fill button with the ColorSet specified - takes an alpha argument between 0 and 100.
 +
* Vector - draws a line pattern - using the keyword Vector is optional as this is a standard style.
 +
* ?Gradient - fills the button with a gradient - see the FVWM man page Color Gradients section for the syntax.
 +
* Pixmap - fills the button with a given pixmap - see also the following variants: AdjustedPixmap, ShrunkPixmap, StretchedPixmap, TiledPixmap.
 +
* MiniIcon - fills the button with the window's mini icon.
 +
 
 +
A number of vector styles are documented [https://web.archive.org/web/20150905091146/http://www.fvwm.org/screenshots/vectorbuttons/ here]. You can also create your own vector buttons using this [http://gromnitsky.users.sourceforge.net/js/fvwm-vector/ vector buttons viewer].
 +
See [https://web.archive.org/web/20150905124404/http://www.fvwm.org/screenshots/windowdecors/ this page] for some example decoration configurations that use pixmaps.
 +
 
 +
The flag affects the state for a button. Some examples of flags include ''Raised'', ''Sunk'' and ''Flat''. For more information, see {{ic|man fvwm}} and look for the ButtonStyle section.
 +
 
 +
==== Title and border styles ====
 +
 
 +
The window titles and borders can be configured with the {{ic|TitleStyle}} and {{ic|BorderStyle}} commands respectively.
 +
 
 +
TitleStyle can take the following arguments:
 +
TitleStyle ''justify'' Height ''height-in-pixels''
 +
The justify argument can be ''LeftJustified'', ''RightJustified'' or ''Centered''.
 +
TitleStyle and BorderStyle can take the following arguments:
 +
TitleStyle/BorderStyle ''state'' ''style'' -- ''flag''
 +
See [[#Button styles]] for the ''state'', ''style'' and ''flag'' arguments.
 +
 
 +
=== Menus ===
 +
 
 +
Menus can be created with the {{ic|AddToMenu}} command. This takes the following syntax:
 +
AddToMenu ''menu-name'' ''menu-title'' Title
 +
Remove the ''menu-title'' and Title arguments to create a menu with no title.
 +
Subsequent entries in the menu take the following syntax:
 +
+ ''entry-name'' ''action''
 +
See the following example:
 +
AddToMenu "Web" "Web Browsers" Title
 +
+ "Firefox" Exec firefox
 +
+ "Chromium Exec chromium
 +
+ "Opera"  Exec opera
 +
Use the {{ic|Popup}} command to show other menus. For instance, to include the menu defined above in another menu one could use the following syntax:
 +
+ "Web Browsers" Popup "Web"
 +
FVWM menus also support icons. To give a menu entry an icon, provide the path to the icon enclosed in {{ic|%}} signs after the entry name - see below:
 +
+ "Chromium %/usr/share/icons/hicolor/16x16/apps/chromium.png%" Exec chromium
 +
Use the ''xdg_menu'' tool, provided by {{Pkg|archlinux-xdg-menu}}, to automatically generate menus - see [[Xdg-menu#Fvwm2]].
 +
 
 +
=== Style command ===
 +
 
 +
{{Note|Most styles can be negated with a {{ic|!}}. For instance the style {{ic|Title}} forces the window manager to give the window a title whilst {{ic|!Title}} has the opposite effect.}}
 +
 
 +
The {{ic|Style}} command allows one to configure various aspects of the window manager itself and also to set behaviors for certain windows. The syntax is {{ic|Style ''window-name'' ''stylename''}}. The ''window-name'' argument can be a window name, class, title name or resource string. Use {{ic|*}} to match all windows. See {{ic|man fvwm}} for all available styles - some examples are provided below:
 +
* {{ic|Style "*" CascadePlacement}} - make the window manager use the cascade placement algorithm for all new windows.
 +
* {{ic|Style "Chromium" PositionPlacement center}} - ensure that all new Chromium windows are placed in the center of the screen.
 +
* {{ic|Style "xterm" StartIconic}} - ensure that all new XTerm windows start iconified.
 +
* {{ic|Style "*" HilightBack indianred}} - set the frame background of any focused window to the color indianred.
 +
 
 +
=== Functions ===
 +
 
 +
FVWM provides many built in functions, examples being {{ic|Close}} to close a window or {{ic|Exec}} which allows the execution of an external command. Users can also define their own functions or add to existing functions using the {{ic|AddToFunc}} command. This uses the following syntax: {{ic|AddToFunc ''function-name'' <nowiki>I|M|C|H|D</nowiki> ''action''}}.
 +
The letter codes stand for the following: '''I''' - execute immediately, '''M''' - execute when the user moves the mouse, '''C''' - execute on mouse click, '''H''' - execute when the user holds the mouse button, '''D''' - execute when the user double clicks the mouse button. Below is a trivial example of a function:
 +
AddToFunc VolumeFunc
 +
+ I Exec xterm -e alsamixer
 +
One can also use conditional commands (see {{ic|man fvwm}} and look for the Conditional Commands section). For instance, suppose one wanted a function that would close all windows in the current page other than the one which has focus. That function can be defined as below:
 +
AddToFunc CloseAllButThis
 +
+ I All (CurrentPage, !Focused) Close
 +
The {{ic|All}} conditional matches all windows that meet the conditions defined in parenthesis.
 +
Functions can execute more than one action, just add one line for each action beginning with a plus sign:
 +
AddToFunc MyFunc
 +
+ I ''action1''
 +
+ D ''action2''
 +
+ I ''action3''
 +
 
 +
=== Modules ===
 +
 
 +
{{Note|A number of older FVWM modules have been removed as of version 2.6.7. [https://github.com/fvwmorg/fvwm/releases/tag/2.6.7]}}
 +
 
 +
Modules are separate programs, spawned by FVWM that can add extra functionality. Modules can be spawned using the following syntax: {{ic|Module ''ModuleName'' (''identifier'') ''ModuleArgs''}}.
 +
 
 +
Sometimes, one might want to spawn multiple instances of the same type of module, each with their own separate configuration. In this case, one should spawn the module with an identifier, for instance:
 +
AddToFunc StartFunction
 +
+ I Module FvwmButtons Panel1
 +
+ I Module FvwmButtons Panel2
 +
where ''Panel1'' and ''Panel2'' are the identifiers.
 +
 
 +
Most modules will have a number of module commands which can be used to configure the module's appearance or behavior. Use the following syntax:
 +
*ModuleName/Identifier: ''module-command'' ''command-args''
 +
For instance, if one spawned an FvwmPager with the identifier MyPager then one could configure it in the following fashion:
 +
*MyPager: Geometry 135x90+0+0
 +
*MyPager: Back midnightblue
 +
 
 +
==== FvwmPager ====
 +
 
 +
The FvwmPager is a module which provides a visual representation of the desks and pages provided by the window manager. Like all modules, it must be spawned by FVWM. To start an FvwmPager, add something similar to the following to your StartFunction:
 +
+ I Module FvwmPager
 +
With no arguments, the FvwmPager will only display the viewports for desk 0. With the arguments 0 9, FvwmPager will show the 10 desks from 0-9.
 +
+ I Module FvwmPager 0 9
 +
With the argument * the FvwmPager will show only one desk but it will always be the desk that is currently being used.
 +
+ I Module FvwmPager *
 +
See {{ic|man fvwmpager}} for a list of module commands.
 +
 
 +
==== FvwmButtons ====
 +
 
 +
FvwmButtons is a module which can create a box of buttons which can perform actions when pressed. FvwmButtons can also "swallow" application windows. This might be useful for swallowing a system tray window or a clock window. The size of the panel is automatically determined (the panel will resize to accommodate all elements) however it is also possible to manually set a size using the {{ic|Geometry}} command. This takes a standard X geometry. The basic commands needed to create an FvwmButtons panel are outlined below.
 +
 
 +
Set the number of rows and columns:
 +
*FvwmButtons: Rows ''x''
 +
*FvwmButtons: Columns ''x''
 +
 
 +
Create a button (this example creates a button with a title and an icon which launches an XTerm when left clicked):
 +
*FvwmButtons: (Title "Xterm", Icon /usr/share/pixmaps/mini.xterm_48x48.xpm, Action (Mouse1) Exec xterm)
 +
You can omit any of these arguments if you so choose.
 +
 
 +
Swallow a window (this example swallows a stalonetray):
 +
*FvwmButtons: (Swallow(UseOld, NoClose) "stalonetray" "Nop")
 +
The Swallow command takes a number of "hangon" arguments. Here, the ''UseOld'' and ''NoClose'' arguments have been used. UseOld means that an existing window will be swallowed if it exists. NoClose means that the window will not be closed if the FvwmButtons process is terminated. The ''stalonetray'' argument is the class of the window that we want to swallow. Replace as appropriate. The last argument is a command to start the application that is to be swallowed. In this example, it is assumed that the application has already been started so the argument provided is ''Nop'' which is a function that does nothing. One could replace this with {{ic|"Exec stalonetray"}} to start the application from the FvwmButtons module instead of assuming that the application has been started elsewhere.
 +
 
 +
Containers are spaces defined which can span multiple rows and columns or subdivide a row or column into more rows or columns. This can be useful for instance if one wants to allocate a certain percentage of space to an element. Say one wants to swallow an XClock and allocate 100% of the width and 80% of the height to the XClock. This can be defined as such:
 +
*FvwmButtons: Rows 5
 +
*FvwmButtons: Columns 1
 +
*FvwmButtons: (1x4, Container)
 +
*FvwmButtons: (Swallow(UseOld, NoClose) "xclock" "Nop")
 +
*FvwmButtons: (End)
 +
Note that a container is created by defining a certain number of columns and rows and then using the keyword container. Elements inside the container are defined underneath this line and the container is then closed with the ''End'' command.
 +
 
 +
For a full list of options, see {{ic|man fvwmbuttons}}.
 +
 
 +
=== Colors ===
 +
 
 +
FVWM color styles can take a number of color code types such as hexcolors ({{ic|#ffffff}} for instance), rbg colors ({{ic|rgb:ff/ff/ff}} for instance) as well as the pre-defined [[Wikipedia:X11 color names|X11 colors]].
 +
 
 +
The following [[#Style command|styles]] might be useful:
 +
* {{ic|Color}} - this takes two arguments, the color of the unfocused window title text and the color of the unfocused window frame separated by a forward slash, ''black/lightgrey'' for example.
 +
* {{ic|HilightBack}} - takes a single argument, the color of the focused window frame.
 +
* {{ic|HilightFore}} - takes a single argument, the color of the focused window title text.
 +
 
 +
==== Colorsets ====
 +
 
 +
Colorsets in FVWM are a set of four colors (a foreground color, a background color, a shadow color and a highlight color) as well as an optional background pixmap. Any part of FVWM that uses a particular colorset will be affected if that colorset is changed.
 +
 
 +
All colorsets are identified by a number. The first 40 colorsets, 0-39, are reserved. Those colorsets are documented on [http://fvwm-themes.sourceforge.net/doc/colorsets sourceforge].
 +
 
 +
Colorsets can be created with the {{ic|ColorSet}} command - syntax: {{ic|ColorSet ''number'' ''options''}}. See {{ic|man fvwm}} - the Colorsets section - for more information.
 +
 
 +
{{Tip|Using {{ic|Style "*" Colorset ''num''}} overrides the {{ic|Color}} style and using {{ic|Style "*" HilightColorset ''num''}} overrides the {{ic|HilightFore}} and {{ic|HilightBack}} styles.}}
 +
 
 +
=== Fonts ===
 +
 
 +
For styles such as {{ic|Font}}, use {{Pkg|xorg-xfontsel}} to determine the correct font names for X11 fonts - see [[X Logical Font Description]] and [[Font configuration]] for more information. You can also specify xft fonts, for example: {{ic|"xft:DejaVu Sans:size<nowiki>=</nowiki>10"}}.
 +
 
 +
=== Icons ===
 +
 
 +
Windows in FVWM can be iconified (minimized). This means that the window will disappear from view and be replaced by an icon on the desktop, similar to the behavior in Microsoft Windows 3.1.
 +
 
 +
The program itself will supply the icon. One can also set a default icon to be used, in case a program does not have an icon to supply: {{ic|Style "*" Icon /path/to/default/icon.png}}.
 +
 
 +
To disable icons altogether, use the following style: {{ic|Style "*" NoIcons}}. This means that the window will simply disappear when iconified.
 +
 
 +
The positioning of icons can be controlled using the {{ic|IconBox}} style - note that this is not the same thing as the FvwmIconBox module - along with the {{ic|IconFill}} style. Use {{ic|Style "*" IconBox none}} to disable the IconBox. This means that icons will be placed at the position of the top left corner of the window. Else, use {{ic|Style "*" IconBox l t r b}} where ''l t r b'' stand for ''left'', ''top'', ''right'' and ''bottom'' respectively. These arguments should be the number of pixels away from the screen edge that the IconBox edge should be. Hence, arguments of {{ic|+0 +0 -0 -0}} means that the IconBox will fill the entire screen.
 +
 
 +
Multiple IconBox styles can be defined but they must be defined on the same line, for instance:
 +
Style "*" IconBox +0 +800 -100 -0, IconBox -200 +0 -0 -120
 +
When the first IconBox overflows, icons will then be placed in the second IconBox. Note that if the last IconBox overflows then the default IconBox will be used which covers the entire screen and fills from top to bottom - left to right.
 +
 
 +
Use the {{ic|IconFill}} style to control how icons will be filled. A style of {{ic|Style "*" IconFill left bottom}} means that icons will be filled from left to right - bottom to top (Motif Window Manager behavior). A style of {{ic|Style "*" IconFill top left}} means that icons will be filled from top to bottom - left to right. Note that the IconFill style should be defined on the same line as the IconBox style, for instance:
 +
Style "*" IconBox +0 +0 -0 -0, IconFill left bottom
 +
 
 +
== Tips and tricks ==
 +
 
 +
=== MWM compatibility options ===
 +
 
 +
FVWM provides a number of options that allow it to mimic the appearance and behaviour of MWM (Motif Window Manager).
 +
 
 +
* {{ic|Emulate Mwm}} - this commands places the geometry feedback window in the center of the screen.
 +
* {{ic|MenuStyle Mwm}} - this command gives menus the appearance of Motif menus.
 +
* {{ic|MwmButtons}} - this style makes the maximize button look pressed in when a window is maximized.
 +
* {{ic|MwmBorder}} - this style makes the window border bevel more closely match the style of Mwm window borders
 +
* {{ic|MwmDecor}} - this style makes FVWM attempt to honor MWM hints that some applications might set.
 +
* {{ic|MwmFunctions}} - this style make FVWM attempt to recognize and respect functions that MWM would prohibit.
 +
* {{ic|HintOverride}} - this style is similar to MwmFunctions but instead it shades out the prohibited functions but allows the user to perform them anyway.
 +
 
 +
=== Force icon size and background ===
 +
 
 +
The sizing of icons is not regular as different programs provide icons of differing sizes. Use the {{ic|IconSize}} style to force a regular size: {{ic|Style "*" IconSize 48 48}} for instance. Note that icons larger than the given size will be clipped.
 +
 
 +
By default, icons also have no background. You can use the {{ic|IconBackgroundColorset}} style to force icons to have a background. See [[#Colorsets]].
 +
 
 +
=== Ignore resize hints ===
 +
 
 +
Some applications, such as XTerm, supply a maximum size to the window manager that might be smaller than the screen size. This means that if such an application is maximized, it will not cover the whole screen. To force FVWM to ignore these hints, use the following: {{ic|Style "*" ResizeHintOverride}}.
 +
 
 +
=== Do not use a wireframe when moving or resizing windows ===
 +
 
 +
Use the {{ic|OpaqueMoveSize unlimited}} command to view the window itself when moving.
 +
 
 +
Use {{ic|Style "*" ResizeOpaque}} to view the window itself when resizing.
 +
 
 +
=== Disable edge scrolling ===
 +
 
 +
To disable scrolling to the next viewport when moving the mouse pointer to the screen edge, use the following command: {{ic|EdgeScroll 0 0}}.
 +
 
 +
=== Stop modifiers from interfering with mouse and key bindings ===
 +
 
 +
NumLock, CapsLock and ScrollLock can intefere with ClickToFocus as well as mouse and key bindings. To disable this behavior, use the following command: {{ic|IgnoreModifiers L25}}.
 +
 
 +
=== Use ClickToFocus ===
 +
 
 +
Ensure that {{Pkg|perl-tk}} and {{Pkg|perl-x11-protocol}} are installed. The use the following style command: {{ic|Style "*" ClickToFocus}}. See {{ic|man fvwm}} for other focus behaviors.
 +
 
 +
=== Window tiling ===
 +
 
 +
The following functions can tile a window to the left half, right half, top half or bottom half of the screen respectively when called and return the window to its original position when called again.
 +
 
 +
{{bc|AddToFunc TileLeft
 +
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 100
 +
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 +0
 +
 
 +
AddToFunc TileRight
 +
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 100
 +
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move -0 +0
 +
 
 +
AddToFunc TileTop
 +
+ I ThisWindow (!Shaded, !Iconic) Maximize 100 50
 +
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 +0
 +
 
 +
AddToFunc TileBottom
 +
+ I ThisWindow (!Shaded, !Iconic) Maximize 100 50
 +
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 -0}}
 +
 
 +
== See also ==
 +
 
 +
* [http://zensites.net/fvwm/guide/ FVWM beginners guide] - Zensites.
 +
* [http://fvwm.org/ FVWM Homepage] - includes documentation and a FAQ.
 +
* [http://fvwmforums.org/wiki/ FVWM Wiki].
 +
* [http://www.fvwmforums.org FVWM Forums].
 +
* [http://fvwm.org/documentation/manpages/fvwm.html FVWM - Man Page].
 +
* [https://www.box-look.org/browse/cat/143/ord/latest/ FVWM Themes] - Box-Look.org.
 +
* [http://www.fvwmforums.org/phpBB3/viewforum.php?f=39&sid=468469f95f9a2a90cd9d5a0819d26eec FVWM Configurations] - threads in the FVWM forums.
 +
* [http://www.fvwmforums.org/phpBB3/viewtopic.php?f=40&t=1505 FVWM Tips] - forum post by Thomas Adam - an FVWM developer.

Latest revision as of 16:18, 4 December 2016

Related articles

FVWM is an ICCCM-compliant multiple virtual desktop window manager for the X Window system. It is configured by editing text-based configuration files. Although using FVWM does not require any knowledge of programming languages, it is possible to extend FVWM with M4, C, and Perl preprocessing. FVWM also has a Perl library which allows one to create modules. FVWM stands for F Virtual Window Manager. The official stance is that the F does not stand for anything in particular [1].

Installing

Install fvwm or fvwm-cvsAUR (for the development version). Alternatively, you can install fvwm+AUR which provides a patched version of FVWM.

The following packages provide themes and icons for FVWM: fvwm-crystal, fvwm-iconsAUR, fvwm-themesAUR, fvwm-themes-extraAUR. FVWM Crystal provides a separate session for a desktop environment like experience.

Starting

Select FVWM from the session menu in a display manager of choice. Otherwise, add exec fvwm to your user's .xinitrc.

For FVWM Crystal, select FVWM-Crystal from the session menu or add exec fvwm-crystal to your user's .xinitrc.

See xinitrc for details, such as preserving the logind session.

Startup functions

Note: It is recommended that you only use the StartFunction and make use of the Test command - explained below.

FVWM provides a number of functions to start modules or applications when initialising, restarting or exiting the window manager.

  • StartFunction - executed when FVWM is first initialised and on restarts.
  • InitFunction - executed only when FVWM is first initialised.
  • RestartFunction - executed only when FVWM is restarted.
  • ExitFunction - executed when exiting FVWM.

You can add your own actions to any of these functions using the AddToFunc command. For example, if one wanted to start network-manager-applet on startup (but not for any subsequent restarts of the window manager) one could add the nm-applet command to the InitFunction:

AddToFunc InitFunction
+ I Exec nm-applet &

You can also use just StartFunction and prepend your commands with Test commands which check whether the window manager has started or restarted and run the action only if the test is true. Using this method, nm-applet could be started in the following manner:

AddToFunc StartFunction
+ I Test (Init) Exec nm-applet &

Configuration

The following configuration file locations are supported:

  • $HOME/.fvwm/config
  • /usr/local/share/fvwm/config

The following configuration locations are supported as of version 2.6.7, but may not be supported in the future:

  • $HOME/.fvwm/.fvwm2rc
  • $HOME/.fvwm2rc
  • /usr/local/share/fvwm/.fvwm2rc
  • /usr/local/share/fvwm/system.fvwm2rc
  • /etc/system.fvwm2rc

As of version 2.6.7, FVWM ships with a new default configuration, located in /usr/share/fvwm/default-config. As such, the older sample configuration files are no longer provided. However, they can still be viewed on GitHub. The fvwm-themes project also provides ready-made configurations.

Tip: You can split up your configuration into multiple files and then source those files from the main configuration file using the read command. The syntax is read /path/to/file.

The virtual desktop

For its virtual desktop, FVWM implements both workspaces (used by window managers such as Metacity and Openbox) and viewports (used by window managers such as Compiz). See [2] for a description of the differences between workspaces and viewports. FVWM refers to workspaces as desks and viewports as pages.

Pages in FVWM are arranged in a grid. The number of pages used can be defined with the DesktopSize command. For instance, adding DesktopSize 3x3 to your configuration file will give you 9 pages, arranged in a 3x3 grid. Pages can be navigated using the pager module or with the MoveToPage command which could be mapped to a keyboard shortcut or menu entry. For instance, the command MoveToPage -1p +0p will move the viewport 1 page to the left of the current page.

The number of desks available in FVWM is very large, the minimum desk number is -2147483648 and the maximum is 2147483647. By default, FVWM starts on desk 0. Desks can be navigated using the pager module (if it is configured to show a number of desks) or with the MoveToDesk command - MoveToDesk +1 will move to the next desk, relative to the currently used desk.

Keyboard and mouse bindings

Keyboard or bindings can be defined in the configuration file with the Key or Mouse command. The syntax of the command takes the following form: Key/Mouse (window) button/key name context modifiers action. For instance, the following example will launch an XTerm on an Alt+F2 keypress: Key F2 A 1 Exec xterm. Note that the (window) argument is optional.

The context value defines where the binding will be applied. The following contexts are valid: R (root window), W (application window), D (desktop manager window - PCManFM desktop manager for instance), T (title bar), S (window side, top, bottom), [ ] - _ (left side, right side, top, bottom respectively), F (window frame corners), < > ^ v (left, right, top, bottom corners respectively), I (icon window), 0-9 (titlebar buttons) and A (all contexts). Any combination of these letters is also acceptable.

The modifier value can be one of the following: A (any), C (control), S (shift), M (meta), N (none), or 1-5, representing the X Modifiers - run xmodmap to see which X modifier is which. Multiple modifiers should not be spaced. For instance, to use the modifier Control+Alt, you would supply as the modifier argument C1.

The action must be an FVWM function to run, such as the Quit function or Menu function. Execution of external commands, such as xterm, can be achieved with the Exec function, as shown above.

Window decoration

Titlebar buttons

FVWM can provide up to 10 window buttons. These are numbered 0-9. Even numbers indicate buttons located on the right hand side of the titlebar whilst odd numbers indicate buttons located on the left. The layout is as follows:

1 3 5 7 9    0 8 6 4 2 

Window buttons will remain hidden unless a Mouse command is used which specifies one of the titlebar buttons as the context. For instance, to activate the rightmost titlebar button and make it close the window on a left click, one would use the following command:

Mouse 1 2 A Close

Mouse is the name of the command, 1 is the mouse button, 2 is the number of the rightmost titlebar button, A is the modifier (any) and Close is the action to be taken. See #Keyboard and mouse bindings for more information.

Button styles

The style of your titlebar buttons can be configured with the ButtonStyle command. This takes the following syntax:

ButtonStyle button-number state style -- flag

The state can be one of ActiveUp, ActiveDown, InactiveUp, InactiveDown. ActiveUp and ActiveDown refer to the un-pressed and pressed button states of the active window. Likewise for the Inactive states. One can also use just Active or Inactive which are shortcuts for both the pressed and un-pressed button states.

The style argument can be one of the following:

  • Simple - does nothing.
  • Default - takes argument of button number for default style to load.
  • Solid - fill button a solid color.
  • ColorSet - fill button with the ColorSet specified - takes an alpha argument between 0 and 100.
  • Vector - draws a line pattern - using the keyword Vector is optional as this is a standard style.
  •  ?Gradient - fills the button with a gradient - see the FVWM man page Color Gradients section for the syntax.
  • Pixmap - fills the button with a given pixmap - see also the following variants: AdjustedPixmap, ShrunkPixmap, StretchedPixmap, TiledPixmap.
  • MiniIcon - fills the button with the window's mini icon.

A number of vector styles are documented here. You can also create your own vector buttons using this vector buttons viewer. See this page for some example decoration configurations that use pixmaps.

The flag affects the state for a button. Some examples of flags include Raised, Sunk and Flat. For more information, see man fvwm and look for the ButtonStyle section.

Title and border styles

The window titles and borders can be configured with the TitleStyle and BorderStyle commands respectively.

TitleStyle can take the following arguments:

TitleStyle justify Height height-in-pixels

The justify argument can be LeftJustified, RightJustified or Centered. TitleStyle and BorderStyle can take the following arguments:

TitleStyle/BorderStyle state style -- flag

See #Button styles for the state, style and flag arguments.

Menus

Menus can be created with the AddToMenu command. This takes the following syntax:

AddToMenu menu-name menu-title Title

Remove the menu-title and Title arguments to create a menu with no title. Subsequent entries in the menu take the following syntax:

+ entry-name action

See the following example:

AddToMenu "Web" "Web Browsers" Title
+ "Firefox" Exec firefox
+ "Chromium Exec chromium
+ "Opera"   Exec opera

Use the Popup command to show other menus. For instance, to include the menu defined above in another menu one could use the following syntax:

+ "Web Browsers" Popup "Web"

FVWM menus also support icons. To give a menu entry an icon, provide the path to the icon enclosed in % signs after the entry name - see below:

+ "Chromium %/usr/share/icons/hicolor/16x16/apps/chromium.png%" Exec chromium

Use the xdg_menu tool, provided by archlinux-xdg-menu, to automatically generate menus - see Xdg-menu#Fvwm2.

Style command

Note: Most styles can be negated with a !. For instance the style Title forces the window manager to give the window a title whilst !Title has the opposite effect.

The Style command allows one to configure various aspects of the window manager itself and also to set behaviors for certain windows. The syntax is Style window-name stylename. The window-name argument can be a window name, class, title name or resource string. Use * to match all windows. See man fvwm for all available styles - some examples are provided below:

  • Style "*" CascadePlacement - make the window manager use the cascade placement algorithm for all new windows.
  • Style "Chromium" PositionPlacement center - ensure that all new Chromium windows are placed in the center of the screen.
  • Style "xterm" StartIconic - ensure that all new XTerm windows start iconified.
  • Style "*" HilightBack indianred - set the frame background of any focused window to the color indianred.

Functions

FVWM provides many built in functions, examples being Close to close a window or Exec which allows the execution of an external command. Users can also define their own functions or add to existing functions using the AddToFunc command. This uses the following syntax: AddToFunc function-name I|M|C|H|D action. The letter codes stand for the following: I - execute immediately, M - execute when the user moves the mouse, C - execute on mouse click, H - execute when the user holds the mouse button, D - execute when the user double clicks the mouse button. Below is a trivial example of a function:

AddToFunc VolumeFunc
+ I Exec xterm -e alsamixer

One can also use conditional commands (see man fvwm and look for the Conditional Commands section). For instance, suppose one wanted a function that would close all windows in the current page other than the one which has focus. That function can be defined as below:

AddToFunc CloseAllButThis
+ I All (CurrentPage, !Focused) Close

The All conditional matches all windows that meet the conditions defined in parenthesis. Functions can execute more than one action, just add one line for each action beginning with a plus sign:

AddToFunc MyFunc
+ I action1
+ D action2
+ I action3

Modules

Note: A number of older FVWM modules have been removed as of version 2.6.7. [3]

Modules are separate programs, spawned by FVWM that can add extra functionality. Modules can be spawned using the following syntax: Module ModuleName (identifier) ModuleArgs.

Sometimes, one might want to spawn multiple instances of the same type of module, each with their own separate configuration. In this case, one should spawn the module with an identifier, for instance:

AddToFunc StartFunction
+ I Module FvwmButtons Panel1
+ I Module FvwmButtons Panel2

where Panel1 and Panel2 are the identifiers.

Most modules will have a number of module commands which can be used to configure the module's appearance or behavior. Use the following syntax:

*ModuleName/Identifier: module-command command-args

For instance, if one spawned an FvwmPager with the identifier MyPager then one could configure it in the following fashion:

*MyPager: Geometry 135x90+0+0
*MyPager: Back midnightblue

FvwmPager

The FvwmPager is a module which provides a visual representation of the desks and pages provided by the window manager. Like all modules, it must be spawned by FVWM. To start an FvwmPager, add something similar to the following to your StartFunction:

+ I Module FvwmPager

With no arguments, the FvwmPager will only display the viewports for desk 0. With the arguments 0 9, FvwmPager will show the 10 desks from 0-9.

+ I Module FvwmPager 0 9

With the argument * the FvwmPager will show only one desk but it will always be the desk that is currently being used.

+ I Module FvwmPager *

See man fvwmpager for a list of module commands.

FvwmButtons

FvwmButtons is a module which can create a box of buttons which can perform actions when pressed. FvwmButtons can also "swallow" application windows. This might be useful for swallowing a system tray window or a clock window. The size of the panel is automatically determined (the panel will resize to accommodate all elements) however it is also possible to manually set a size using the Geometry command. This takes a standard X geometry. The basic commands needed to create an FvwmButtons panel are outlined below.

Set the number of rows and columns:

*FvwmButtons: Rows x
*FvwmButtons: Columns x

Create a button (this example creates a button with a title and an icon which launches an XTerm when left clicked):

*FvwmButtons: (Title "Xterm", Icon /usr/share/pixmaps/mini.xterm_48x48.xpm, Action (Mouse1) Exec xterm)

You can omit any of these arguments if you so choose.

Swallow a window (this example swallows a stalonetray):

*FvwmButtons: (Swallow(UseOld, NoClose) "stalonetray" "Nop")

The Swallow command takes a number of "hangon" arguments. Here, the UseOld and NoClose arguments have been used. UseOld means that an existing window will be swallowed if it exists. NoClose means that the window will not be closed if the FvwmButtons process is terminated. The stalonetray argument is the class of the window that we want to swallow. Replace as appropriate. The last argument is a command to start the application that is to be swallowed. In this example, it is assumed that the application has already been started so the argument provided is Nop which is a function that does nothing. One could replace this with "Exec stalonetray" to start the application from the FvwmButtons module instead of assuming that the application has been started elsewhere.

Containers are spaces defined which can span multiple rows and columns or subdivide a row or column into more rows or columns. This can be useful for instance if one wants to allocate a certain percentage of space to an element. Say one wants to swallow an XClock and allocate 100% of the width and 80% of the height to the XClock. This can be defined as such:

*FvwmButtons: Rows 5
*FvwmButtons: Columns 1
*FvwmButtons: (1x4, Container)
*FvwmButtons: (Swallow(UseOld, NoClose) "xclock" "Nop")
*FvwmButtons: (End)

Note that a container is created by defining a certain number of columns and rows and then using the keyword container. Elements inside the container are defined underneath this line and the container is then closed with the End command.

For a full list of options, see man fvwmbuttons.

Colors

FVWM color styles can take a number of color code types such as hexcolors (#ffffff for instance), rbg colors (rgb:ff/ff/ff for instance) as well as the pre-defined X11 colors.

The following styles might be useful:

  • Color - this takes two arguments, the color of the unfocused window title text and the color of the unfocused window frame separated by a forward slash, black/lightgrey for example.
  • HilightBack - takes a single argument, the color of the focused window frame.
  • HilightFore - takes a single argument, the color of the focused window title text.

Colorsets

Colorsets in FVWM are a set of four colors (a foreground color, a background color, a shadow color and a highlight color) as well as an optional background pixmap. Any part of FVWM that uses a particular colorset will be affected if that colorset is changed.

All colorsets are identified by a number. The first 40 colorsets, 0-39, are reserved. Those colorsets are documented on sourceforge.

Colorsets can be created with the ColorSet command - syntax: ColorSet number options. See man fvwm - the Colorsets section - for more information.

Tip: Using Style "*" Colorset num overrides the Color style and using Style "*" HilightColorset num overrides the HilightFore and HilightBack styles.

Fonts

For styles such as Font, use xorg-xfontsel to determine the correct font names for X11 fonts - see X Logical Font Description and Font configuration for more information. You can also specify xft fonts, for example: "xft:DejaVu Sans:size=10".

Icons

Windows in FVWM can be iconified (minimized). This means that the window will disappear from view and be replaced by an icon on the desktop, similar to the behavior in Microsoft Windows 3.1.

The program itself will supply the icon. One can also set a default icon to be used, in case a program does not have an icon to supply: Style "*" Icon /path/to/default/icon.png.

To disable icons altogether, use the following style: Style "*" NoIcons. This means that the window will simply disappear when iconified.

The positioning of icons can be controlled using the IconBox style - note that this is not the same thing as the FvwmIconBox module - along with the IconFill style. Use Style "*" IconBox none to disable the IconBox. This means that icons will be placed at the position of the top left corner of the window. Else, use Style "*" IconBox l t r b where l t r b stand for left, top, right and bottom respectively. These arguments should be the number of pixels away from the screen edge that the IconBox edge should be. Hence, arguments of +0 +0 -0 -0 means that the IconBox will fill the entire screen.

Multiple IconBox styles can be defined but they must be defined on the same line, for instance:

Style "*" IconBox +0 +800 -100 -0, IconBox -200 +0 -0 -120

When the first IconBox overflows, icons will then be placed in the second IconBox. Note that if the last IconBox overflows then the default IconBox will be used which covers the entire screen and fills from top to bottom - left to right.

Use the IconFill style to control how icons will be filled. A style of Style "*" IconFill left bottom means that icons will be filled from left to right - bottom to top (Motif Window Manager behavior). A style of Style "*" IconFill top left means that icons will be filled from top to bottom - left to right. Note that the IconFill style should be defined on the same line as the IconBox style, for instance:

Style "*" IconBox +0 +0 -0 -0, IconFill left bottom

Tips and tricks

MWM compatibility options

FVWM provides a number of options that allow it to mimic the appearance and behaviour of MWM (Motif Window Manager).

  • Emulate Mwm - this commands places the geometry feedback window in the center of the screen.
  • MenuStyle Mwm - this command gives menus the appearance of Motif menus.
  • MwmButtons - this style makes the maximize button look pressed in when a window is maximized.
  • MwmBorder - this style makes the window border bevel more closely match the style of Mwm window borders
  • MwmDecor - this style makes FVWM attempt to honor MWM hints that some applications might set.
  • MwmFunctions - this style make FVWM attempt to recognize and respect functions that MWM would prohibit.
  • HintOverride - this style is similar to MwmFunctions but instead it shades out the prohibited functions but allows the user to perform them anyway.

Force icon size and background

The sizing of icons is not regular as different programs provide icons of differing sizes. Use the IconSize style to force a regular size: Style "*" IconSize 48 48 for instance. Note that icons larger than the given size will be clipped.

By default, icons also have no background. You can use the IconBackgroundColorset style to force icons to have a background. See #Colorsets.

Ignore resize hints

Some applications, such as XTerm, supply a maximum size to the window manager that might be smaller than the screen size. This means that if such an application is maximized, it will not cover the whole screen. To force FVWM to ignore these hints, use the following: Style "*" ResizeHintOverride.

Do not use a wireframe when moving or resizing windows

Use the OpaqueMoveSize unlimited command to view the window itself when moving.

Use Style "*" ResizeOpaque to view the window itself when resizing.

Disable edge scrolling

To disable scrolling to the next viewport when moving the mouse pointer to the screen edge, use the following command: EdgeScroll 0 0.

Stop modifiers from interfering with mouse and key bindings

NumLock, CapsLock and ScrollLock can intefere with ClickToFocus as well as mouse and key bindings. To disable this behavior, use the following command: IgnoreModifiers L25.

Use ClickToFocus

Ensure that perl-tk and perl-x11-protocol are installed. The use the following style command: Style "*" ClickToFocus. See man fvwm for other focus behaviors.

Window tiling

The following functions can tile a window to the left half, right half, top half or bottom half of the screen respectively when called and return the window to its original position when called again.

AddToFunc TileLeft
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 100
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 +0

AddToFunc TileRight
+ I ThisWindow (!Shaded, !Iconic) Maximize 50 100
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move -0 +0

AddToFunc TileTop
+ I ThisWindow (!Shaded, !Iconic) Maximize 100 50
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 +0

AddToFunc TileBottom
+ I ThisWindow (!Shaded, !Iconic) Maximize 100 50
+ I ThisWindow (Maximized, !Shaded, !Iconic) Move +0 -0

See also