CWMRC(5)
okay bestie, welcome to CWMRC(5) from the File Formats Manual β this is the cwmrc(5) page, aka the config-file manual for cwm(1), and we are gonna get you comfy with it π
β¨
π NAME π
cwmrc β calm window manager configuration file πΈ
π¦ DESCRIPTION π¦
this page is literally the manual for the cwm(1) configuration file. main character energy for your window manager setup, no cap π
β¨ syntax tea first β¨
okay so the current line can be extended over multiple lines using a backslash (\). comments can be put anywhere in the file using a hash mark (#), and they extend to the end of the current line. care should be taken when commenting out multi-line text: the comment is effective until the end of the entire block. arguments containing whitespace should be surrounded by double quotes (").
π the options, bestie π
the following options are accepted β yes, all of them, we are not skipping a single one π«Ά
autogroup group [windowname,]windowclassβ automatically add new windows togroupif their class property matcheswindowclass, or if their name and class properties matchwindownameandwindowclass, respectively. the more specific last match wins.groupis a number between0and9. ifgroupis0, matching windows will not be added to any group; this may be used to override βsticky group modeβ π thenameandclassvalues, respectively, for existing windows are both set in theWM_CLASSproperty and may be obtained usingxprop(1).bind-key key functionβ bind or rebindkeytofunction. the modifier keys come first, followed by a-, then a keysym name, taken from/usr/X11R6/include/X11/keysymdef.h. the following modifiers are recognised:C(Control key),M(Meta key),S(Shift key),4(Mod4 (windows) key), and5(Mod5 (AltGr) key). thefunctionmay either be one from the βBIND FUNCTION LISTβ (see below) or the command line that is to be executed.bind-mouse button functionβ bind or rebindbuttontofunction. the modifier keys come first, followed by a-, then the button number. the same modifiers are recognised as forkeyinbind-key. the following buttons are recognised:1(Left mouse button),2(Middle mouse button),3(Right mouse button),4(Scroll up mouse button), and5(Scroll down mouse button). thefunctionmay be taken from the βBIND FUNCTION LISTβ (see below) or the command line that is to be executed.borderwidth pixelsβ set the window border width topixelsπcolor activeborder colorβ set the color of the active border.color font colorβ set menu font color.color selfont colorβ set font color for selected menu item.color groupborder colorβ set the color of the border while grouping a window.color inactiveborder colorβ set the color of the inactive border.color menubg colorβ set menu background color.color menufg colorβ set menu foreground color.color urgencyborder colorβ set the color of the border of a window indicating urgency π₯color ungroupborder colorβ set the color of the border while ungrouping a window.command name pathβ everynameentry is shown in the application menu. when selected, the definedpathis executed withexecvp(3). thenameentriestermandlockhave a special meaning. they point to the terminal and screen locking programs specified by key bindings. the defaults arexterm(1)andxlock(1), respectively π«Άfontname fontβ change the default font forXft(3).gap top bottom left rightβ define a βgapβ in pixels at the edge of the screen, so that when a window is maximized it will not overlap this area. this βgapβ can be used for applications such asxclock(1), where the user may wish to remain visible πΈhtile percentβ set the percentage of screen the master window should occupy after callingwindow-htile. if set to0, the horizontal size of the master window will remain unchanged. the default is50.ignore windownameβ ignore, and do not warp to, windows with the namewindownamewhen drawing borders and cycling through windows πmoveamount pixelsβ set a default size for the keyboard movement bindings, in pixels. the default is1.snapdist pixelsβ minimum distance to snap-to adjacent edge, in pixels. the default is0.sticky yes|noβ toggle sticky group mode. the default behavior for new windows is to not assign any group. by enabling sticky group mode,cwm(1)will assign new windows to the currently selected group πunbind-key keyβ unbind function bound tokey. a special key keywordallcan be used to unbind all keys.unbind-mouse buttonβ unbind function bound tobutton. a special button keywordallcan be used to unbind all buttons.vtile percentβ set the percentage of screen the master window should occupy after callingwindow-vtile. if set to0, the vertical size of the master window will remain unchanged. the default is50.wm name pathβ everynameentry is shown in the wm menu. when selected, the window manager is replaced bypathπ
π BIND FUNCTION LIST π
okay bestie, this is the whole function menu β every name is literal, so type it exactly like itβs written. no vibes-based renaming, i beg π
restartβ restarts the runningcwm(1).quitβ quitscwm(1).terminalβ spawns a new terminal.lockβ locks the screen.menu-windowβ launches the window search menu.menu-window-hiddenβ launches the hidden window search menu.menu-cmdβ launches the application search menu.menu-groupβ launches the group search menu.menu-execβ launches the βexec programβ menu.menu-exec-wmβ launches the βexec WindowManagerβ menu.menu-sshβ launches the βsshβ menu.group-toggle-[n]β toggles visibility of group n, where n is1-9.group-only-[n]β shows only group n, where n is1-9, hiding the other groups.group-lastβ shows only the previously active group.group-close-[n]β closes all windows in group n, where n is1-9.group-toggle-allβ toggles visibility of all groups.window-groupβ toggles group membership of the current window.window-movetogroup-[n]β hides the current window from display and moves it to group n, where n is1-9.group-cycleβ forward cycles through groups.group-rcycleβ reverse cycles through groups.window-cycleβ forward cycles through windows.window-rcycleβ reverse cycles through windows.window-cycle-ingroupβ forward cycles through windows in the current group.window-rcycle-ingroupβ reverse cycles through windows in the current group.window-cycle-inclassβ forward cycles through windows of the current window class.window-rcycle-inclassβ reverse cycles through windows of the current window class.window-closeβ closes the current window.window-hideβ hides the current window.window-lowerβ lowers the current window.window-raiseβ raises the current window.window-menu-labelβ labels the current window.window-freezeβ freezes the current window geometry.window-stickβ sticks the current window to all groups (same as assigning tonogroup).window-fullscreenβ full-screens the current window (gap + border removed).window-maximizeβ maximizes the current window (gap + border honored).window-vmaximizeβ vertically maximizes the current window (gap + border honored).window-hmaximizeβ horizontally maximizes the current window (gap + border honored).window-htileβ places the current window at the top of the screen, maximizes it horizontally, and resizes it tohtile(default half) of the vertical screen space. other windows in its group share the remaining screen space π«Άwindow-vtileβ places the current window on the left of the screen, maximizes it vertically, and resizes it tovtile(default half) of the horizontal screen space. other windows in its group share the remaining screen space π«Άwindow-moveβ moves the current window.window-resizeβ resizes the current window.window-move-upβ moves the windowmoveamountpixels up.window-move-downβ moves the windowmoveamountpixels down.window-move-rightβ moves the windowmoveamountpixels right.window-move-leftβ moves the windowmoveamountpixels left.window-move-up-bigβ moves the window10timesmoveamountpixels up.window-move-down-bigβ moves the window10timesmoveamountpixels down.window-move-right-bigβ moves the window10timesmoveamountpixels right.window-move-left-bigβ moves the window10timesmoveamountpixels left.window-resize-upβ resizes the windowmoveamountpixels up.window-resize-downβ resizes the windowmoveamountpixels down.window-resize-rightβ resizes the windowmoveamountpixels right.window-resize-leftβ resizes the windowmoveamountpixels left.window-resize-up-bigβ resizes the window10timesmoveamountpixels up.window-resize-down-bigβ resizes the window10timesmoveamountpixels down.window-resize-right-bigβ resizes the window10timesmoveamountpixels right.window-resize-left-bigβ resizes the window10timesmoveamountpixels left.window-snap-centerβ snaps the window to center.window-snap-upβ snaps the window to the top edge.window-snap-downβ snaps the window to the bottom edge.window-snap-rightβ snaps the window to the right edge.window-snap-leftβ snaps the window to the left edge.window-snap-up-rightβ snaps the window to the top-right corner.window-snap-up-leftβ snaps the window to the top-left corner.window-snap-down-rightβ snaps the window to the bottom-right corner.window-snap-down-leftβ snaps the window to the bottom-left corner.pointer-move-upβ moves the pointermoveamountpixels up.pointer-move-downβ moves the pointermoveamountpixels down.pointer-move-rightβ moves the pointermoveamountpixels right.pointer-move-leftβ moves the pointermoveamountpixels left.pointer-move-up-bigβ moves the pointer10timesmoveamountpixels up.pointer-move-down-bigβ moves the pointer10timesmoveamountpixels down.pointer-move-right-bigβ moves the pointer10timesmoveamountpixels right.pointer-move-left-bigβ moves the pointer10timesmoveamountpixels left.
π FILES π
~/.cwmrcβ the defaultcwm(1)configuration file. this is the one, bestie π
β¨ EXAMPLES β¨
okay these are literally the example lines, so keep the code exactly as-is β no βimprovingβ the spacing, no cute little edits, none of that π
# Set default Xft(3) font
fontname "sans-serif:pixelsize=14:bold"
# Turn on sticky-group mode
sticky yes
# Any entry here is shown in the application menu
command firefox firefox
command xmms xmms
command top "xterm -e top"
# Autogroup definitions
autogroup 3 "aterm,XTerm"
autogroup 3 "xterm,XTerm"
# Ignore programs by that name by not drawing borders around them.
ignore XMMS
ignore xwi
ignore xapm
ignore xclock
# Key bindings
bind-key CM-r window-menu-label
bind-key CS-Return "xterm -e top"
bind-key C4-equal window-vmaximize
bind-key C4S-equal window-hmaximize
bind-key M-1 group-only-1
bind-key M-2 group-only-2
bind-key M-3 group-only-3
bind-key MS-1 window-movetogroup-1
bind-key MS-2 window-movetogroup-2
bind-key MS-3 window-movetogroup-3
unbind-key 4-o
unbind-key CM-equal
unbind-key CMS-equal
# Mouse bindings
bind-mouse M-2 window-lower
bind-mouse M-3 window-resize
π SEE ALSO π
cwm(1)β yes, the main character. go read it, bestie π«Ά
πΈ HISTORY πΈ
the cwmrc file format first appeared in OpenBSD 4.4. iconic behavior, honestly β¨
xoxo, this oneβs from the Debian build π β date stamp $Mdocdate$, page CWMRC(5) π
π¦ where this page comes from
- alpine 3.24: cwm-doc 7.9-r0 Β· ISC
- nixpkgs unstable: cwm 7.9
- Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms