Search:  
Gentoo Wiki

EvilWM


Desktop environments

Lightweight desktop environments

Window managers

Compositing window managers

Screenshots

edit
EvilWM with aterm, gkrellm and beep
EvilWM with aterm, gkrellm and beep

Contents

What is EvilWM?

EvilWM is an extremely light weight WM; it has a source of less than 30kb and compiles in about 3 seconds. It provides keyboard shortcuts, multiple desktops and a 1px border.

Setup

emerge evilwm

as your user:

nano ~/.xinitrc

make your .xinitrc match this:

File: ~/.xinitrc
# Sample .xinitrc for starting evilwm
 
# Merge X resources from ~/.Xdefaults
[ -f $HOME/.Xdefaults ] && xrdb $HOME/.Xdefaults
 
# Set the background and root cursor shape (requires xsetroot)
xsetroot -solid \#400040
xsetroot -cursor_name left_ptr
 
# Start evilwm - snap to borders within 10 pixels
/usr/bin/evilwm -snap 10 &
 
# Transfer control to xclock - killing xclock (with Ctrl+Alt+Escape, say)
# will exit our session
exec xclock -digital -padding 2 -g -0+0
# Or, if you want to be able to exit X with Ctrl-Alt-Backspace only, use this
# dummy line as the last line:
#exec sleep infinity

Using EvilWM

When you start evilWM using startx from the command prompt you will notice that there is no menu and no tool bar. To launch a program in evilWM you must launch it in a terminal, to launch a terminal hit <ctrl><alt><return> and one will pop-up.

Controls

You can use the mouse to manipulate windows either by click/dragging the 1 pixel border, or by holding down Alt and doing so anywhere in the client window. The controls are:

Button 1 Move window.
Button 2 Resize window.
Button 3 Lower window.

Most keyboard controls are used by holding down Control and Alt, then pressing a key. Available functions are:

Return Spawn new xterm.
Escape Delete current window.
Insert Lower current window.
H, J, K, L Move window left, down, up or right (16 pixels).
Y, U, B, N Move window to top-left, top-right, bottom-left or bottom-right of screen.
I Show information about current window.
Equals Maximise current window vertically (toggle).
X Maximise current window (toggle).

If compiled with virtual desktop support, these functions are also available:

F Fix or unfix current window.
1 - 8 Switch virtual desktop.
Left Previous virtual desktop.
Right Next virtual desktop.

Notes:

In addition to the above, Alt+Tab can be used to cycle through windows on screen.
To move a window from one virtual desktop to another, fix it, switch desktop, then unfix it.
To make evilwm exit, kill xclock using Ctrl-Alt-Backspace or moving the cursor onto the clock and pressing Ctrl-Alt-Esc.

Launching Programs

While in evilWM, you may find it annoying to launch programs from a terminal and have to leave that terminal open. So, what you can do is this:
some_program & exit

This will detach the program from a terminal - *note* this does not work in all terminals. If you are really lazy (as I am) you can make an alias so that you only have to type

some_program & x

To do this, put the following line in your ~/.bashrc file

alias x='exit'

You don't have to use blankspaces, you can just type

some_program&x

...I said I was lazy =)

Another way is:
some_program & disown ; exit

This works at least with bash and zsh.

Really, you don't need to specify a second program. Just type

some_program&

At least this works in bash...

''OR...''

The other option you have for launching programs inside evilWM is to use a separate program launcher, and bind it to a key using xbindkeys. In my opinion the best launcher to use is gmrun, which lets you enter commands yourself and has "bash-like" completion. However, if you want a program launcher that uses icons you could try either apwal or pogo, both of which are available in portage. But back to gmrun, the first thing to do is install the necessary programs so as root do

emerge -av xbindkeys gmrun

Then all you need to do is create a .xbindkeysrc file in your home directory with the following lines

File: ~/.xbindkeysrc
# Sample .xbindkeysrc for launching gmrun
 
"gmrun"
  Alt +F2

Obviously here you can substitute "Alt + F2" with any key of your choice, although avoid using scroll lock, as this will stop other parts of evilWM from working when turned on.

Then issue the command xbindkeys in a terminal. Now pressing Alt + F2 will open up an easy to use launcher so you don't have to keep opening an xterm every time you want to run a program. If you want xbindkeys to run automatically whenever you log on then simply add the following line to your ~/.xprofile file. If the file doesn't already exist then just create it with only the following line.

xbindkeys

Make EvilWM work for you

At first glance evilWM may seem like a pretty bad WM, plain color background, no toolbar. So here is a list of programs/commands that will make your evilWM experience more enjoyable.

  • xv -quit -root -rmode 5 -max $HOME/images/bg2.jpg -- Set a background image stretched to the screen (requires xv)
    • Consider using the lightweight `feh --bg-scale ~/wallpaper.jpg`
  • /usr/bin/evilwm -term Eterm & -- Set your default terminal to something else (add this to your .xinitrc)
    • Consider using `mrxvt` as a tabbed terminal with truefont capability, without dependency on KDE, Gnome or E.
  • gdesklets -- great little widgets that allow you to add things such as a starter bar to your desktop
  • adesklets -- more widgets like gdesklets except much lighter weight in dependencies
  • asclock -- A replacement for xclock
  • idesk -- a simple program to put icons on your desktop that works great with EvilWM
  • gmrun -- a "run" dialog box with bash-like command completion. Also handles urls. Works best when configured with a hotkey via
  • xbindkeys -- a daemon featuring dead-easy configuration that allows you to bind programs to hotkeys.

Additional Settings

evilWM command line options:

  • -display display
    • specifies the X display to run on.
  • -term termprog
    • specifies an alternative program to run when spawning a new terminal (defaults to xterm, or x‐terminal‐emulator in Debian).
  • -fg foreground
    • frame colour of currently active window.
  • -bg background
    • frame colour of inactive windows.
  • -bw borderwidth
    • width of window borders in pixels.
  • -snap num
    • enable snap-to-border support. num gives the proximity in pixels to snap to.
  • -V
    • print version number.

KDM

To get evilWM to work with KDM, rename your .xinitrc to .xsession. Next time you load kde, select "Custom," and you will run whatever is in your .xsession.

See Also

Retrieved from "http://www.gentoo-wiki.info/EvilWM"

Last modified: Sat, 06 Sep 2008 07:38:00 +0000 Hits: 46,158