Dwm

dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. All of the layouts can be applied dynamically, optimising the environment for the application in use and the task performed.


 * dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC.
 * dwm is customized through editing its source code

More details concerning dwm can be found on the dwm Homepage.

Installation
For most users, this is the install method you want.

Preferably, you'll want to enable USE flag "savedconfig" and save your customized configuration file to "/etc/portage/savedconfig//x11-wm/dwm-6.0.h" for your later editing pleasure.

If you have multiple monitors, you should also enable the "xinerama" USE flag regardless of whether or not you're using Xinerama.

Compile or install dwm:

Main dwm Configuration File (dwm.h file)
As stated previously, the main dwm configuration file is the "/etc/portage/savedconfig//x11-wm/dwm-6.0" file and after each change, dwm needs to be recompiled for any changes to take effect.

So you're editor may use syntax hilighting feature for C code create a symlink using a header filename.

(If you're already within a dwm session and just recompiled dwm, use the ++ key sequence for reloading the dwm binary currently executing within memory.)

startx configuration file (xinitrc file)
The preferred method of starting dwm is by way of $HOME/.xinitrc:

Using this method, users can pipe other commands such as Conky and IMWheel through this instance of dwm process.

Settings File (dwm.rc)
The default xsession file provided by the Gentoo Ebuild (/etc/X11/Sessions/dwm) provides for a default status box that displays system load and the date/time or whatever shell code the user creates at ~/.dwm/dwmrc. The present mechanism (as of dwm-6.0) for sending text to a status box in the window manager's bar is to use 'xsetroot', as illustrated by the default xsession mentioned above. With a few lines of shell code, one can use this mechanism to send arbitrary text to the status bar (for example, your CPU temperature, the current track on your music player, number of unread emails, etc.)

Using commandline startx (xinitrc)
If using the above xinitrc, use startx after logging in.

Using a Display Manager
(Any users using a display manager for logging into a dwm desktop?)

dmenu
dmenu is a dynamic menu for X, originally designed for dwm.

(aka META) + key sequence enables the menu.

You can customize dmenu's options during execution using the dwm.h file, such as displaying the menu at the bottom of the display.

Conky
For displaying additional status information on dwm's menu bar. Prefer installing with "-X" USE flag as only text information is piped through to the dwm instance. (USE flags for consideration are "-X hddtemp iostats wifi".)

Keys and Key Functions
is the default META key

Moving a Window Manually
To move a window to another window tag manually, hold down the META key and left click anywhere on the window. And then, while still holding down the META key, click again on the window tag you want to move the window to.

Commonly used Keys

 * + - Display window tag number two
 * + - dmenu
 * ++ - Kills a window


 * ++ - Launch a terminal
 * + - Use a tile layout
 * ++ - Quit dwm

Customizations
(Put user customization tricks & tips here.)

Assigning Applications to Window Tags
A user can have their favorite applications start on a different window tags, such as starting mplayer on window tag number five.

First, you need to know the "name" of the application recorded by Xorg so dwm can be aware of this window on startup. To find this, start your application (mplayer in this example) and then further execute a command called "xprop" (x11-apps/xprop). Click on the mplayer window and xprop will report Xorg's data on the mplayer window. Use the second window name identified on the "WM_CLASS(STRING)" line. Now we have the name of the window dwm needs to be self aware of. (Sometimes an application will have multiple windows of itself and will report one window without capital letters, while the second will have no capital letters! Wildcard char is allowed within window names and I currently have no idea how many regular expressions are recognized here.)

Upgrading to dwm-6.0
Upgrading from dwm-5.9 to dwm-6.0 incorporated many changes making your previous config.h a likely problem for compiling dwm-6.0. Likely problems displayed might be compiler error messages "[nowiki]'nmaster' undeclared[/nowiki]". To resolve, compile and install dwm-6.0 without using your custom config.h file and then find the default dwm-6.0 config.h file and diff against your old config.h file. (Or, uncompress the dwm-6.0 tarball to acquire the default dwm-6.0 config.h file.)

Remap META Key
If you have conflicts with the default dwm ALT key conflicting with your other console interface applications, you can use the ESC key while within your console application. The ESC key is an immediate usable fall back escape key. Another option, redefine the META key to use the keyboard "Windows Key" or other additional keys near the space bar.

To assign a second Meta key allowing a typer to have a Meta key on both sides of the keyboard, you can mimmick or copy this key activity to another key on the keyboard. The Microsoft Menu key (or context menu key) on Microsoft keyboards is directly opposite of the Microsoft Windows key. You'll need the x11-apps/xmodmap package for this. (For reference, the two key's values are: "showkey 125/127" and "xev 133/135" respectively - on my MS NEK4000 keyboard.)

xmodmap -e "keycode 135 = Super_L" # reassign MS Menu Keypress to Super_L xmodmap -e "remove mod1 = Super_L" # make sure X keeps it out of the mod1 group
 * 1) Top of $HOME/.xinitrc file is a good place for this.
 * 2) This reassigns MS NEK4000 right Menu key to simulate DWM Mod4Key as well.

Now, a user should have a non-conflicting and easily accessible Meta key on both sides of the keyboard!

External resources

 * dwm Homepage
 * dmenu Homepage