From ArchWiki
Revision as of 15:58, 18 February 2011 by Thechitowncubs (talk | contribs) (Statusbar configuration)
Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Article summary start Template:Article summary text Template:Article summary end


WMFS (Window Manager From Scratch) is a lightweight and highly configurable tiling window manager for X. It can be configured with a configuration file, supports Xft (Freetype) fonts and is compliant with the Extended Window Manager Hints (EWMH) specifications. It's still under heavy development


WMFS is in AUR. Due the high development rate its recommended to use the git version.

You can install it with an AUR helper, or build it yourself.

WMFS will look for a configuration file in Template:Filename. To configure WMFS to your liking, you will need to create a config file; for most users this will be Template:Filename. If Template:Filename doesn't exist, create it:

mkdir -p ~/.config/wmfs

A default file is located in your XDG directory, normally in /etc/xdg/wmfs, called wmfsrc. Copy it to your newly created Template:Filename folder and you can begin to modify it.

cp /etc/xdg/wmfs/wmfsrc ~/.config/wmfs

To use wmfs as windowmanager, add it to your Template:Filename:

echo "exec wmfs" >> ~/.xinitrc


Config file

The config file is well commented. Make small changes cumulatively and reload WMFS (default key to restart is Template:Keypress+Template:Keypress+Template:Keypress) to test them.

By default two different mod keys are used for keybindings (Template:Keypress and Template:Keypress) which may conflict with your pre-exisitng set-up. These can be changed in Template:Filename. For example, if you want to use the Win-key instead of Alt, replace "Alt" with "Super" or "Mod4" in the config file, e.g:

[key] mod = { "Super" } key = "p" func = "launcher" cmd = "launcher_exec" [/key]

Or in a single command

sed --in-place=.bak 's/"Alt"/"Mod4"/' wmfsrc

To bind commands to special symbols you need to specify their name, like "slash" for "/". You can find symbol names by using xev and typing the symbol in question:

xev | grep keycode
   state 0x10, keycode 61 (keysym 0x2f, slash), same_screen YES,
   state 0x10, keycode 60 (keysym 0x2e, period), same_screen YES,
   state 0x10, keycode 59 (keysym 0x2c, comma), same_screen YES,

Tags & Rules

Assigning clients to a tag, eg., having Uzbl open in tag 2, is done through rules. In Template:Filename, write a new rule in the [rules] section:

[rule] instance = "Uzbl" screen = 0  tag = "2"  max =  "false" [/rule]

This will open Uzbl in tag 2 unmaximized. To specify a layout for that tag, under [tags]:

[tag] name = "WWW"  screen = 0 layout = "tile_right" [/tag] 

For some rules, eg., where an application is opened in a terminal, you may need to specify a class as well as an instance:

[rule] instance = "mutt" class = "mutt" screen = 0  tag = "3"  max = "true" [/rule]

Use xprop to determine the values for your rule.

Key Bindings

The [keys] section of Template:Filename allows you to customize your keybindings. As described above, this could mean just changing the default modifier from Template:Keypress to Template:Keypress.

By default, WMFS is set up to cycle through the 9 available layouts. You might, for example, wish to include a keybind to set a specific layout, say tile_right (the classic tiled mode). You could bind that function to Template:Keypress+Template:Keypress like so:

[key] mod = {"Mod4"} key = "t" func = "set_layout" cmd = "tile_right" [/key]

Similarly, you can customize keybinds for any of the other functions. A full list of the functions can be found in Template:Filename - search for "func_name_list_t".


By combining a rule with a keybind, you can create a basic scratchpad - a terminal bound to a keypress that will open in floating mode in any tag in a specific position; for example:

[key] mod = {"Control", "Alt"} key = "p" func = "spawn" cmd = "urxvtc -name scratchpad -geometry 64x10+480+34" [/key]

[rule] instance = "scratchpad"  name  = "scratchpad"   free = "true"  [/rule]

Statusbar configuration

The text shown in the status bars (or infobars) is set on a running wmfs instance using the "wmfs -s" command. You can set a different bar for each screen. The bars can also be positioned at the top or bottom of each tag in the configuration file. For example

wmfs -s "hello world, I am visible on all screens"
wmfs -s 3 "hello world, I am visible on screen 4 only" # screens begin at 0

Colors may be encoded like this:

wmfs -s "This text is \\#ff0000\red, \\#00ff00\green and \\#0000ff\blue"

Rectangles may be drawn like this:

wmfs -s "<--look rectangles \b[700;9;14;5;#00ff00]\ \b[715;4;14;10;#00ff00]\ \b[730;3;14;11;#ff0000]\ "

The format is \b[xx;yy;ww;hh;#cccccc]\ where xx and yy are absolute (not relative) x and y positions, ww and hh are width and height, and cccccc is a color. This feature could be used to create CPU barcharts, volume displays and the like. Note: the absolute positioning makes it difficult to accurately interleave text and graphics.

Images may be added like this:

 wmfs -s "sexy image--> \i[image sequence]\ "

The formate for images:

--> \i[x;y;w;h;name]\
*\param im ImageAttr pointer, image properties
*\param str String
*\return n Lenght of i
and also
graph \g[]\ sequence
* --> \g[x;y;width;height;#color;data]\

For more info on images and graphs in status bar: http://fu.rootards.org/viewtopic.php?pid=14#p14

To pipe data to the bar, write a bash script with the relevant data you wish to display and source it in your Template:Filename. WMFS will call it at the interval you specify:

status_path = ".config/wmfs/wmfs-status"
status_timing = 5

Note that the output in the status.sh is as explained before.

wmfs -s "What ever you want to be displayed"

Some example status scripts are on the WMFS website.


You can use Conky to pipe output to wmfs' statusbar with the command:

conky | while read -r; do wmfs -s -name "$REPLY"; done


The keybinding Template:Keypress+Template:Keypress starts a launcher in the titlebar (similar to dmenu). It supports tab-completion and command-line parameters. Multiple presses of the tab key iterate through possible completions.

WMFS can be controlled from the command line with commands such as

wmfs -V :ln

which selects the next layout. Equivalently press Template:Keypress+Template:Keypress followed by ":ln". Type "wmfs -V help" to see the full list.