Difference between revisions of "Evilwm"

From ArchWiki
Jump to: navigation, search
m (fixed link)
(17 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:Desktop environments (English)]]
+
[[Category:Stacking WMs]]
[[Category:HOWTOs (English)]]
+
[[it:Evilwm]]
 
+
[http://www.6809.org.uk/evilwm/ evilwm] is a minimalist window manager for the X Window system. It's minimalist in that it omits unnecessary stuff like window decorations and icons. But it's very usable in that it provides good keyboard control with repositioning and maximize toggles, solid window drags, snap-to-border support, and virtual desktops. Its installed binary size is only 0.07 MB.
evilwm is a minimalist window manager for the X Window system. It's minimalist in that it omits unnecessary stuff like window decorations and icons. But it's very usable in that it provides good keyboard control with repositioning and maximize toggles, solid window drags, snap-to-border support, and virtual desktops. It's installed binary size is only 0.07 MB.
+
  
 
==Installation==
 
==Installation==
  
 
evilwm is part of the extra repository, so installation is as simple as running:
 
evilwm is part of the extra repository, so installation is as simple as running:
  pacman -S evilwm
+
  # pacman -S evilwm
  
 
==Configuration==
 
==Configuration==
Line 13: Line 12:
 
===Starting evilwm===
 
===Starting evilwm===
  
To start evilwm (without any options) via ''startx'', ensure your ~/.xinitrc file contains:
+
To start evilwm (without any options) via ''startx'', ensure your {{ic|~/.xinitrc}} file contains:
 
  exec evilwm
 
  exec evilwm
  
evilwm doesn't control the desktop background or mouse cursor, so you may want to also specify these in your ~/.xinitrc file. For example, to provide a solid color background and use the left pointer of your current mouse theme:
+
evilwm doesn't control the desktop background or mouse cursor, so you may want to also specify these in your {{ic|~/.xinitrc}} file. For example, to provide a solid color background and use the left pointer of your current mouse theme:
 
  xsetroot -solid \#3f3f3f
 
  xsetroot -solid \#3f3f3f
 
  xsetroot -cursor_name left_ptr
 
  xsetroot -cursor_name left_ptr
Line 22: Line 21:
 
For other options, please consult ''man xsetroot''.
 
For other options, please consult ''man xsetroot''.
  
===Startup options===
+
=== Startup options ===
  
evilwm doesn't use a configuration file, but rather options switches when starting the window manager. Example options include:
+
evilwm can read options via command line switches. Some examples:
-fg ''color'' (frame color of currently active window)
+
-bw ''borderwidth'' (width of window borders in pixels)
+
-term ''termprog'' (specifies a program to run when spawming a new terminal. default is xterm)
+
-snap ''number'' (enables snap-to-border support and specifies the proximity in pixels to snap to)
+
-mask1 ''modifier'' (override the default ctrl+alt keyboard modifiers to something else)
+
-nosoliddrag (draw a window outline while moving or resizing, rather than drawing the entire window)
+
  
A full list of the evilwm options can be found via ''man evilwm''.
+
* <code>-fg <color></code>      (Frame color of currently active window)
 +
* <code>-bw <number></code>      (Width of window borders in pixels)
 +
* <code>-term <term></code>      (Specifies a program to run when spawming a new terminal; default is xterm)
 +
* <code>-snap <number></code>    (enables snap-to-border support and specifies the proximity in pixels to snap to)
 +
* <code>-mask1 <modifier></code> (override the default Ctrl+Alt keyboard modifiers)
 +
* <code>-nosoliddrag</code>      (draw a window outline while moving or resizing, rather than drawing the entire window)
 +
 
 +
A full list of the evilwm options can be found via <code>man evilwm</code>.
 +
 
 +
By default, evilwm draws a one pixel gold border around the currenly active window.
 +
An example of the use of switches to change this would be a {{ic|~/.xinitrc}} file such as:
  
By default, evilwm draws a one pixel gold border around the currenly active window. An example of the use of the options to change this would be a ~/.xinitrc file such as:
 
 
  exec evilwm -snap 10 -bw 2 -fg red
 
  exec evilwm -snap 10 -bw 2 -fg red
This would enable the snap-to-border option at a 10 pixel distance and change the default border width to 2 and the color of the currently active window border to red.
+
 
 +
This would enable
 +
 
 +
* snapping to a border within 10 pixels,
 +
* a border width of 2 pixels,
 +
* red for the currently active window border.
 +
 
 +
From http://www.6809.org.uk/evilwm/usage.shtml:
 +
 
 +
''evilwm will also read options, one per line, from a file called .evilwmrc in the user's home directory.''
 +
''Options listed in a configuration file should omit the leading dash. Options specified on the command line''
 +
''override those found in the configuration file.''
  
 
==Using evilwm==
 
==Using evilwm==
  
After starting evilwm you will see nothing but a mouse cursor and a black background (or other background if you specified it as above).  To open a terminal, use the key combination ctrl+alt+return. Programs can then be run from the terminal using ''ProgramName&''.
+
After starting evilwm you will see nothing but a mouse cursor and a black background (or other background if you specified it as above).  To open a terminal, use the key combination Ctrl+Alt+Return. Programs can then be run from the terminal using ''ProgramName&''.
  
 
===Keyboard controls===
 
===Keyboard controls===
  
Using the keyboard combination of ctrl+alt plus a third key gives you these functions:
+
Using the keyboard combination of Ctrl+Alt plus a third key gives you these functions:
Return - spawns new terminal
+
*Return &ndash; spawns new terminal
Escape - Deletes current window
+
*Escape &ndash; Deletes current window
Insert - Lowers current window
+
*Insert &ndash; Lowers current window
H,J,K,L - Move window left, down, up, right 16 pixels
+
*H,J,K,L &ndash; Move window left, down, up, right 16 pixels
Y,U,B,N - Move window to top-left, top-right, bottom-left, bottom-right corner
+
*Y,U,B,N &ndash; Move window to top-left, top-right, bottom-left, bottom-right corner
I - Show information about current window
+
*I &ndash; Show information about current window
= - Maximize current window vertically (toggle)
+
*= &ndash; Maximize current window vertically (toggle)
X - Maximize current window full-screen (toggle)
+
*X &ndash; Maximize current window full-screen (toggle)
  
 
===Mouse controls===
 
===Mouse controls===
  
By holding down the alt key, you can perform these functions with the mouse:
+
By holding down the Alt key, you can perform these functions with the mouse:
Button 1 - move window
+
*Button 1 &ndash; Move window
Button 2 - resize window
+
*Button 2 &ndash; Resize window
Button 3 - lower window
+
*Button 3 &ndash; Lower window
  
 
===Virtual desktops===
 
===Virtual desktops===
  
Using the keyboard combination of ctrl+alt plus a third key gives you these virtual desktop functions:
+
Using the keyboard combination of Ctrl+Alt plus a third key gives you these virtual desktop functions:
1-8 - Swith virtual desktop
+
*1-8 &ndash; Switch virtual desktop
left - Previous virtual desktop
+
*left &ndash; Previous virtual desktop
right - Next virtual desktop
+
*right &ndash; Next virtual desktop
F - Fix or unfix current window
+
*F &ndash; Fix or unfix current window
  
 
To move a window from one virtual desktop to another, fix it, switch desktop, then unfix it.
 
To move a window from one virtual desktop to another, fix it, switch desktop, then unfix it.
alt+tab can also be used to cycle through windows on the current desktop.
+
Alt+Tab can also be used to cycle through windows on the current desktop.
  
 
==Tips & Tricks==
 
==Tips & Tricks==
Line 76: Line 89:
 
===Horizontal window maximize===
 
===Horizontal window maximize===
  
The key combination of ctrl+alt+= will maximize a window vertically. To maximize a window horizontally, use ctrl+alt+= to maximize it vertically, then ctrl+alt+X to maximize it horizontally (as opposed to just using ctrl+alt+X to maximize it full-screen).
+
The key combination of Ctrl+Alt+= will maximize a window vertically. To maximize a window horizontally, use Ctrl+Alt+= to maximize it vertically, then Ctrl+Alt+X to maximize it horizontally (as opposed to just using Ctrl+Alt+X to maximize it full-screen).
  
===Exit evilwm by ending a program===
+
=== Exit evilwm by ending a program ===
  
By default, evilwm has no quit option. To exit, simply kill X (ctrl+alt+backspace).
+
By default, evilwm has no quit option. To exit, simply kill X with
If you wish, you can exit evilwm by closing a specific program. Instead of using ''exec evilwm'' in your ~/.xinitrc file, you can transfer exec to another program. Ending this other program will then exit evilwm. For example:
+
[[Keyboard_Configuration_in_Xorg#Terminating_Xorg_with_Ctrl.2BAlt.2BBackspace|Ctrl+Alt+Backspace]].
# start evilwm (snap-to-border within 10 pixels option, 2 pixel window border, active window border red)
+
If you wish, you can exit evilwm by closing a specific program. Instead of using
/usr/bin/evilwm -snap 10 -bw 2 -fg red&
+
<code>exec evilwm</code> in your {{ic|~/.xinitrc}} file, you can transfer
 +
exec to another program. Killing this program will then exit evilwm.
 +
For example:
  
# transfer exec control to xclock
+
<pre>
# killing xclock (with ctrl+alt+escape, say) will exit evilwm
+
$ cat ~/.xinitrc
exec xclock -digital
+
#!/bin/sh
 +
 
 +
evilwm -snap 10 -bw 2 -fg red &
 +
exec xclock
 +
</pre>
  
 
===Resize windows using the keyboard===
 
===Resize windows using the keyboard===
  
Although not mentioned in the man-page, you can resize windows with the keyboard as well as the mouse. Using the same key-combinations for moving a window, just add the ''shift'' key to the mix to resize a window.
+
Although not mentioned in the man-page, you can resize windows with the keyboard as well as the mouse. Using the same key-combinations for moving a window, just add the ''Shift'' key to the mix to resize a window.
  
Ctrl+alt+''shift'':
+
Ctrl+Alt+''Shift'':
 
  H,J,K,L - Resize window smaller horizontally, larger vertically, smaller vertically, larger horizontally
 
  H,J,K,L - Resize window smaller horizontally, larger vertically, smaller vertically, larger horizontally
  
==Lost focus bug fix==
+
===Keybindings===
 +
 
 +
You can make life easier by using {{pkg|xbindkeys}} to run commands in evilwm. See [[Xbindkeys]] for more details.
 +
 
 +
==Troubleshooting==
 +
 
 +
===Lost focus bug fix===
  
 
Some users suffer from a bug where evilwm loses focus after closing a window. This means that evilwm stops responding to keyboard shortcuts, and if no other window is open which the mouse can be moved over to regain focus evilwm becomes unusable and has to be restarted.
 
Some users suffer from a bug where evilwm loses focus after closing a window. This means that evilwm stops responding to keyboard shortcuts, and if no other window is open which the mouse can be moved over to regain focus evilwm becomes unusable and has to be restarted.
  
 
Right now the solution requires adding one line to the source code, recompiling evilwm and installing it manually (not via pacman). To fix the bug, get the source code from the official website, unpack it and open "client.c" with any text editor. Find the "remove_client" function and add the following to the very end of its definition (after the "LOG_DEBUG" call):
 
Right now the solution requires adding one line to the source code, recompiling evilwm and installing it manually (not via pacman). To fix the bug, get the source code from the official website, unpack it and open "client.c" with any text editor. Find the "remove_client" function and add the following to the very end of its definition (after the "LOG_DEBUG" call):
  "XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);"
+
  XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
 +
and compile and install evilwm by running "make" and "make install" (the latter with root privileges).
 +
 
 
The author of evilwm has been told both of this bug and this fix, but he has not yet released a new version of evilwm which incorporates this solution.
 
The author of evilwm has been told both of this bug and this fix, but he has not yet released a new version of evilwm which incorporates this solution.
 +
 +
===evilwm doesn't start===
 +
 +
(Sourced from the forums thread [https://bbs.archlinux.org/viewtopic.php?id=38671 here].)
 +
 +
When you run evilwm, xorg presents error messages in the log file and/or on the screen and exits. The messages may vary from system to system. Probably {{pkg|xorg-fonts-100dpi}} or  {{pkg|xorg-fonts-75dpi}} is missing. Install either font to solve the problem.
  
 
==Links==
 
==Links==
[http://www.6809.org.uk/evilwm/ evilwm] - the official website of evilwm
+
*[http://www.6809.org.uk/evilwm/ evilwm] - the official website of evilwm

Revision as of 16:28, 1 November 2013

evilwm is a minimalist window manager for the X Window system. It's minimalist in that it omits unnecessary stuff like window decorations and icons. But it's very usable in that it provides good keyboard control with repositioning and maximize toggles, solid window drags, snap-to-border support, and virtual desktops. Its installed binary size is only 0.07 MB.

Installation

evilwm is part of the extra repository, so installation is as simple as running:

# pacman -S evilwm

Configuration

Starting evilwm

To start evilwm (without any options) via startx, ensure your ~/.xinitrc file contains:

exec evilwm

evilwm doesn't control the desktop background or mouse cursor, so you may want to also specify these in your ~/.xinitrc file. For example, to provide a solid color background and use the left pointer of your current mouse theme:

xsetroot -solid \#3f3f3f
xsetroot -cursor_name left_ptr

For other options, please consult man xsetroot.

Startup options

evilwm can read options via command line switches. Some examples:

  • -fg <color> (Frame color of currently active window)
  • -bw <number> (Width of window borders in pixels)
  • -term <term> (Specifies a program to run when spawming a new terminal; default is xterm)
  • -snap <number> (enables snap-to-border support and specifies the proximity in pixels to snap to)
  • -mask1 <modifier> (override the default Ctrl+Alt keyboard modifiers)
  • -nosoliddrag (draw a window outline while moving or resizing, rather than drawing the entire window)

A full list of the evilwm options can be found via man evilwm.

By default, evilwm draws a one pixel gold border around the currenly active window. An example of the use of switches to change this would be a ~/.xinitrc file such as:

exec evilwm -snap 10 -bw 2 -fg red

This would enable

  • snapping to a border within 10 pixels,
  • a border width of 2 pixels,
  • red for the currently active window border.

From http://www.6809.org.uk/evilwm/usage.shtml:

evilwm will also read options, one per line, from a file called .evilwmrc in the user's home directory. Options listed in a configuration file should omit the leading dash. Options specified on the command line override those found in the configuration file.

Using evilwm

After starting evilwm you will see nothing but a mouse cursor and a black background (or other background if you specified it as above). To open a terminal, use the key combination Ctrl+Alt+Return. Programs can then be run from the terminal using ProgramName&.

Keyboard controls

Using the keyboard combination of Ctrl+Alt plus a third key gives you these functions:

  • Return – spawns new terminal
  • Escape – Deletes current window
  • Insert – Lowers current window
  • H,J,K,L – Move window left, down, up, right 16 pixels
  • Y,U,B,N – Move window to top-left, top-right, bottom-left, bottom-right corner
  • I – Show information about current window
  • = – Maximize current window vertically (toggle)
  • X – Maximize current window full-screen (toggle)

Mouse controls

By holding down the Alt key, you can perform these functions with the mouse:

  • Button 1 – Move window
  • Button 2 – Resize window
  • Button 3 – Lower window

Virtual desktops

Using the keyboard combination of Ctrl+Alt plus a third key gives you these virtual desktop functions:

  • 1-8 – Switch virtual desktop
  • left – Previous virtual desktop
  • right – Next virtual desktop
  • F – Fix or unfix current window

To move a window from one virtual desktop to another, fix it, switch desktop, then unfix it. Alt+Tab can also be used to cycle through windows on the current desktop.

Tips & Tricks

Horizontal window maximize

The key combination of Ctrl+Alt+= will maximize a window vertically. To maximize a window horizontally, use Ctrl+Alt+= to maximize it vertically, then Ctrl+Alt+X to maximize it horizontally (as opposed to just using Ctrl+Alt+X to maximize it full-screen).

Exit evilwm by ending a program

By default, evilwm has no quit option. To exit, simply kill X with Ctrl+Alt+Backspace. If you wish, you can exit evilwm by closing a specific program. Instead of using exec evilwm in your ~/.xinitrc file, you can transfer exec to another program. Killing this program will then exit evilwm. For example:

$ cat ~/.xinitrc
#!/bin/sh

evilwm -snap 10 -bw 2 -fg red &
exec xclock

Resize windows using the keyboard

Although not mentioned in the man-page, you can resize windows with the keyboard as well as the mouse. Using the same key-combinations for moving a window, just add the Shift key to the mix to resize a window.

Ctrl+Alt+Shift:

H,J,K,L - Resize window smaller horizontally, larger vertically, smaller vertically, larger horizontally

Keybindings

You can make life easier by using xbindkeys to run commands in evilwm. See Xbindkeys for more details.

Troubleshooting

Lost focus bug fix

Some users suffer from a bug where evilwm loses focus after closing a window. This means that evilwm stops responding to keyboard shortcuts, and if no other window is open which the mouse can be moved over to regain focus evilwm becomes unusable and has to be restarted.

Right now the solution requires adding one line to the source code, recompiling evilwm and installing it manually (not via pacman). To fix the bug, get the source code from the official website, unpack it and open "client.c" with any text editor. Find the "remove_client" function and add the following to the very end of its definition (after the "LOG_DEBUG" call):

XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);

and compile and install evilwm by running "make" and "make install" (the latter with root privileges).

The author of evilwm has been told both of this bug and this fix, but he has not yet released a new version of evilwm which incorporates this solution.

evilwm doesn't start

(Sourced from the forums thread here.)

When you run evilwm, xorg presents error messages in the log file and/or on the screen and exits. The messages may vary from system to system. Probably xorg-fonts-100dpi or xorg-fonts-75dpi is missing. Install either font to solve the problem.

Links

  • evilwm - the official website of evilwm