Skip to content
Search

Dwm

lastmod 2024-11-05created 2020-06-2214 edits

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

In the tiled layout, windows are managed in a master area and a stack area. The master area contains the window that currently needs the most attention, while the stack area contains all other windows. In the monocle layout, all windows are maximized to the screen size. In the floating layout, windows can be resized and moved freely. Dialog windows are always managed as floating, regardless of the layout applied.

Windows are grouped by tags. Each window can be tagged with one or more tags. Selecting certain tags displays all windows with those tags.

Each screen has a small status bar that displays all available tags, the layout, the number of visible windows, the title of the focused window, and, if the screen is focused, the text read from the root window name property. A floating window is indicated by an empty square, and a maximized floating window by a filled square before the window title. Selected tags are shown in a different color. The tags of the focused window are indicated by a filled square in the top-left corner. Tags applied to one or more windows are indicated by an empty square in the top-left corner.

dwm draws a small customizable border around windows to indicate the focus state.

Features

  • dwm has no Lua integration, no 9P support, no shell-based configuration, and no remote control, and comes without additional tools such as printing the selection or warping the mouse.
  • dwm is only a single binary, and its source code is intended never to exceed 2000 SLOC.
  • dwm does not distinguish between layers. There is no floating or tiled layer. Clients of the currently selected tags can be rearranged on the fly, whether or not they are in the tiled layout. However, popups and fixed-size windows are always floating.
  • dwm is customized by editing its source code, which makes it very fast and secure. It does not process any input data not known at compile time, except for window titles and status text read from the root window name. To customize it to your needs, you don't have to learn Lua/sh/ruby or some weird configuration file format (e.g., X resource files) besides C. You only need to learn C (at least to edit the header).
  • Because dwm is customized by editing its source code, making binary packages of it is pointless. This keeps its user base small and elitist. No novices asking stupid questions. Some distributions do provide binary packages, though.
  • dwm reads the name of the root window to print arbitrary status text (e.g., date, load, battery charge). This is much simpler than larsremote, wmiir.
  • dwm creates a view for each Xinerama screen.

List of Tiling window manager

Statusbar configuration

The xsetroot package must be installed.

xsetroot -name "Thanks for all the fish!"

Dynamically updated information should be put in a loop which is forked to background - see the example below:

# Statusbar loop
while true; do
   xsetroot -name "$( date +"%F %R" )"
   sleep 1m    # Update time every minute
done &

# Autostart section
pcmanfm & 

exec dwm

Troubleshooting

IntelliJ black screen in dwm

Anyways, I found that installing wmname using pacman, and adding the following 3 lines to my xinitrc made IntelliJ work:

export _JAVA_AWT_WM_NONREPARENTING=1 
export AWT_TOOLKIT=MToolkit 
wmname LG3D

Programs that work well with it

See also

Favorite site

author Zer0 sitemap