Skip to content
Mihai Olteanu edited this page Dec 13, 2016 · 2 revisions

An introduction to some of the basic concepts used by StumpWM.

Screens and Heads

A screen is an Xlib concept representing a section of video memory onto which physical monitors, called “heads”, are mapped. A screen can be thought of as an abstract rectangle containing all the heads arranged in a particular layout.

With most modern systems, you’ll only have a single screen no matter how many heads are connected to your computer. Each head will have its own frame, and you can move between heads using the normal frame movement commands.

The layout of the heads within the screen can be specified in one of two ways: either at startup using your system’s Xorg configuration files, or on the fly using tools like XRandR. If the computer is booted with multiple monitors attached, but without specifying a layout for them, they will all show identical output.

StumpWM will attempt to detect the layout of the heads once at startup, or any time a RandR command is issued.

In rarer setups you may have multiple screens, with one head per screen. That means that you’ll move between heads using screen movement commands (`snext’, `sprev’, and `sother’) rather than frame movement commands.

Group Basics

A group is usually referred to as a “desktop” or “workspace” in other window managers. StumpWM starts with a single group, called “Default”. Each group has its own configuration of frames and windows that is separate from and independent of other groups. You can’t have different groups display in different monitors: when you switch groups, all monitors switch to that group.

Each group contains an ordered list of frames.

Floating Group Basics

Within a floating group, windows behave more like they do in traditional window managers: rather than being arranged into frames, they each have their own box, which can be freely resized and repositioned, and allowed to overlap. Each window has a thicker border at the top. Left click in this border and drag to move the window, or right click and drag to resize it.

Most of the window-switching commands listed below do not function in a floating group. You’re restricted to `other’, the `select-window-*’ commands, and `windowlist’.

Frame Basics

Frames are the boxes within which windows are displayed. StumpWM starts with a single frame per head, meaning that each monitor shows a single window, full screen. If you want to see windows side-by-side, you can “split” this frame in two, either vertically or horizontally. These frames can be further split, creating nested boxes.

Technically speaking, frames live within a “frame tree”. When you split a frame, the command actually creates two new frames side-by-side within the original parent frame. This makes no practical difference, unless you use the `sibling’ command, which will move to the other child frame within the parent frame.

Within this frame tree model, all frames either contain other frames, or windows. The command `fclear’ will hide all a frame’s windows and show the background.

Window Basics

Windows are created by programs to display their output. They take the shape of the frame in which they are created. The windows within a frame are ordered by how recently that window was focused. Only the top window in the stack is visible.

System Trays and the Mode Line

Many users choose to sacrifice a little screen real-estate to display some generally useful information: the current time and date, wireless network connections, the names of open windows, etc. StumpWM allows you to display this information in a bar across either the top or the bottom of the screen. There are two ways to do this: using external programs called system trays, or using StumpWM’s own mode line.

System trays are a special kind of X window. They advertise to running programs that they are available for embedding icons or notifications from those programs. They often also display clickable icons for each open window. Common tray programs include the GNOME panel or KDE’s kicker, or simpler programs such as stalonetray. Simply starting one of these programs is usually enough for StumpWM to detect it, place it correctly, and allow it to function normally.

The mode line, a concept borrowed from Emacs, is a built-in part of StumpWM. It is essentially a string of text that can include a variety of information about your current session, including the names of current groups and windows. Several contrib modules provide for different types of information. See the Mode Line section of the manual (and the contrib directory) for more.