From ArchWiki
Revision as of 18:30, 4 December 2010 by Aakko (talk | contribs)
Jump to: navigation, search


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 available from the unsupported [AUR] . Due the high development rate its recommended to use the git version.

If yaourt is installed, just type the following in your console :

yaourt -S wmfs-git

The config folder is located in ~/.config/wmfs. If it doesn't exist, just create it.

mkdir -p ~/.config/wmfs

A default file is located in your XDG directory, normally in /etc/xdg/wmfs, called wmfsrc. Copy&Paste it in the previous created folder and modify it to your desire.

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

To use wmfs as windowmanager

echo "exec wmfs" > ~/.xinitrc


Config file

The config file is quite self-explanatory. More detailed information will follow soon.

By default two different mod keys are used for keybindings (Ctrl and Alt) which may cause problems with applications. These can be changed in the config file. For example if you want to use the win-key instead of Alt, replace "Alt" by "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

Statusbar configuration

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

wmfs -s "hello world, I am visible on all screens"
wmfs -s 5 "hello world, I am visible on screen five only"  (not working, bug?)

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: if relative positioning were introduced it would be easier to interleave text and graphics.

So now one can simply write a bash script which will loop forever writing the correct strings to the infobars. Call it status.sh and wmfs will launch it if it is in ~/.config/wmfs. Note that the output in the status.sh is as explained before.

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


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

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


The keybinding Alt+p 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 (but currently in the wrong order :( ).

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

wmfs -V :ln

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