WMFS guide

A few days after the DWM guide comes another tiling WM article on WMFS, a more friendly tiling manager, or at least easier to customize for WM beginners.

Tips : a usefull help when configuring your system is the Arpinux Live CD. The main tiling WMs are presents and you can access any config file you wish. The wall from the next screen comes from his collection.

WMFS01
# Install and configure WMFS on Debian

Install dependencies:

$ sudo apt-get install git-core libimlib2-dev build-essential libxinerama-dev libx11-dev

Download and install WMFS:

 $ git clone git://github.com/xorg62/wmfs.git
 $ cd wmfs
 $ ./configure
 $ make
 $ sudo make install

Create the login script (here using LightDM as a login manager):

 $ cd /usr/share/xsessions/
 $ sudo vim wmfs.desktop
 [Desktop Entry]
 Encoding=UTF-8
 Type=XSession
 Exec=/home/user/bin/startwmfs
 Name=Wmfs
 Icon=
 Type=Application

Create the startup script called (we’ll get back later to the conky line):

 $ vim ~/bin/startwmfs
 #!/usr/bin/env bash
 nitrogen --restore &
 urxvtd -q -o -f
 sleep 1 &
 conky | while true; read line; do wmfs -c status "testbar $line"; done &
 exec wmfs

Make it executable:

 $ chmod 755 ~/bin/startwmfs

You’re set and ready to launch WMFS in its default settings. Restart X.

WMFS02
Here with Ranger, Cmus, Vim, URxvt

# Customization

For any personnal changes, you need to copy the wmfsrc file from the orginal folder:

 $ mkdir ~/.config/wmfs/
 $ cp wmfsrc ~/.config/wmfs/

You can split your config files, just call them in wmfsrc with an ‘include’. See example on github. Configuration is easy, just read the comments and test your settings reloading the interface : Ctrl+Alt+R.

One annoying bug is the terminal windows not occupying all their space, resulting borders of various pixel sizes. Patch your /src/client.c file in the WMFS installation folder as follow.

Find and replace this line:

client_geo_hints(&c->wgeo, (int*)c->sizeh);

With these two:

if(c->flags & CLIENT_FREE)
      client_geo_hints(&c->wgeo, (int*)c->sizeh);

Run sudo make install and relaunch WMFS with Ctrl+Alt+R.

Spend the following hours to create your perfect theme, or get some on the web, and configure any shortcut you like to launch programs or resize and tile your windows.

wmfs_04
Alpine, Thunar, Canto (RSS)

# Statusbar & conky script

Any kind of text can be displayed in the statusbar. Try:

wmfs -c status "testbar Blablabla pouet"

Replace ‘testbar‘ by the name given to your top or bottom statusbar in the wmfsrc file, section [bar]. You can now create or modify your .conkyrc file and add it to the startup script.

Conky line example (with a few spawners):

out_to_console yes
out_to_x no
background yes
update_interval 1
total_run_times 0
no_buffers yes
use_xft yes

TEXT
^s[right;\#BDE077; $uptime]\
^s[right;\#444444; | ]\
^s[right;\#BBBBBB; HDD:] ^s[right;\#A6D4E0; ${fs_used_perc /}% ] 
^p[right;8;10;0;${fs_used_perc /};100;\#445544;\#A6D4E0;ckyhdd](1;spawn;urxvtc -e ranger)\
^s[right;\#444444; | ]\
^s[right;\#BBBBBB; BAT:] ^s[right;\#FDA53C; ${battery_percent BAT0 /}% ] 
^p[right;8;10;0;${battery_percent BAT0 /};100;\#514028;\#FDA53C;ckybat01]\
^s[right;\#444444; | ]\
^s[right;\#BBBBBB; WL:] ^s[right;\#E8DD9E; ${wireless_essid eth1}]\
^s[right;\#444444; | ]\
^s[right;\#BBBBBB; VOL:] ^s[right;\#BDE077; ${exec amixer get Master -M | grep -oE "[[:digit:]]*%"} ]\
^p[right;40;8;1;${exec amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/' | cut -d% -f1};100;\#BDE077;\#4A5A2E](1;spawn;urxvtc -e cmus)\
^s[right;\#444444; | ]\
^s[right;\#CCCCCC; ${time %a %d %b}] 
^s[right;\#A6D4E0; ${time %H:%M}  ]\

And this line to your startup script (once again modify the bar name according to wmfsrc):

conky | while true; read line; do wmfs -c status "testbar $line"; done &

Well done, you have mastered another WM.

wmfs_05

# Usefull links

  • French guide and config files [here]
  • Crunchbang threads [here] and [here]
  • My own config files on [github]
Advertisements

Comments are closed.

Blog at WordPress.com.

Up ↑