CTWM(1)

๐Ÿ“ฆ version 3.7, in ubuntu jammy

โœจ CTWM(1) โœจ โ€” or, the manual page for ctwm, Claude's Tab Window Manager for the X Window System ๐Ÿซถ

(that's from the General Commands Manual, bestie ๐Ÿ’…)


๐ŸŒธ NAME ๐ŸŒธ

ctwm โ€” Claude's Tab Window Manager for the X Window System ๐Ÿ‘‘


๐ŸŽ€ SYNTAX ๐ŸŽ€

ctwm [-display dpy] [-s] [-cfgchk] [-f initfile] [-v] [-n] [-k] [-K m4file] [-w [win-id]]

okay so that's literally it, that's how you summon her ๐Ÿ’–


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

ctwm is a window manager for the X Window System, and she is serving. She gives you titlebars, shaped windows, virtual screens (aka workspaces), several forms of icon management, user-defined macro functions, click-to-type and pointer-driven keyboard focus, and user-specified key and pointer button bindings. The whole package. The full lewk. โœจ

Real talk though โ€” she's actually twm(1) (the Tab Window Manager) from the MIT X11 distribution, just slightly modified so she can handle several virtual screens (workspaces). Very glow-up of her. She's also heavily inspired by the Hewlett-Packard vuewm window manager. ๐Ÿ‘‘

Plus! ctwm can use coloured, shaped icons and background root pixmaps in XPM format [from Arnaud Le Hors], any format understood by the imconv package [from the San Diego Supercomputer Center], and xwd files. And here's the tea: ctwm can be compiled to use both, either, or none of the above icon/pixmap formats. Compile-time choose-your-own-adventure fr fr.

This program is usually started by the user's session manager or startup script. When you use it from xdm(1) or xinit(1) without a session manager, ctwm is frequently executed in the foreground as the last client. And when you run it that way, exiting ctwm causes the session to be terminated (i.e. logged out). So like... don't just casually close her, bestie ๐Ÿ˜ญ


๐ŸŽ€ the default interface, explained with love ๐ŸŽ€

By default, application windows are surrounded by a โ€˜frameโ€™ with a titlebar at the top and a special border around the window. The titlebar contains:

  • the window's name ๐Ÿท๏ธ
  • a rectangle that is lit when the window is receiving keyboard input ๐Ÿ’ก
  • function boxes known as โ€˜titlebuttonsโ€™ at the left and right edges of the titlebar ๐ŸŽ›๏ธ

Pressing pointer Button1 (usually the left-most button unless it has been changed with xmodmap) on a titlebutton will invoke the function associated with the button. In the default interface, windows are iconified by clicking (pressing and then immediately releasing) the left titlebutton (which looks like a Dot). Conversely, windows are deiconified by clicking in the associated icon or entry in the icon manager โ€” see the description of the variable ShowIconManager and of the function f.showiconmgr. ๐Ÿซถ

Windows are resized by pressing the right titlebutton (which resembles a group of nested squares), dragging the pointer over edge that is to be moved, and releasing the pointer when the outline of the window is the desired size. Similarly, windows are moved by pressing in the title or highlight region, dragging a window outline to the new location, and then releasing when the outline is in the desired position. And just clicking in the title or highlight region raises the window without moving it โ€” no dragging required, iconic behaviour honestly. โœจ

When new windows are created, ctwm will honor any size and location information requested by the user (usually through the -geometry command line argument or resources for the individual applications). Otherwise, an outline of the window's default size, its titlebar, and lines dividing the window into a 3x3 grid that track the pointer are displayed. Then:

  • Clicking pointer Button1 will position the window at the current position and give it the default size.
  • Pressing pointer Button2 (usually the middle pointer button) and dragging the outline will give the window its current position but allow the sides to be resized as described above.
  • Clicking pointer Button3 (usually the right pointer button) will give the window its current position but attempt to make it long enough to touch the bottom the screen.

three buttons, three vibes, pick your fighter ๐Ÿ’…


๐Ÿ’– OPTIONS ๐Ÿ’–

ctwm accepts the following command line options:

  • -display dpy โ€” This option specifies the X server to use. ๐Ÿ–ฅ๏ธ
  • -s โ€” This option indicates that only the default screen (as specified by -display or by the DISPLAY environment variable) should be managed. By default, ctwm will attempt to manage all screens on the display. lowkey a "just the one, thanks" flag โœจ
  • -cfgchk โ€” This option causes ctwm to only try to parse the config file, and indicate whether errors are found. vibe check your config without committing, we love a dry run ๐Ÿงš
  • -f filename โ€” This option specifies the name of the startup file to use. ctwm will first try to load filename.num, where num is the screen number. If it fails, it will try to load filename. By default, ctwm will look in the user's home directory for files named .ctwmrc.num, .ctwmrc, .twmrc.num, or .twmrc (where num is a screen number). ๐Ÿ 
  • -v โ€” This option indicates that ctwm should print error messages whenever an unexpected X Error event is received. This can be useful when debugging applications but can be distracting in regular use. main character debugging energy, but she will be loud ๐Ÿ“ข
  • -n โ€” This option indicates that ctwm should not filter the startup file through m4. Available only if ctwm is compiled with the USEM4 flag. ๐Ÿšซ
  • -k โ€” This option indicates that ctwm should keep the definitions it prepends to your startup file when filtering through m4 in /tmp. Available only if ctwm is compiled with the USEM4 flag. ๐Ÿ“
  • -K m4file โ€” This option indicates that ctwm should keep the result of filtering your startup file through m4 in the named file. Available only if ctwm is compiled with the USEM4 flag. ๐Ÿ—‚๏ธ
  • -version โ€” ctwm just prints its version number. short n sweet, no notes ๐Ÿ’œ
  • -info โ€” ctwm prints its detailed version and compile time options. the full dossier ๐Ÿ“‹
  • -w [win-id] โ€” If -w is specified without a win-id value, ctwm does not take over the whole screen(s), instead it creates a new window that becomes its root window. if the win-id value is given, it is considered to be the id of an existing window, in which case, ctwm will try to use this window as root window. You can run any number of instantiation of ctwm at the same time. You can even have embedded ctwm instantiations. This is totally useless, but I like it. The f.adoptwindow function can be used to capture an existing window belonging to another ctwm. A possible use of such mode can be to test new configuration file without restarting ctwm. ๐Ÿช† (window managers inside window managers inside window managers, it's giving matryoshka)
  • -W โ€” This option tells ctwm not to display any welcome when starting. no intro, no ceremony, just vibes ๐Ÿคซ

๐ŸŒˆ CUSTOMIZATION ๐ŸŒˆ

Much of ctwm's appearance and behavior can be controlled by providing a startup file in one of the following locations (searched in order for each screen being managed when ctwm begins):

  • $HOME/.ctwmrc.screennumber โ€” The screennumber is a small positive number (e.g. 0, 1, etc.) representing the screen number (e.g. the last number in the DISPLAY environment variable host:displaynum.screennum) that would be used to contact that screen of the display. This is intended for displays with multiple screens of differing visual types. ๐Ÿ–ผ๏ธ
  • $HOME/.ctwmrc โ€” This is the usual name for an individual user's startup file. the classic, the standard, the moment ๐Ÿ’…
  • $HOME/.twmrc.screennumber
  • $HOME/.twmrc โ€” The users twm startup file.
  • /usr/lib/X11/twm/system.ctwmrc โ€” If none of the preceding files are found, ctwm will look in this file for a default configuration. This is often tailored by the site administrator to provide convenient menus or familiar bindings for novice users. ๐Ÿ‘‘

If no startup files are found, ctwm will use the built-in defaults described above. The only resource used by ctwm is bitmapFilePath for a colon-separated list of directories to search when looking for bitmap files (for more information, see the Athena Widgets manual and xrdb(1)).

ctwm startup files are logically broken up into three types of specifications: Variables, Bindings, Menus. ๐ŸŽ€

  • The Variables section must come first and is used to describe the fonts, colors, cursors, border widths, icon and window placement, highlighting, autoraising, layout of titles, warping, use of the icon manager.
  • The Bindings section usually comes second and is used to specify the functions that should be to be invoked when keyboard and pointer buttons are pressed in windows, icons, titles, and frames.
  • The Menus section gives any user-defined menus (containing functions to be invoked or commands to be executed).
okay important rules, bestie, write these down ๐Ÿ“

Variable names and keywords are case-insensitive. Strings must be surrounded by double quote characters (e.g. โ€˜blueโ€™) and are case-sensitive. A pound sign (#) outside of a string causes the remainder of the line in which the character appears to be treated as a comment. ๐Ÿ’ฌ


okay bestie, this next bit is where ctwm starts getting spicy ๐ŸŒถ๏ธโœจ

๐Ÿ’… M4 PREPROCESSING ๐Ÿ’…

So here's the tea: ctwm runs its setup files through m4(1) to pre-process them. When ctwm starts up, it opens a file for input as described above. But it pushes that file through m4 before it parses it. Which means you can use m4 macros to do runtime operations. And honestly? If you run a bunch of different displays with wildly different characteristics, this is a godsend. ๐Ÿฆ‹

Like, say you want to set the lower right section of the screen as your IconRegion (there's more on the IconRegion variable below, don't stress). You can use m4 directives plus the pre-defined symbols to calculate the region you want. For example:

define(IRegion, translit(eval(WIDTH/3)*eval(HEIGHT/2)+eval(WIDTH-WIDTH/3)-0, *, x))
IconRegion  "IRegion" SOUTH EAST 75 25

That right there defines the lower half, and right-hand third of the screen. Iconic, honestly. โœจ The above makes use of symbols that m4 gets pre-defined by ctwm. The symbols WIDTH and HEIGHT are calculated by ctwm and written into a temporary file for m4 to use. Here are all the symbols ctwm predefines:

  • SERVERHOST โ€” This variable is set to the name of the machine that is running the X server.
  • CLIENTHOST โ€” The machine that is running the clients. (ie, ctwm)
  • HOSTNAME โ€” The canonical hostname running the clients. (ie. a fully-qualified version of CLIENTHOST)
  • USER โ€” The name of the user running the program. Gotten from the environment.
  • HOME โ€” The user's home directory. Gotten from the environment.
  • PIXMAP_DIRECTORY โ€” The directory where the ctwm pictures are installed.
  • VERSION โ€” The X major protocol version. As seen by ProtocolVersion(3).
  • REVISION โ€” The X minor protocol revision. As seen by ProtocolRevision(3).
  • VENDOR โ€” The vendor of your X server. For example: MIT X Consortium.
  • RELEASE โ€” The release number of your X server. For MIT X11R5, this is 5.
  • WIDTH โ€” The width of your display in pixels.
  • HEIGHT โ€” The height of your display in pixels.
  • X_RESOLUTION โ€” The X resolution of your display in pixels per meter.
  • Y_RESOLUTION โ€” The Y resolution of your display in pixels per meter.
  • PLANES โ€” The number of bit planes your display supports in the default root window.
  • BITS_PER_RGB โ€” The number of significant bits in an RGB color. (log base 2 of the number of distinct colors that can be created. This is often different from the number of colors that can be displayed at once.)
  • TWM_TYPE โ€” Tells which twm offshoot is running. It will always be set to the string โ€˜ctwmโ€™ in this program. This is useful for protecting parts of your .twmrc file that ctwm proper won't understand (like WorkSpaces) so that it is still usable with other twm programs. ๐Ÿซถ
  • TWM_VERSION โ€” Tells which ctwm version is running in the form of a floating point number.
  • CLASS โ€” Your visual class. Will return one of StaticGray, GrayScale, StaticColor, PseudoColor, TrueColor, DirectColor, or, if it cannot determine what you have, NonStandard.
  • COLOR โ€” This will be either โ€˜Yesโ€™ or โ€˜Noโ€™. This is just a wrapper around the above definition. Returns โ€˜Yesโ€™ on *Color, and โ€˜Noโ€™ on StaticGray and GrayScale.
  • XPM โ€” Is defined only if ctwm was compiled with XPM.
  • JPEG โ€” Is defined only if ctwm was compiled with JPEG.
  • IMCONV โ€” Is defined only if ctwm was compiled with IMCONV.
  • GNOME โ€” Is defined only if ctwm was compiled with GNOME.
  • SOUNDS โ€” Is defined only if ctwm was compiled with USE_SOUND.
  • SESSION โ€” Is defined only if ctwm was compiled with USE_SESSION.
  • I18N โ€” Is defined only if ctwm was compiled with I18N.
  • TWM_CAPTIVE โ€” This will be either โ€˜Yesโ€™ or โ€˜Noโ€™. โ€˜Yesโ€™ if the current ctwm is captive (flag -w), โ€˜Noโ€™ in the other case.
  • TWM_CAPTIVE_NAME โ€” Defined only if TWM_CAPTIVE is also defined. Contains the name of the captive ctwm (-name flag);

Now listen. You may well find that if you research the m4(1) manual well, and understand the power of m4, this will be a very useful and powerful tool. But โ€” and I need you to hear me on this โ€” if you use any of the symbols which are predefined by m4, you are in severe danger! ๐Ÿ˜ญ Like, the Sun m4 predefines shift, so if you use that name in your .ctwmrc, you are out of luck. Just gone. No cap.

๐Ÿšจ Also! The availability of the m4 preprocessing is subject to the compilation define USEM4. So if it's not compiled in, none of this is happening, bestie.

โœจ VARIABLES โœจ

So many of the aspects of ctwm's user interface are controlled by variables that may be set in the user's startup file. Some of the options are enabled or disabled simply by the presence of a particular keyword. Other options require keywords, numbers, strings, or lists of all of these. ๐Ÿ’ซ

Lists are surrounded by braces and are usually separated by whitespace or a newline. For example:

AutoRaise { "emacs" "XTerm" "Xmh" }

or

AutoRaise
{
     "emacs"
     "XTerm"
     "Xmh"
}

When a variable containing a list of strings representing windows is searched (e.g. to determine whether or not to enable autoraise as shown above), a string must be an exact, case-sensitive match to the window's name (given by the WM_NAME window property), resource name or class name (both given by the WM_CLASS window property). So the preceding example would enable autoraise on windows named โ€˜emacsโ€™ as well as any xterm (since they are of class โ€˜XTermโ€™) or xmh windows (which are of class โ€˜Xmhโ€™). ๐Ÿ‘‘

String arguments that are interpreted as filenames (see the Pixmaps, Cursors, and IconDirectory below) will prepend the user's directory (specified by the HOME environment variable) if the first character is a tilde (~). If, instead, the first character is a colon (:), the name is assumed to refer to one of the internal bitmaps that are used to create the default titlebars symbols: :xlogo or :iconify (both refer to the X used for the iconify button), :resize (the nested squares used by the resize button), and :question (the question mark used for non-existent bitmap files).

The following variables may be specified at the top of a ctwm startup file. Lists of window name prefix strings are indicated by win-list. Optional arguments are shown in square brackets:

  • AlwaysOnTop { win-list } โ€” This variable specifies a list of windows (all windows if the list is defaulted) that ctwm will try its best to maintain on top of others. This doesn't work in all case.
  • AlwaysShowWindowWhenMovingFromWorkspaceManager โ€” When ReallyMoveInWorkspaceManager is present and the user is moving a window from the WorkSpaceMap, ctwm display the actual window only if it crosses the current active workspace. If AlwaysShowWindowWhenMovingFromWorkspaceManager is present, the actual window is always visible during the move, regardless of whether it crosses the current workspace or not. The Shift key toggles this behaviour. ๐Ÿ”€
  • AlwaysSqueezeToGravity [{ win-list }] โ€” This variable indicates that ctwm should obey window gravity when squeezing a window even when the window has a titlebar. Normally, ctwm will always squeeze a window that has a titlebar toward the north. The optional win-list may be used to control which windows this applies on.
  • AnimationSpeed speed โ€” The speed argument is a non-negative integer. It determines the number of times a second animations (if any) are updated. If speed is 0, animations are freezed. The default value is 0. ๐ŸงŠ
  • AutoFocusToTransients โ€” Transient windows get focus automatically when created. Useful with programs that have keyboard shortcuts that pop up windows.
  • AutoLower { win-list } โ€” This variable specifies a list of windows (all windows if the list is defaulted) to be automatically lowered whenever the point leaves a window. This action can be interactively enabled or disabled on individual windows using the function f.autolower.
  • AutoOccupy โ€” This variable specifies that clients will automatically change their occupation when their name or icon name changes. The new occupation will be recalculated from the Occupy and OccupyAll fields in the .ctwmrc file.
  • AutoRaise { win-list } โ€” This variable specifies a list of windows (all windows if the list is defaulted) to be automatically raised whenever the pointer has come to rest in a window for the amount of time specified by the RaiseDelay variable. This action can be interactively enabled or disabled on individual windows using the function f.autoraise.
  • AutoRaiseIcons โ€” Icons are raised when the cursor enters it. Useful with ShrinkIconTitles.
  • AutoRelativeResize โ€” This variable indicates that dragging out a window size (either when initially sizing the window with pointer Button2 or when resizing it) should not wait until the pointer has crossed the window edges. Instead, moving the pointer automatically causes the nearest edge or edges to move by the same amount. This allows the resizing of windows that extend off the edge of the screen. If the pointer is in the center of the window, or if the resize is begun by pressing a titlebutton, ctwm will still wait for the pointer to cross a window edge (to prevent accidents). This option is particularly useful for people who like the press-drag-release method of sweeping out window sizes. ๐Ÿ–ฑ๏ธ
  • AutoSqueeze { win-list } โ€” These windows will be auto-squeezed (see f.squeeze). i.e. automatically unsqueezed when they get focus, and squeezed when they loose it. Useful for the workspace manager. Not authorized for icon managers.
  • BeNiceToColormap โ€” By defaults new colors are allocated for shadows when a 3D look is used, but when you specify BeNiceToColormap ctwm uses stipling instead of new colors, the effect is less beautiful, but acceptable. In this case ClearShadowContrast and DarkShadowContrast have no effects. ๐ŸŽจ
  • BorderBottom pixels โ€” This variable specifies the width in pixels of a forbidden zone at the bottom of the screen. All constrained window functions (f.movepack, f.move with DontMoveOff, etc...) will consider this zone as offscreen. Default is 0.

๐ŸŽ€ BorderColor string [{ wincolorlist }]

bestie, this is the default color of the border that hugs every non-iconified window on your screen. ๐Ÿ’…

โš ๏ธ heads up: this one may only be given inside a Color or Monochrome list. Nowhere else. She's picky like that.

The optional wincolorlist is a lil list of window + color name pairs so you can give specific window types their own special border drip. Like:

BorderColor "gray50"
{
     "XTerm"   "red"
     "xmh"     "green"
}

The default is โ€˜blackโ€™. simple. classic. iconic.


๐Ÿ“ BorderLeft pixels

Sets the width in pixels of a forbidden zone at the left of your screen. Every constrained window function (f.movepack, f.move with DontMoveOff, etc...) treats this zone as offscreen, like it doesn't exist, like it's not invited to the party. ๐Ÿšซ

Default is 0.


๐Ÿ–ฑ๏ธ BorderResizeCursors

Tells ctwm to use resizing cursors when your pointer is hovering over the window border. Bestie, use this preferably when you've bound a button to f.resize in the frame context. It's giving "I know exactly what I'm doing here." โœจ


๐Ÿ“ BorderRight pixels

Same energy as BorderLeft but for the right side: width in pixels of a forbidden zone at the right of the screen. All constrained window functions (f.movepack, f.move with DontMoveOff, etc...) consider this zone offscreen. ๐Ÿ’€

Default is 0.


๐ŸŒ‘ BorderShadowDepth pixels

Sets the depth of the shadow ctwm uses for its 3D window borders โ€” but only when UseThreeDBorders is selected. Gotta have that dimension, fr fr. ๐Ÿ”ฅ


๐ŸŽจ BorderTileBackground string [{ wincolorlist }]

The default background color in the gray pattern used for unhighlighted borders โ€” and this only applies if NoHighlight hasn't been set. May only be given inside a Color or Monochrome list. ๐Ÿซถ

The optional wincolorlist lets you do per-window colors, because one size never fits all.

Default is โ€˜whiteโ€™.


๐ŸŽจ BorderTileForeground string [{ wincolorlist }]

The default foreground color in the gray pattern used for unhighlighted borders (again, only if NoHighlight hasn't been set). Only inside a Color or Monochrome list, bestie. โœจ

Optional wincolorlist = per-window colors, as always.

Default is โ€˜blackโ€™.


๐Ÿ“ BorderTop pixels

Width in pixels of a forbidden zone at the top of the screen. All constrained window functions (f.movepack, f.move with DontMoveOff, etc...) treat it as offscreen. ๐ŸŒธ

Default is 0.


๐Ÿ“ BorderWidth pixels

The width in pixels of the border surrounding all client window frames โ€” if ClientBorderWidth hasn't been specified. This value also sets the border size of windows ctwm creates itself (like the icon manager ๐Ÿ‘‘).

Default is 2.


๐Ÿ”˜ ButtonIndent pixels

How much titlebuttons get indented on all sides. Positive values make the buttons smaller than the window text and highlight area, so they pop out and stand out. ๐Ÿ’…

Set this and TitleButtonBorderWidth to 0 and your titlebuttons become as tall and wide as physically possible. maximum button. no notes.

Default is 1 if UseThreeDTitles is not set, and 0 if it is set.


๐ŸŽฏ CenterFeedbackWindow

The moving-and-resizing info window gets centered in the middle of the screen instead of chilling in the top left corner. main character positioning, honestly. โœจ


๐ŸŒˆ ClearShadowContrast contrast

Tells ctwm how to calculate the clear shadow color for 3D items. The value is comprised between 0 and 100. The formula is:

clear.{RGB} = (65535 - color.{RGB}) * (contrast / 100).
๐Ÿ›‘ Has no effect if BeNiceToColormap is active. periodt.

๐ŸชŸ ClientBorderWidth

Says the border width of a window's frame should be set to the initial border width of the window, rather than to the value of BorderWidth. Respect the original vibe of each window, yk? ๐Ÿฆ‹


๐ŸŒˆ Color { colors-list }

This one specifies a list of color assignments, applied only if your default display can handle more than plain black-and-white. ๐ŸŒˆ

The colors-list is made up of these color variables and their values: DefaultBackground, DefaultForeground, MenuBackground, MenuForeground, MenuTitleBackground, MenuTitleForeground, and MenuShadowColor.

These following color variables can also take a list of window + color name pairs, so you get per-window colors (peep BorderColor for the full deets): BorderColor, IconManagerHighlight, BorderTileBackground, BorderTileForeground, TitleBackground, TitleForeground, IconBackground, IconForeground, IconBorderColor, IconManagerBackground, and IconManagerForeground.

Example time ๐ŸŽ€:

Color
{
     MenuBackground      "gray50"
     MenuForeground      "blue"
     BorderColor              "red" { "XTerm" "yellow" }
     TitleForeground          "yellow"
     TitleBackground          "blue"
}

And psst โ€” all of these color variables may also be specified for the Monochrome variable, which means the same initialization file works on both color and monochrome displays. one config, two worlds, we love efficiency. ๐Ÿ’–


โฑ๏ธ ConstrainedMoveTime milliseconds

The length of time between button clicks needed to kick off a constrained move operation. Double click within this window of time while invoking f.move and the window will only move horizontally or vertically. ๐Ÿฆ‹

Set this value to 0 to disable constrained moves entirely.

Default is 400 milliseconds.


๐Ÿ–ฑ๏ธ Cursors { cursor-list }

Specifies the glyphs ctwm uses for its various pointer cursors. Each cursor can come from the cursor font or from two bitmap files. โœจ

Straight from the cursor font, like this:

cursorname     "string"

...where cursorname is one of the cursor names listed below, and string is the name of a glyph as found in the file /usr/include/X11/cursorfont.h โ€” but without the โ€˜XC_โ€™ prefix, bestie. ๐Ÿ˜Œ

Wanna define it from bitmap files instead? Different syntax:

cursorname     "image"   "mask"

The image and mask strings name the files holding the glyph image and mask in bitmap(1) form. Those bitmap files are located in the same manner as icon bitmap files. ๐Ÿ“

Here's the default cursor definitions, in all their glory:

Cursors
{
     Frame          "top_left_arrow"
     Title          "top_left_arrow"
     Icon      "top_left_arrow"
     IconMgr   "top_left_arrow"
     Move      "fleur"
     Resize         "fleur"
     Menu      "sb_left_arrow"
     Button         "hand2"
     Wait      "watch"
     Select         "dot"
     Destroy   "pirate"
}

yes the destroy cursor is a pirate. ate. ๐Ÿดโ€โ˜ ๏ธ


๐ŸŒ‘ DarkShadowContrast contrast

Tells ctwm how to calculate the dark shadow color for 3D items. The value is comprised between 0 and 100. The formula:

dark.{RGB}  = color.{RGB} * ((100 - contrast) / 100),
๐Ÿ›‘ Has no effect if BeNiceToColormap is active. same rules as her sister, no cap.

๐ŸชŸ DecorateTransients

Says transient windows (the ones carrying a WM_TRANSIENT_FOR property) should get titlebars. ๐Ÿ’…

By default, transients are not reparented. so this is you opting in, deliberately. slay.


๐ŸŽจ DefaultBackground string

The background color used for sizing and information windows.

Default is โ€˜whiteโ€™.


๐ŸŽจ DefaultForeground string

The foreground color used for sizing and information windows.

Default is โ€˜blackโ€™.


๐Ÿ™ˆ DontIconifyByUnmapping { win-list }

A list of windows that should not be iconified by simply unmapping the window (which is what would happen if IconifyByUnmapping had been set). ๐Ÿšซ

This gets used a lot to force some windows to be treated as icons while other windows are handled by the icon manager. best of both worlds, fr fr.


๐Ÿšซ DontMoveOff

Windows should not be allowed to be moved off the screen. keep them where you can see them, bestie. ๐Ÿซถ

It can be overridden by the f.forcemove function. (yes, there's an escape hatch.)


๐Ÿ–ผ๏ธ DontPaintRootWindow

Tells ctwm not to paint the root window โ€” whatever you told it in the Workspaces specification. ๐ŸŽจ

Super useful if you want pixmaps in the Workspace Map but not on the root window. iykyk.


๐Ÿ’พ DontSave { win-list }

These windows won't have their characteristics saved for the session manager. ๐Ÿ™ˆ


๐Ÿ’ค DontSetInactive { win-list }

These windows won't be set to InactiveState when they become invisible due to a workspace change. ๐Ÿ’ค

This exists because some ill-behaved clients (Frame5) don't like it. not naming names but... naming names. ๐Ÿ’€


๐Ÿ—œ๏ธ DontSqueezeTitle [{ win-list }]

Titlebars should not be squeezed down to their minimum size as described under SqueezeTitle below. ๐Ÿšซ

If you supply the optional window list, only those windows get protected from the squeeze. everyone else, sorry, you're getting compressed. ๐Ÿ˜ญ


๐ŸŽ›๏ธ DontToggleWorkSpaceManagerState

Turns off the feature that toggles the workspace manager state to/from map/button state when you press ctrl and the workspace manager window is in focus. ๐ŸŽ›๏ธ


๐Ÿ–ฑ๏ธ DontWarpCursorInWMap

Tells ctwm not to warp the cursor to the corresponding actual window when you click a small window in the workspace map. stay put, cursor. โœ‹


๐Ÿ–ผ๏ธ ForceIcons

Icon pixmaps specified in the Icons variable should override any client-supplied pixmaps. your config wins, periodt. ๐Ÿ‘‘


๐Ÿ“ FramePadding pixels

The distance between the titlebar decorations (the button and the text) and the window frame. give it some breathing room. ๐Ÿซถ

Default is 2 pixels if UseThreeDTitles is not set, and 0 if it is set.


๐ŸŽจ IconBackground string [{ win-list }]

The background color of icons. May only be specified inside a Color or Monochrome list. โœจ

The optional win-list is a list of window names and colors so you can do per-window colors โ€” see the BorderColor variable for a complete description of the win-list. ๐Ÿ“

Default is โ€˜whiteโ€™.

okay bestie we're still deep in the variables, hydration check, keep scrolling ๐Ÿ’งโœจ


IconBorderColor string [{ win-list }] ๐Ÿ’…

This one sets the color of the border around your icon windows, and it can only live inside a Color or Monochrome list, periodt. The optional win-list is a list of window names and colors so you can do per-window colors if you want each icon living its own truth. Full rundown of how win-list works is in the BorderColor variable โ€” go look at that one. Default is โ€˜blackโ€™.

IconBorderWidth pixels ๐ŸŽ€

Sets how thick, in pixels, the border around your icon windows is. Default is 2. That's it. That's the whole variable.

IconDirectory string ๐Ÿฆ‹

Tells ctwm which directory to go hunting in if a bitmap file can't be found in any of the directories listed in the bitmapFilePath resource. It's the backup plan, the "in case of emergency" folder.

IconFont string โœจ

The font used to draw icon names inside the icons themselves. Default is โ€˜variableโ€™.

IconForeground string [{ win-list }] ๐ŸŒธ

The foreground color for displaying icons. Like its border sibling, it may only be specified inside a Color or Monochrome list. Optional win-list = list of window names and colors so you can go per-window. See BorderColor for the full win-list explanation. Default is โ€˜blackโ€™.

IconifyByUnmapping [{ win-list }] ๐Ÿ’€

This says windows get iconified by just being unmapped, no attempt to map any icon at all. It's assuming you'll bring the window back yourself through the icon manager, the f.warpto function, or the TwmWindows menu. If you hand it the optional win-list, only those windows get the unmapping treatment. Default is โ€˜blackโ€™. If the win-list is given, only those windows will be iconified by simply unmapping.

careful bestie โ€” windows that have both this and the IconManagerDontShow options set may not be accessible at all if you haven't bound the TwmWindows menu in your startup file. Not me warning you twice. ๐Ÿšจ

IconifyStyle string ๐ŸŒˆ

Where string is either "normal", "mosaic", "zoomin", "zoomout" or "sweep". Tells ctwm to use fancy graphical effects when iconifying windows. It's giving cinematic.

IconJustification string ๐Ÿซถ

Where string is either "left", "center" or "right". Tells ctwm how to justify the icon image against the icon title (if there is one).

IconManagerBackground string [{ win-list }] ๐ŸŽ€

The background color for icon manager entries, and it may only be specified inside a Color or Monochrome list. Optional win-list = window names and colors for per-window flair. See BorderColor for the full win-list story. Default is โ€˜whiteโ€™.

IconManagerDontShow [{ win-list }] ๐Ÿ™ˆ

Tells the icon manager to display no windows at all. If you give it the optional win-list, then only those windows get hidden. This exists so windows that rarely get iconified โ€” like xclock or xload โ€” stop taking up precious space in the icon manager.

IconManagerFont string โœจ

The font used when displaying icon manager entries. Default is โ€˜variableโ€™.

IconManagerForeground string [{ win-list }] ๐ŸŒธ

The foreground color for icon manager entries, and again, only inside a Color or Monochrome list. Optional win-list for per-window colors. See BorderColor for the full win-list breakdown. Default is โ€˜blackโ€™.

IconManagerGeometry string [ columns ] ๐Ÿฆ‹

Sets the geometry of the icon manager window. The string argument is a standard geometry specification that gives the initial full size of the icon manager. Then the icon manager window gets broken into columns pieces and scaled according to how many entries are in it. Extra entries wrap around to form additional rows. Default number of columns is 1.

IconManagerHighlight string [{ win-list }] ๐Ÿ’–

The border color used when highlighting the icon manager entry that currently has the focus, and it can only be specified inside a Color or Monochrome list. Optional win-list = window names and colors for per-window vibes. See BorderColor for the complete win-list description. Default is โ€˜blackโ€™.

IconManagers { iconmgr-list } ๐Ÿ‘‘

Specifies a list of icon managers to create. Each item in the iconmgr-list looks like this:

"winname" ["iconname"]   "geometry" columns

where winname is the name of the windows that should go into this icon manager, iconname is the name of that icon manager window's icon, geometry is a standard geometry specification, and columns is the number of columns in this icon manager as described in IconManagerGeometry. Example time:

IconManagers
{
     "XTerm"   "=300x5+800+5" 5
     "myhost"  "=400x5+100+5" 2
}

Clients whose name or class is โ€˜XTermโ€™ will have an entry created in the โ€˜XTermโ€™ icon manager. Clients whose name was โ€˜myhostโ€™ would be put into the โ€˜myhostโ€™ icon manager. Slay.

IconManagerShadowDepth pixels ๐ŸŒˆ

The depth of the shadow ctwm uses for 3D IconManager entries, when UseThreeDIconManagers is selected. Dimension โœจ.

IconManagerShow { win-list } ๐Ÿ’…

A list of windows that should appear in the icon manager. Use it together with IconManagerDontShow and only the windows in this list will be shown in the icon manager.

IconMenuDontShow { win-list } ๐Ÿ™ˆ

Don't show the name of these windows in the TwmIcons menu. Bye.


IconRegion geomstring vgrav hgrav gridwidth gridheight [iconjust] [iconregjust] [iconregalign] [{ win-list }] ๐Ÿ—บ๏ธ

This defines an area on the root window where icons get placed if the client didn't hand over a specific icon location. The geomstring is a quoted string holding a standard geometry specification. If you write more than one IconRegion line, icons spill into the next icon region once the first one is full. The vgrav argument should be either North or South and controls whether icons fill in from the top or the bottom of the region. Same energy for hgrav, which should be either East or West and controls whether icons fill in from the left or the right. Icons get laid out in a grid with cells gridwidth pixels wide and gridheight pixels high. The optional win-list argument tells ctwm: if such a window gets iconified, and there's enough room in this icon region for its icon, drop it here. The optional iconjust, iconregjust and iconregalign give specific values of IconJustification, IconRegionJustification and IconRegionAlignement just for this IconRegion.

IconRegionAlignement string ๐ŸŽ€

Where string is either "top", "center", "bottom" or "border". Tells ctwm how to align icons inside their spot in the IconRegion. If you pass โ€˜borderโ€™, the justification becomes โ€˜topโ€™ when the icon region gravity is โ€˜northโ€™, and โ€˜bottomโ€™ when the icon region gravity is โ€˜southโ€™.

IconRegionJustification string โœจ

Where string is either "left", "center", "right" or "border". Tells ctwm how to justify icons inside their spot in the IconRegion. If you pass โ€˜borderโ€™, the justification becomes โ€˜leftโ€™ when the icon region gravity is โ€˜westโ€™, and โ€˜rightโ€™ when the icon region gravity is โ€˜eastโ€™.

Icons { win-list } ๐Ÿฆ‹

A list of window names plus the bitmap filenames that should be used as their icons. Like so:

Icons
{
     "XTerm"   "xterm.icon"
     "xfd"          "xfd_icon"
}

Windows that match โ€˜XTermโ€™ and would not be iconified by unmapping would try to use the icon bitmap in the file โ€˜xterm.iconโ€™. And if ForceIcons is specified, this bitmap gets used even if the client has requested its own icon pixmap. Sorry to the client, we're overruling you ๐Ÿ’…

IgnoreCaseInMenuSelection ๐Ÿ”ค

Used when you're moving the pointer inside a menu with the keyboard. When you type a letter, the pointer jumps to the next entry beginning with that letter. If IgnoreCaseInMenuSelection is present, the selection ignores the case of that first letter. Case? Never heard of her.

IgnoreLockModifier ๐Ÿ”’

If present, all bindings (buttons and keys) ignore the LockMask. Genuinely useful if you use caps lock a lot and do not want to define every single binding twice.

IgnoreModifier ๐Ÿ’€

All bindings (buttons and keys) will ignore the modifiers you specify. Handy when you use caps locks or num locks. With this option you don't need IgnoreLockModifier any more, it's fully replaced.

IgnoreModifier { lock m2 }

IgnoreTransient ๐Ÿ™ˆ

A list of windows for which to ignore transients.

IgnoreTransient { "Wine" }

InterpolateMenuColors ๐ŸŒˆ

Says menu entry colors should be interpolated between the colors specified on the entries. Look at this example:

Menu "mymenu"
{
     "Title"        ("black":"red")          f.title
     "entry1"                 f.nop
     "entry2"                 f.nop
     "entry3"  ("white":"green")   f.nop
     "entry4"                 f.nop
     "entry5"  ("red":"white")          f.nop
}

The foreground colors for โ€˜entry1โ€™ and โ€˜entry2โ€™ get interpolated between black and white, and the background colors between red and green. Similarly, the foreground for โ€˜entry4โ€™ lands half-way between white and red, and the background lands half-way between green and white. Gradient era ๐Ÿ’–


  • MakeTitle { win-list } โ€” bestie, this one is a literal list of windows that should get a titlebar. It exists so you can demand titles on specific windows when NoTitle is already doing its thing everywhere else. ๐Ÿ’…
  • MapWindowBackground color [{ win-list }] โ€” sets the background colors for the little baby windows in the workspace map window. โš ๏ธ You can only put this inside a Color or Monochrome list, no cap. The optional win-list is a list of window names and colors, so you can do per-window colors if that's your vibe. And if there's neither MapWindowBackground nor MapWindowForeground? The window title colors get used instead. ๐ŸŽ€
  • MapWindowCurrentWorkSpace { border_color [background] [foreground] [bitmap] } โ€” this is how you make the map window for the current workspace look cute. โœจ
  • MapWindowDefaultWorkSpace { border_color [background] [foreground] [bitmap] } โ€” same idea, but for the map window of every workspace that isn't the current one, and only when no root background info was handed to ctwm in the WorkSpace command. Not used in other cases, periodt.
  • MapWindowForeground color [{ win-list }] โ€” the foreground colors for those small windows in the workspace map window. Same rules as its background sibling: Color or Monochrome list only, optional win-list of window names and colors for per-window flair, and if neither MapWindowBackground nor MapWindowForeground is around, the window title colors step in. ๐Ÿฆ‹
  • MaxIconTitleWidth width โ€” hands ctwm an integer and tells it the maximum width for an icon title. Icon title bigger than width? Truncated. bye. โœ‚๏ธ
  • MaxWindowSize string โ€” gives you a geometry where the width and height are the max size for a given window. Classic use case: keeping windows from being bigger than your screen. Default is '30000x30000'. ๐Ÿ˜ญ
  • MenuBackground string โ€” the background color for menus, Color or Monochrome list only. Default is 'white'. ๐Ÿค
  • MenuFont string โ€” the font used when menus are displayed. Default is 'variable'.
  • MenuForeground string โ€” the foreground color for menus, and yeah, Color or Monochrome list only. Default is 'black'. ๐Ÿ–ค
  • MenuShadowColor string โ€” the color of the shadow behind pull-down menus. Color or Monochrome list only. Default is 'black'. ๐ŸŒ‘
  • MenuShadowDepth pixels โ€” how deep the shadow is that ctwm uses for 3D menus, when UseThreeDMenus is selected. ๐Ÿ”ฅ
  • MenuTitleBackground string โ€” the background color for f.title entries in menus. Color or Monochrome list only. Default is 'white'.
  • MenuTitleForeground string โ€” the foreground color for f.title entries in menus, also Color or Monochrome list only. Default is 'black'.
  • Monochrome { colors } โ€” a whole list of color assignments that should be made if the screen has a depth of 1. Go read the description of Color, it's the same energy. ๐ŸŽจ
  • MoveDelta pixels โ€” how many pixels the pointer has to move before f.move starts working. Also peep f.deltastop. Default is zero pixels. ๐Ÿ‘€
  • MovePackResistance pixels โ€” how many pixels of the movepack and movepush resistance. See f.movepack and f.movepush. ๐Ÿ’ช
  • MoveOffResistance pixels โ€” how many pixels of the moveoff resistance. Here's the tea: if pixels is positive, DontMoveOff will only stop you from going off the edge if you're within n pixels of that edge. Go further and DontMoveOff literally gives up and lets you go as far as you want. f.forcemove still lets you completely ignore DontMoveOff. A negative value puts you back in "never moveoff" mode โ€” and that's the default. ๐Ÿšง
  • NoBackingStore โ€” says ctwm's menus should not request backing store, so menus get repainted less. Typically used with servers that can repaint faster than they can handle backing store. โšก
  • NoBorder { win-list } โ€” these windows get no borders, period. Want zero borders on all windows? Use the BorderWidth keyword instead. ๐Ÿšซ
  • NoCaseSensitive โ€” case gets ignored when sorting icon names in an icon manager. Typically used with apps that capitalize the first letter of their icon name. ๐Ÿ”ค
  • NoDefaults โ€” ctwm should not supply the default titlebuttons and bindings. โš ๏ธ Only use this if your startup file has a completely new set of bindings and definitions, otherwise you're gonna have a bad time.
  • NoGrabServer โ€” ctwm should not grab the server when popping up menus and moving opaque windows.
  • NoHighlight [{ win-list }] โ€” borders should not be highlighted to track where the pointer is. Give the optional win-list and highlighting is only disabled for those windows. Here's how the visual works: when the border is highlighted it's drawn in the current BorderColor; when it's not highlighted it's stippled with a gray pattern using the current BorderTileForeground and BorderTileBackground colors. ๐Ÿฉถ
  • NoIconTitle [{ win-list }] โ€” icons should not display the client's icon name. With the optional win-list, only those clients skip the icon titles.
  • NoIconManagerFocus โ€” ctwm will not set the focus on the corresponding window when the pointer is inside an IconManager.
  • NoIconManagers โ€” no icon manager gets created at all. None. Zero. โœ‹
  • NoImagesInWorkSpaceManager โ€” turns off background images in the WorkSpaceMap. Instead, only the colors defined in WorkSpaces are used as background in the WorkSpaceMap. ๐Ÿ–ผ๏ธ
  • NoMenuShadows โ€” menus get no drop shadows behind them. Typically used with slower servers, since it speeds up menu drawing โ€” at the cost of making the menu slightly harder to read. ๐Ÿ“–
  • NoOpaqueMove { window-list } โ€” the counterpart of OpaqueMove. See OpaqueMove. ๐Ÿ”
  • NoOpaqueResize { window-list } โ€” the counterpart of OpaqueResize. See OpaqueResize. ๐Ÿ”
  • NoRaiseOnDeiconify โ€” windows that get deiconified should not be raised.
  • NoRaiseOnMove โ€” windows should not be raised when they're moved. Typically used so windows can slide underneath each other. ๐Ÿ›
  • NoRaiseOnResize โ€” windows should not be raised when they're resized. Typically used so windows can be resized underneath each other.
  • NoRaiseOnWarp โ€” windows should not be raised when the pointer is warped into them with the f.warpto function. Heads up though: with this set, warping to an occluded window can leave the pointer in the occluding window instead of the one you actually wanted โ€” which causes unexpected behavior with f.warpring. ๐Ÿ˜ตโ€๐Ÿ’ซ
  • NoSaveUnders โ€” menus should not request save-unders, so there's less window repainting after you pick from a menu. Typically used with displays that can repaint faster than they can handle save-unders.
  • NoShowOccupyAll โ€” OccupyAll windows won't be displayed in the WorkSpaceMap window.
  • NoStackMode [{ win-list }] โ€” client window requests to change stacking order get ignored. With the optional win-list, only requests on those windows are ignored. Typically used to stop applications from relentlessly popping themselves to the front of the window stack. ๐Ÿ™„
  • NoTitle [{ win-list }] โ€” windows should not have titlebars. With the optional win-list, only those windows skip the titlebars. And plot twist: MakeTitle can be used alongside this to force titlebars onto specific windows. ๐Ÿ’…
  • NoTitleFocus โ€” ctwm should not set keyboard input focus to each window as it's entered. Normally ctwm sets the focus so that focus and key events from the titlebar and icon managers get delivered to the application. But if the pointer moves quickly and ctwm is slow to respond, input can go to the old window instead of the new one. Typically used to prevent this "input lag" and to work around bugs in older applications that have problems with focus events. ๐Ÿข
  • NoTitleHighlight [{ win-list }] โ€” the highlight area of the titlebar (the thing that shows which window currently has the input focus) should not be displayed. With the optional win-list, only those windows skip the highlight areas. Fun fact: this plus the SqueezeTitle options can be set to substantially reduce how much screen space titlebars eat up. ๐Ÿ“‰
  • NoWarpToMenuTitle โ€” the cursor should not be warped to the title of a menu that doesn't have room to drop down below the current cursor position.
  • Occupy { occupy-list } โ€” specifies which windows occupy which workspaces at startup. ๐Ÿ—‚๏ธ

so occupy-list is literally just a list of entries that look like this:

[Window]   win-name { wpsc1 wspc2 ... }

or

Workspace  wspc-name {win1 win2 ...}

Example vibes:

Occupy {
               "xload"   {"all"}
    Window     "xterm"   {"here" "there" "elsewhere"}
               "xv"      {"images"}
    WorkSpace  "images"  {"xloadimage"}
}
Note: The Occupy declaration should come after the WorkSpaces declaration. no cap, order matters bestie ๐Ÿซถ

OccupyAll { window-list }

This one's a whole list of windows that just claim every single workspace at startup. They're everywhere. Main character windows fr fr.

window-list is a list of window names.

Example:

OccupyAll
{
    "xload"
    "xbiff"
    "xconsole"
}
Note: The OccupyAll declaration should come after the WorkSpaces declaration. same rule, don't skip it ๐Ÿ’…

OpaqueMove { window-list }

Okay so this makes the f.move function actually move the window instead of just dragging a sad little outline around โ€” so you can immediately see what the window's gonna look like in its new spot. It's giving instant gratification โœจ. This option is typically used on fast displays (particularly if NoGrabServer is set). The optional window list parameter means only windows in that list actually get moved in opaque mode. The NoOpaqueMove counterpart is also available.

OpaqueMoveThreshold { threshold }

The integer parameter here is a percentage, and it means only windows (eligible for opaque moving) with a surface smaller than this percentage of the screen's surface actually get moved in opaque mode. tiny windows only, periodt.

OpaqueResize { window-list }

The opaque version of resize. Extremely resource intensive, but beautiful with a fast server/client/network. See OpaqueMove. The NoOpaqueResize counterpart is also available.

OpaqueResizeThreshold { threshold }

The resize version of OpaqueMoveThreshold. that's it, that's the tweet ๐Ÿฆ

OpenWindowTimeout seconds

seconds is an integer representing a number of seconds. When a window tries to open on an unattended display, it gets automatically mapped after this many seconds. ghost display? handled. ๐Ÿ‘ป

PackNewWindows

Use the f.movepack algorithm instead of f.move when opening a new window.

Pixmaps { pixmaps }

This variable is a list of pixmaps that define the appearance of various images. Each entry is a keyword saying which pixmap to set, followed by a string giving the name of the bitmap file. The following pixmaps may be specified:

Pixmaps
{
     TitleHighlight "gray1"

}

The default for TitleHighlight is to use an even stipple pattern.

PixmapDirectory path

This one sets the path where ctwm looks to find non-X11 bitmap files. Whenever you wanna use an image file that is not an X11 bitmap, you specify: xpm:filename for xpm files, xwd:filename for xwd files, im:filename for other files supported by the imconv package, jpeg:file for jpeg files, or |command for an on-the-fly generated xwd file. Use the % character to specify an animation. path can be a colon-separated list of directories. Example:

PixmapDirectory  "/usr/lib/X11/twm"
Icons
{
    "Axe"    "xpm:edit.xpm"
    "xterm"  "xpm:ball%.xpm"
}
N.B. This is only valid if your version of ctwm has been compiled with the right extension (XPM, JPEG or IMCONV options). check before you come for me ๐Ÿ˜ญ

RaiseDelay milliseconds

For windows that get automatically raised when the pointer enters (see the AutoRaise variable and the f.autoraise function), this variable says how long the pointer should rest in the window before it's raised. The default is 0 milliseconds. zero patience energy, iconic.

RaiseOnClick

If present, a window gets raised on top of the others when you click on it, and the ButtonPress event gets correctly forwarded to the client that owns the window (if it asked for it). See RaiseOnClickButton.

RaiseOnClickButton button_number

Where button_number is a valid button number (generally 1 to 3). Specify which button to use for RaiseOnClick.

RaiseWhenAutoUnSqueeze

Windows are raised when auto-unsqueezed (See AutoSqueeze).

RandomPlacement [ string ]

Where string is either 'on', 'off', 'all' or 'unmapped'. This variable says that windows with no specified geometry should be placed in a pseudo-random location instead of making the user drag out an outline. The argument 'on' or 'all' tells ctwm to do this for all such windows, 'off' says not to do it, and 'unmapped' does it only for unmapped windows โ€” e.g. iconified ones or ones not visible in the current workspace. chaos placement, slay ๐ŸŽฒ

ReallyMoveInWorkspaceManager

This keyword tells ctwm to move the actual window when the user is moving the small windows in the WorkSpaceMap window. If it's not present, the WorkSpaceMap can only be used to modify the occupation of a window.

ResizeFont string

This variable specifies the font to be used in the dimensions window when resizing windows. The default is 'fixed'.

RestartPreviousState

This variable means ctwm should attempt to use the WM_STATE property on client windows to figure out which windows should be iconified and which should be left visible. It's typically used to try to regenerate the state the screen was in before the previous window manager was shut down. time travel but make it window management โœจ

ReverseCurrentWorkspace string

This variable tells ctwm to reverse the background and foreground colors in the small windows in the workspace map for the current workspace.

SaveColor { colors-list }

This variable is a list of color assignments to be stored as pixel values in the root window property _MIT_PRIORITY_COLORS. Clients may choose to preserve these values when installing their own colormap. Note that using this mechanism is a way for an app to avoid the 'technicolor' problem โ€” yk, where useful screen objects like window borders and titlebars disappear when a program's custom colors get installed by the window manager. For example:

SaveColor
{
        BorderColor
        TitleBackground
        TitleForeground
        "red"
        "green"
        "blue"
}

This would place on the root window 3 pixel values for borders and titlebars, as well as the three color strings, all taken from the default colormap. saving your faves, literally ๐Ÿ’–

ShrinkIconTitles

A la Motif shrinking of icon titles, and expansion when the mouse is inside the icon. The old incorrect spelling SchrinkIconTitles is also still accepted. typos get grandfathered in, we love to see it ๐ŸŽ€

ShortAllWindowsMenus

Don't show WorkSpaceManager and IconManagers in the TwmWindows and TwmAllWindows menus. keep it short bestie

ShowIconManager

This variable means the icon manager window should be displayed when ctwm is started. It can always be brought up using the f.showiconmgr function.

ShowWorkSpaceManager

This variable specifies that the WorkSpaceManager should be visible.

SloppyFocus

Use sloppy focus.

SortIconManager

This variable means entries in the icon manager should be sorted alphabetically instead of just appending new windows to the end. organized queen ๐Ÿ‘‘

SoundHost

The host on which sounds should be played. See the SOUNDS section.

SqueezeTitle [{ squeeze-list }]

This variable means ctwm should attempt to use the SHAPE extension to make titlebars occupy only as much screen space as they need, rather than stretching all the way across the top of the window. The optional squeeze-list controls the location of the squeezed titlebar along the top of the window. It contains entries of the form:

"name"         justification  num  denom

where name is a window name, justification is either left, center, or right, and num and denom are numbers specifying a ratio giving the relative position about which the titlebar is justified. The ratio is measured left to right if the numerator is positive, and right to left if negative. A denominator of 0 means the numerator should be measured in pixels. For convenience, the ratio 0/0 is the same as 1/2 for center and -1/1 for right. For example:

SqueezeTitle
{
     "XTerm"   left      0    0
     "xterm1"  left      1    3
     "xterm2"  left      2    3
     "oclock"  center         0    0
     "emacs"   right          0    0
}

The DontSqueezeTitle list can be used to turn off squeezing on certain titles.

StartIconified [{ win-list }]

This variable means client windows should initially be left as icons until the user explicitly deiconifies them. If the optional win-list is given, only those windows start out iconic. This is useful for programs that don't support an -iconic command line option or resource. shy windows get to stay hidden ๐Ÿซฃ

StartInMapState

This variable specifies that the WorkSpaceManager should be started in its map form when created.

StartSqueezed { win-list }

These windows will first show up squeezed (see f.squeeze).

StayUpMenus

Tells ctwm to use stayup menus. These menus will stay on the screen when ButtonUp happens, if either the menu hasn't been entered by the pointer yet, or the current item is a f.title. sticky menus, obsessed ๐Ÿ“

SunkFocusWindowTitle

This variable specifies that the title of the focus window (if it exists) should be sunken instead of raised. Only valid if UseThreeDTitles is set.

ThreeDBorderWidth pixels

The width of the 3D border in pixels, if any. ๐Ÿ’…

TitleBackground string [{ win-list }]

Sets the background color for your titlebars ๐Ÿ’– and okay so important: this may only be specified inside of a Color or Monochrome list, bestie, nowhere else. The optional win-list is a list of window names and colors so you can do per-window colors if you're feeling extra. Default? white. Clean, classic, iconic. โœจ


TitleButtonBorderWidth pixels

The width, in pixels, of the border surrounding your titlebuttons. Fr fr people usually set this to 0 so the buttons take up as much space as possible and have no border at all โ€” maximalist button energy only. Default is 1 if UseThreeDTitles is not set, and 0 if it is. ๐ŸŽ€


TitleButtonShadowDepth pixels

The depth of the shadow ctwm uses for 3D title buttons, but only when UseThreeDTitles is selected. Periodt. ๐Ÿ’…


TitleFont string

The font used for displaying window names in your titlebars. Default is variable. She's giving timeless. ๐ŸŒธ


TitleForeground string [{ win-list }]

Foreground color for your titlebars โ€” and same rule as before, it may only be specified inside a Color or Monochrome list. The optional win-list is a list of window names and colors so per-window colors can happen. Default is black. ๐Ÿ–ค


TitleJustification string

This keyword needs a string value. The acceptable values are: left, center and right. The window titles get justified according to this in the title window. Pick your alignment vibe. โญ


TitlePadding pixels

The distance between the various buttons, text, and highlight areas in the titlebar. Default is 8 pixels if UseThreeDTitles is not set, 0 if it is. ๐Ÿฆ‹


TitleShadowDepth pixels

The depth of the shadow ctwm uses for 3D titles, when UseThreeDTitles is selected. That's the whole vibe. ๐Ÿ’œ


TransientHasOccupation

This one says that transient-for and non-group leader windows can have their own occupation, potentially different from their leader window. The default case is that these windows follow their leader โ€” so use this keyword if the default action doesn't please you. ๐Ÿ‘‘


TransientOnTop percentage

The parameter (required!) is a percentage, and it tells ctwm to put transient (and non-group leader) windows always on top of their leader if and only if their surface is smaller than this fraction of the surface of their leader. The surface of a window is its width times its weight. ๐Ÿ”ฅ


UnknownIcon string

The filename of a bitmap file to be used as the default icon. This bitmap becomes the icon of all clients which do not provide an icon bitmap and are not listed in the Icons list. Default-icon main character energy. ๐ŸŽ€


UnmapByMovingFarAway [{ win-list }]

These windows get moved out of the screen instead of being unmapped when they become invisible due to a change workspace. Why?? Because some ill-behaved clients (looking at you, Frame5) don't like to be unmapped. ๐Ÿ˜ญ


UsePPosition string

Whether or not ctwm should honor program-requested locations (given by the PPosition flag in the WM_NORMAL_HINTS property) in the absence of a user-specified position. The argument string may have one of three values: "off" (the default) meaning ctwm should ignore the program-supplied position, "on" meaning the position should be used, and "non-zero" meaning the position should be used if it's other than (0,0). That last one is for working around a bug in older toolkits. iykyk. ๐Ÿ’…


UseSunkTitlePixmap

Makes it so the shadows are inversed for title pixmaps when focus is lost. Similar to having the SunkFocusWindowTitle, except it makes your xbm or 3d XPM (if any) sink instead of just the whole bar. ๐Ÿซถ


UseThreeDBorders

Tells ctwm to use 3D-looking window borders. The width of the 3D borders is ThreeDBorderWidth. The color of the 3D border is BorderTileBackground, and if NoHighlight is not selected, the border of the Focus window is BorderColor. โœจ


UseThreeDIconManagers

Tells ctwm to use 3D-looking IconManagers if any. Simple as that. ๐Ÿ’–


UseThreeDMenus

Tells ctwm to use 3D-looking menus. Slay. ๐ŸŽ€


UseThreeDTitles

Tells ctwm to use 3D-looking windows titles. In which case the default values of TitleButtonBorderWidth, FramePadding, TitlePadding and ButtonIndent are set to 0. There are plenty of built-in scalable pixmaps for buttons: :xpm:menu, :xpm:dot, :xpm:cross, :xpm:bar, :xpm:vbar, :xpm:iconify, :xpm:resize, :xmp:sunkresize and :xpm:box. There are also several built-in scalable animations for buttons: %xpm:resize, %xpm:menu-up, %xpm:menu-down, %xpm:resize-out-top, %xpm:resize-in-top, %xpm:resize-out-bot, %xpm:resize-in-bot, %xpm:maze-out, %xpm:maze-in, %xpm:zoom-out, %xpm:zoom-in and %xpm:zoom-inout. Try them to see what they look like. ๐Ÿ‘‘


UseThreeDWMap

Tells ctwm to use 3D for the small windows in the workspace map. ๐Ÿฆ‹


VirtualScreens { geometries-list }

Specifies a list of geometries for virtual screens. Virtual screens are designed to be used when you have several physical screens bound together with the Xinerama X extension.

geometries-list is a list of valid geometry strings that correspond to your actual physical screens.

Example:

VirtualScreens
{
    "1280x1024+0+0"
    "1600x1200+1280+0"
}

WarpCursor [{ win-list }]

Indicates that the pointer should be warped into windows when they are deiconified. If the optional win-list is given, the pointer will only be warped when those windows are deiconified. ๐ŸŒˆ


WindowBox [{ win-list }]

Creates a new window called a box, where all the client windows that match the windows list are opened in, instead of the root window. This is useful to group small windows in the same box (like xload, for instance).

WindowBox "xloadbox" "320x100+0-0" {
    "xload"
}

WindowGeometries [{ win-list }]

Used to give a default geometry to some clients:

WindowGeometries {
    "Mozilla*"       "1000x800+10+10"
    "jpilot*"        "800x600-0-0"
}

WindowRing [{ win-list }]

A list of windows along which the f.warpring function cycles. If no argument is given, all the windows are in the ring. ๐Ÿ’ซ


WarpRingOnScreen

Tells ctwm that f.warpring warps the pointer only to windows visible in the current workspace. ๐ŸŽ€


WarpToDefaultMenuEntry

(Useful only with StayUpMenus.) When using StayUpMenus, and a menu does stay up, the pointer is warped to the default entry of the menu. ๐Ÿ’…


WarpUnmapped

Indicates that the f.warpto function should deiconify any iconified windows it encounters. This is typically used to make a key binding that will pop a particular window (such as xmh), no matter where it is. The default is for f.warpto to ignore iconified windows. โœจ


WindowRingExclude [{ win-list }]

All the listed windows will be excluded from the WarpRing. Bye bestie. ๐Ÿซถ


WMgrButtonShadowDepth depth

Controls the depth of the shadow of the workspace manager buttons. ๐Ÿฆ‹


WMgrHorizButtonIndent nb_pixels

Specifies the horizontal space, in pixels, between the buttons of the workspace manager (in button mode). ๐Ÿ’–


WMgrVertButtonIndent nb_pixels

Specifies the vertical space, in pixels, between the buttons of the workspace manager (in button mode). ๐ŸŽ€


WorkSpaceFont string

Lets you specify the font to use for the small windows in the workspace manager map. (Try -adobe-times-*-r-*--10-*-*-*-*-*-*-*.) ๐Ÿ‘‘


WorkSpaceManagerGeometry string [ columns ]

Specifies the geometry of the workspace manager window. The string argument is a standard geometry specification that indicates the initial full size of the workspace manager. The columns argument indicates the number of columns to use for the workspace manager window.

WorkSpaceManagerGeometry        "360x60+60-0" 8

WorkSpaces { workspace-list }

A list of workspaces that are created at startup, where workspace-list is:

name [{bg-button [fg-button] [bg-root] [fg-root] [pixmap-root]}]

With:

  • bg-button: background color of the corresponding button in the workspace manager.
  • fg-button: foreground color of the corresponding button in the workspace manager.
  • bg-root: background color of the corresponding root screen.
  • fg-root: foreground color of the corresponding root screen.
  • pixmap-root: pixmap to display on the corresponding root screen, either the name of a bitmap, xpm:xpmfile, xwd:xwdfile, jpeg:jpgfile, im:imfile or |command_that generate_xwd.

Example:

WorkSpaces
{
  "One"   {"#686B9F" "white" "DeepSkyBlue3" "white" "jpeg:shark.jpg"}
  "Two"   {"#619AAE" "white" "firebrick"}
  "Three" {"#727786" "white" "MidnightBlue" "white" "xpm:ball%.xpm"}
  "Four"  {"#727786" "white" "white" "white" "|(giftoppm | pnmtoxwd) < 2010.gif"}

  "Five"  {"#727786" "white" "DeepSkyBlue3" "white" "plaid"}
  "Six"   {"#619AAE" "white" "DeepSkyBlue3" "white" "xpm:background1"}
  "Seven" {"#8C5b7A" "white" "chartreuse4"}
  "Eight" {"#686B9F" "white" "MidnightBlue"}
}
The WorkSpaces declaration should come before the Occupy or OccupyAll declarations. The maximum number of workspaces is 32. Don't test her. ๐Ÿ’€

XMoveGrid number

The value to use to constrain window movement. When moving windows around, the x coordinate will always be a multiple of this variable. Default is 1. And heads up: f.forcemove ignores this variable. ๐ŸŽ€

  • XorValue number โ€” this is the value ctwm uses when it draws those window outlines for moving and resizing windows. Set it to something that'll give you a whole rainbow of distinguishable colors when it gets XOR'd with whatever's actually on your screen. Setting it to 1 often looks super nice if the adjacent colors in your default colormap are distinct. If you don't set it, ctwm just tries to make those temporary lines show up at the opposite end of the colormap from the graphics. ๐Ÿ’ซ
  • YMoveGrid number โ€” the value that constrains how windows move. When you're dragging windows around, the y coordinate will always land on a multiple of this number. Default is 1. Heads up: f.forcemove straight-up ignores this variable.
  • Zoom [ count ] โ€” turn this on and ctwm draws outlines suggesting a window moving to and from its iconified state whenever a window gets iconified or deiconified. The optional count argument says how many outlines to draw. Default count is 8. โœจ

The following variables have to be set after the fonts have been assigned, so it's usually best to put them at the end of the variables section or the beginning of the bindings section:

  • ChangeWorkspaceFunction function โ€” the function to run when the user changes the current workspace (zap).
  • DefaultFunction function โ€” the function to run when a key or button event comes in that has no binding. Typically you'd bind this to f.nop, f.beep, or a menu full of window operations.
  • DeIconifyFunction function โ€” the function to run when a window is deiconified.
  • IconifyFunction function โ€” the function to run when a window is iconified.
  • WindowFunction function โ€” the function to run when a window is selected from the TwmWindows menu. If you don't set this variable, the window just gets deiconified and raised.

๐ŸŽ€ BINDINGS ๐ŸŽ€

okay so once all your variables are set, you can start attaching functions to titlebuttons and to key and pointer buttons. Titlebuttons can be added from the left or the right side, and they show up in the titlebar left-to-right in the order you specify them. Key and pointer button bindings, meanwhile, can go in literally any order you want. ๐Ÿ’…

Titlebutton specs have to include the name of the pixmap to use in the button box, plus the function to invoke when a pointer button gets pressed inside it:

LeftTitleButton "bitmapname"  = function

or

LeftTitleButton "bitmapname" {
    Buttoni : function
    ...
    Buttonj : function
}

or

RightTitleButton "bitmapname" = function

or

RightTitleButton "bitmapname" {
    Buttoni : function
    ...
    Buttonj : function
}

The bitmapname can point to one of the built-in bitmaps (which get scaled to match TitleFont) by using the appropriate colon-prefixed name described above. ๐ŸŽจ

Key and pointer button specs have to tell ctwm which modifiers must be pressed, over which parts of the screen the pointer must be, and what function to invoke. Keys are given as strings holding the right keysym name; buttons are given as the keywords Button1-Button5:

"FP1"          = modlist : context : function
Button1   = modlist : context : function

The modlist is any combo of the modifier names shift, control, lock, meta, mod1, mod2, mod3, mod4, or mod5 (which you can abbreviate as s, c, l, m, m1, m2, m3, m4, m5, respectively) separated by a vertical bar (|). Same energy for the context: it's any combo of window, title, icon, root, frame, workspace, iconmgr, their first letters (the iconmgr abbreviation is m), or all, separated by a vertical bar. And the function is any of the f. keywords described below. For example, the default startup file has these bindings:

Button1   =    : root         : f.menu "TwmWindows"
Button1   = m  : window | icon     : f.function "move-or-lower"
Button2   = m  : window | icon     : f.iconify
Button3   = m  : window | icon     : f.function "move-or-raise"
Button1   =    : title        : f.function "move-or-raise"
Button2   =    : title        : f.raiselower
Button1   =    : icon         : f.function "move-or-iconify"
Button2   =    : icon         : f.iconify
Button1   =    : iconmgr : f.iconify
Button2   =    : iconmgr : f.iconify

And if you're the kind of person who wants to run their whole window setup from the keyboard (main character energy fr), you could use these bindings:

"F1"      =    : all          : f.iconify
"F2"      =    : all          : f.raiselower
"F3"      =    : all          : f.warpring "next"
"F4"      =    : all          : f.warpto "xmh"
"F5"      =    : all          : f.warpto "emacs"
"F6"      =    : all          : f.colormap "next"
"F7"      =    : all          : f.colormap "default"
"F20"          =    : all          : f.warptoscreen "next"
"Left"         = m  : all          : f.backiconmgr
"Right"   = m | s   : all          : f.forwiconmgr
"Up"      = m  : all          : f.upiconmgr
"Down"    = m | s   : all          : f.downiconmgr

ctwm comes with so many more window manipulation primitives than could ever fit neatly in a titlebar, a menu, or a set of key bindings. A small set of defaults is supplied (unless NoDefaults is specified), but ngl most users are gonna want their most-used operations bound to key and button strokes. To do that, ctwm associates names with each of the primitives and gives you user-defined functions for building higher-level primitives, plus menus for interactively picking among groups of functions. ๐Ÿงš

User-defined functions hold the name they're referenced by in calls to f.function plus a list of other functions to execute. Like so:

Function "move-or-lower" { f.move f.deltastop f.lower }
Function "move-or-raise" { f.move f.deltastop f.raise }
Function "move-or-iconify"    { f.move f.deltastop f.iconify }
Function "restore-colormap"   { f.colormap "default" f.lower }

The function name has to be used in f.function exactly as it appears in the function specification. No cap. โœ‹

In the descriptions below, if a function is said to operate on the selected window but it's invoked from a root menu, the cursor gets changed to the Select cursor and the next window to receive a button press is the one that gets chosen:

  • ! string โ€” this is just an abbreviation for f.exec string.
  • f.addtoworkspace string โ€” adds the selected window to the workspace named string.
  • f.adoptwindow โ€” asks you to select a window with the mouse, then adopts that window if it doesn't belong to the current ctwm. Only useful with the -w flag.
  • f.altcontext โ€” sets the alternate context. The next key or button event ctwm receives gets interpreted using the alternate context. To define bindings in the alternate context, use the keyword alter in the context field of the binding command. For example:
"Return"= m    : all          : f.altcontext
"n"  =    : alter        : f.nextworkspace
"p"  =    : alter        : f.prevworkspace
  • f.altkeymap number โ€” sets the alternate keymap number, where number is an integer between 1 and 5 inclusive. The next key or button event ctwm receives gets interpreted using this alternate keymap. To define bindings in an alternate keymap, use the keyword a followed by number in the modifier field of the binding command. For example:
"Return"= c    : all          : f.altkeymap "1"
"i"  = a1 : window|icon|iconmgr    : f.iconify
"z"  = a1 : window  : f.zoom
"d"  = a1 : window|icon  : f.delete
"o"  = a1 : window|icon  : f.occupy
"r"  = a1 : window|icon  : f.refresh
When you're using alternate keymaps, only the root, window, icon and iconmgr contexts are allowed. โš ๏ธ
  • f.autolower โ€” toggles whether or not the selected window gets lowered whenever the pointer leaves it. Peep the description of the variable AutoLower.
  • f.autoraise โ€” toggles whether or not the selected window gets raised whenever the pointer enters it. Peep the description of the variable AutoRaise.
  • f.backmapiconmgr โ€” warps the pointer the same way as f.backiconmgr, but only stops at windows that are mapped.
  • f.backiconmgr โ€” warps the pointer to the previous column in the current icon manager, wrapping back to the previous row if it needs to.
  • f.beep โ€” sounds the keyboard bell. ๐Ÿ””
  • f.bottomzoom โ€” similar to f.fullzoom, but resizes the window to fill only the bottom half of the screen.
  • f.changesize string โ€” lets you change the size of the focused window. The format of string has to be either "<border> <+|-><sizechange>" (where border must be one of Top, Bottom, Left or Right) or "<x size>x<y size>" (where the size is the requested new window size). The height of the window can never be set/changed to less than the title height + 1 (or 1 if the window has no title), and the width can never be set/changed to less than 1. ๐Ÿ’€
"Right"  = c|s: all      : f.changesize "right +10"
"Left"   = c|s: all      : f.changesize "right -10"
"Down"   = c|s: all      : f.changesize "bottom +10"
"Up"     = c|s: all      : f.changesize "bottom -10"
"F1"     = c|s: all      : f.changesize "640x480"
"F2"     = c|s: all      : f.changesize "800x600"
"F3"     = c|s: all      : f.changesize "1024x768"
  • f.circledown โ€” lowers the top-most window that occludes another window.
  • f.circleup โ€” raises the bottom-most window that is occluded by another window.
  • f.colormap string โ€” okay bestie, this one rotates the colormaps (the ones it got from the WM_COLORMAP_WINDOWS property on the window) that ctwm will show when your pointer is inside this window. The string argument can be "next", "prev", or "default". ๐Ÿ’… Now real talk: the installed colormap is usually decided by keyboard focus. If you're on that pointer-driven keyboard focus vibe, a private colormap gets installed the moment you enter the window that owns it. But if you're on click-to-type, private colormaps won't install until you actually press a mouse button on the target window. No cap.
  • f.deiconify โ€” deiconifies the selected window. If the window isn't an icon, this function literally does nothing. <shrug emoji> ๐Ÿคทโ€โ™€๏ธ
  • f.delete โ€” sends the WM_DELETE_WINDOW message to the selected window if the client app asked for it through the WM_PROTOCOLS window property. The app is supposed to respond by removing the indicated window. If the window did not request WM_DELETE_WINDOW messages, the keyboard bell rings to tell you to pick another method. โš ๏ธ Note: this is very different from f.destroy. The whole point here is to delete a single window, not necessarily the entire application. Periodt.
  • f.deleteordestroy โ€” first tries to delete the window (sends it a WM_DELETE_WINDOW message), or kills it if the client doesn't accept such a message. It's giving "we tried to be polite, now we're not."
  • f.deltastop โ€” lets a user-defined function be aborted if the pointer has been moved more than MoveDelta pixels. See the example definition given for Function "move-or-raise" at the beginning of the section. ๐Ÿ‘‘
  • f.destroy โ€” instructs the X server to close the display connection of the client that created the selected window. Only use this as a last resort for shutting down runaway clients. See also f.delete. ๐Ÿ’€
  • f.downiconmgr โ€” warps the pointer to the next row in the current icon manger, wrapping to the beginning of the next column if necessary. (yes, it says "manger", iconic typo energy)
  • f.downworkspace โ€” go to the workspace immediately underneath the current workspace in the workspace manager. If the current workspace is the bottom one, go to the top one in the same column. The result depends on the layout of the workspace manager. Layout said "it depends."
  • f.exec string โ€” passes the argument string to /bin/sh for execution. In multiscreen mode, if string starts a new X client without giving a display argument, the client will appear on the screen from which this function was invoked. If the string โ€˜$currentworkspaceโ€™ is present inside the string argument, it will be substituted with the current workspace name. โœจ
  • f.fill string โ€” where string is either right, left, top, bottom or vertical. The current window is resized in the specified direction until it reaches an obstacle (either another window, or the screen border). f.fill โ€˜verticalโ€™ sets the window status to โ€˜zoomedโ€™ and toggles โ€” calling it again will reset the previous window size. Slay.
  • f.fittocontent โ€” can be used only with window boxes. The result is to have the box have the minimal size that contains all its children windows. Minimalist queen.
  • f.focus โ€” toggles the keyboard focus of the server to the selected window, changing the focus rule from pointer-driven if necessary. If the selected window already was focused, this function executes an f.unfocus. Focus flip!
  • f.forcemove โ€” like f.move except that it ignores the DontMoveOff variable. Rules? Never heard of her.
  • f.forwiconmgr โ€” warps the pointer to the next column in the current icon manager, wrapping to the beginning of the next row if necessary.
  • f.forwmapiconmgr โ€” warps the pointer in the same manner as f.forwiconmgr but only stops at windows that are mapped. Only the visible ones, bestie.
  • f.fullzoom โ€” resizes the selected window to the full size of the display or else restores the original size if the window was already zoomed. ๐Ÿ”ฅ
  • f.function string โ€” executes the user-defined function whose name is specified by the argument string. Custom function? Say less.
  • f.gotoworkspace workspace_name โ€” warps you to the workspace whose name is workspace_name. ๐Ÿฆ‹
  • f.hbzoom โ€” synonym for f.bottomzoom. Same vibe, different name.
  • f.hideiconmgr โ€” unmaps the current icon manager. Poof, gone.
  • f.hideworkspacemgr โ€” unmap the WorkSpace manager. Bye bye.
  • f.horizoom โ€” similar to the f.zoom function except that the selected window is resized to the full width of the display. Wide leg energy.
  • f.htzoom โ€” synonym for f.topzoom.
  • f.hypermove โ€” use this function to โ€˜moveโ€™ a window between 2 captives ctwm (or between a captive and the root ctwm). Of course 2 ctwms are completely different universes. You have to go in hyperspace to achieve this, hence the name. Interdimensional travel but make it windows. ๐ŸŒŒ
  • f.hzoom โ€” synonym for f.horizoom.
  • f.iconify โ€” iconifies or deiconifies the selected window or icon, respectively. Toggle realness.
  • f.identify โ€” displays a summary of the name and geometry of the selected window. Clicking the pointer or pressing a key in the window will dismiss it. Vibe check: who are you and where are you?
  • f.initsize โ€” resets a window to its initial size given by the WM_NORMAL_HINTS hints. Back to factory settings, but cute.
  • f.jumpdown step โ€” designed to be bound to a key, it moves the current window (step * {X,Y}MoveGrid) pixels downward, stopping if the window encounters another window or the screen border (ala f.pack). Hop down, bestie.
  • f.jumpleft step โ€” leftward equivalent of f.jumpdown.
  • f.jumpright step โ€” rightward equivalent of f.jumpdown.
  • f.jumpup step โ€” upward equivalent of f.jumpdown.
  • f.lefticonmgr โ€” similar to f.backiconmgr except that wrapping does not change rows. Stay in your lane, literally.
  • f.leftworkspace โ€” go to the workspace immediately on the left of the current workspace in the workspace manager. If the current workspace is the leftest one, go to the rightest one in the same row. The result depends on the layout of the workspace manager. Left is a vibe.
  • f.leftzoom โ€” similar to the f.bottomzoom function but causes the selected window is only resized to the left half of the display. Half and half, iconic.
  • f.lower โ€” lowers the selected window. Down you go.
  • f.menu string โ€” invokes the menu specified by the argument string. Cascaded menus may be built by nesting calls to f.menu. When a menu is popped up, you can use the arrow keys to move the cursor around it. โ€˜Downโ€™ or space goes down, โ€˜Upโ€™ goes up, โ€˜Leftโ€™ pops down the menu, and โ€˜Rightโ€™ activates the current entry. The first letter of an entry name activates this entry (the first one if several entries match). If the first letter is ~ then Meta-the-second-letter activates it, if this first letter is ^ then Control-the-second-letter activates it, and if this first letter is space, then the second letter activates it. Menu navigation but make it keyboard queen. ๐Ÿ‘‘
  • f.move โ€” drags an outline of the selected window (or the window itself if the OpaqueMove variable is set) until the invoking pointer button is released. Double clicking within the number of milliseconds given by ConstrainedMoveTime warps the pointer to the center of the window and constrains the move to be either horizontal or vertical depending on which grid line is crossed. To abort a move, press another button before releasing the first button. Move, but make it dramatic.
  • f.movepack โ€” like f.move except that it tries to avoid overlapping of windows. When the moving window begin to overlap with another window, the move is stopped. If you go too far over the other window (more that MovePackResistance pixels), the move is resumed and the moving window can overlap with the other window. Useful to pack windows closely. Respectful spacing, until you push it.
  • f.movepush โ€” like f.move except that it tries to avoid overlapping of windows. When the moving window begins to overlap with another window, the other window is pushed. If you go too far over the other window (more that MovePackResistance pixels), there is no push and the moving window can overlap with the other window. Only available if OpaqueMove is active. Shove, but politely.
  • f.moveresize geometry โ€” takes one string argument which is a geometry with the standard X geometry syntax (e.g. 200x300+150-0). Sets the current window to the specified geometry. The width and height are to be given in pixel, no base size or resize increment are used. Math but make it window placement.
  • f.movetonextworkspace โ€” move the window to the next workspace. Next!
  • f.movetoprevworkspace โ€” move the window to the previous workspace. Back it up.
  • f.movetonextworkspaceandfollow โ€” move the window to the next workspace and go to that workspace. And follow, because obviously.
  • f.movetoprevworkspaceandfollow โ€” move the window to the previous workspace and go to that workspace. Same but backwards.
  • f.nexticonmgr โ€” warps the pointer to the next icon manager containing any windows on the current or any succeeding screen. Icon manager hopping.
  • f.nextworkspace โ€” go to the next workspace in the list, using the order given in the .ctwmrc file. Order matters, bestie.
  • f.nop โ€” does nothing and is typically used with the DefaultFunction or WindowFunction variables or to introduce blank lines in menus. Literally nothing, but make it intentional.
  • f.occupy โ€” pops up a window for the user to choose which workspaces a window belongs to. Choose your own adventure.
  • f.occupyall โ€” makes the specified window occupy all the workspaces. She's everywhere. Main character energy. ๐Ÿ’…
  • f.pack string โ€” okay so string is one of right, left, top or bottom. Your current window slides thataway until it hits an obstacle (either another window, or the screen border). And the pointer? It follows the window the whole way. Bestie behavior fr. ๐Ÿซถ
  • f.previconmgr โ€” warps the pointer to the previous icon manager that has any windows in it, on the current screen or the ones before it. โœจ
  • f.prevworkspace โ€” jumps to the previous workspace in the list, using the order you gave in your .ctwmrc file. ๐ŸŽ€
  • f.pin โ€” valid only in a root menu. Makes a menu permanent on the screen. It's a toggle, so if you hit it while the menu is already permanent, it goes back to non-permanent. Iconic pin behavior tbh ๐Ÿ’…
  • f.quit โ€” makes ctwm restore the window's borders and then dip out entirely. ๐Ÿšช And heads up: if ctwm is the first client invoked from xdm, this results in a server reset. So like, the whole vibe resets, not just ctwm.
  • f.raiseicons โ€” raises all the icons in the current workspace. every single one. up they go ๐Ÿ”ฅ
  • f.raise โ€” raises the selected window. that's it, that's the whole function. simple. clean. โœจ
  • f.raiselower โ€” raises the selected window to the top of the stacking order if it's occluded by any windows. Otherwise? The window gets lowered instead. it's giving mood ring energy, it depends on the situation ๐Ÿ’€
  • f.removefromworkspace string โ€” removes the selected window from the workspace whose name is string. bye bestie ๐Ÿ‘‹
  • f.refresh โ€” causes all windows to be refreshed. a lil spa day for your display ๐ŸŒธ
  • f.rereadsounds โ€” causes the .ctwm-sounds file to be re-read. See the SOUNDS section for the whole deal. ๐Ÿ”Š
  • f.resize โ€” displays an outline of the selected window. Crossing a border (or setting AutoRelativeResize) will cause the outline to start rubber banding until you release the invoking button. ๐Ÿชข And if you want to abort a resize? Press another button before releasing the first one. no cap, that's the escape hatch.
  • f.restart โ€” kills and restarts ctwm. glowed down just to glow back up ๐Ÿ’€โœจ
  • f.restoregeometry โ€” restores the current window geometry to whatever was saved in the last call to f.savegeometry. it's giving "remember when" ๐ŸŽ€
  • f.righticonmgr โ€” similar to f.nexticonmgr, except that wrapping does not change rows. sideways only, we stay in our lane ๐Ÿ’…
  • f.rightworkspace โ€” jumps to the workspace immediately on the right of the current one in the workspace manager. If you're already on the rightest one, it goes to the leftest one in the same row. The result depends on the layout of the workspace manager, so lowkey it's doing its own thing. ๐ŸŒˆ
  • f.rightzoom โ€” this variable is similar to the f.bottomzoom function, except the selected window only gets resized to the right half of the display. halfsies ๐Ÿ’œ
  • f.ring โ€” selects a window and adds it to the WarpRing, or removes it if it was already in the ring. This command makes f.warpring much more useful, because it makes its configuration dynamic. no more hardcoding your ring, we're doing this live ๐Ÿ”ฅ
  • f.savegeometry โ€” the geometry of the current window gets saved. The next call to f.restoregeometry will restore this window right back to this geometry. screenshotting the vibe for later ๐Ÿ“ธ
  • f.saveyourself โ€” sends a WM_SAVEYOURSELF message to the selected window, but only if it has requested that message in its WM_PROTOCOLS window property. Clients that accept this message are supposed to checkpoint all state associated with the window and update the WM_COMMAND property as specified in the ICCCM. And if the selected window hasn't selected for this message? The keyboard bell gets rung. ๐Ÿ”” awkward but ok
  • f.separator โ€” valid only in menus. The effect is to add a line separator between the previous entry and the following one. The name selector part in the menu is not used โ€” but it must be present. ๐Ÿ‘‘ rules are rules
  • f.setbuttonsstate โ€” sets the WorkSpace manager into button state. ๐Ÿ”˜
  • f.setmapstate โ€” sets the WorkSpace manager into map state. ๐Ÿ—บ๏ธ
  • f.showiconmgr โ€” maps the current icon manager. โœจ
  • f.sorticonmgr โ€” sorts the entries in the current icon manager alphabetically. See the variable SortIconManager for more. a-z bestie, we love organization ๐Ÿ“š
  • f.showbackground โ€” unmaps all windows in the current workspace. It's a toggle, so if all the windows are already unmapped, they all get remapped. Better bind this one in the root context. ๐Ÿ–ผ๏ธ peekaboo
  • f.showworkspacemgr โ€” maps the WorkSpace manager. ๐Ÿ—บ๏ธโœจ
  • f.slowdownanimation โ€” decreases AnimationSpeed by 1. slow it down, we're savoring it ๐ŸŒ
  • f.speedupanimation โ€” increases AnimationSpeed by 1. zoom zoom โšก
  • f.squeeze โ€” f.squeeze squeezes a window down to a null vertical size. Works only for windows that have either a title, or a 3D border (gotta have something left on the screen, obviously). And if the window is already squeezed, it gets unsqueezed. toggle moment ๐Ÿ’…
  • f.startanimation โ€” restarts freezed animations (if any). ๐Ÿฆ‹
  • f.stopanimation โ€” freezes animations (if any). โ„๏ธ
  • f.title โ€” provides a centered, unselectable item in a menu definition. It should not be used in any other context. queen of the menu, nowhere else ๐Ÿ‘‘
  • f.toggleoccupation string โ€” adds the selected window to the workspace whose name is string if it doesn't already belong to it, and removes it from that workspace if it does. ๐ŸŽญ
  • f.togglesound โ€” toggles sound on and off. See the SOUNDS section. ๐Ÿ”‡๐Ÿ”Š
  • f.togglestate โ€” toggles the state of the WorkSpace manager. ๐Ÿ”
  • f.toggleworkspacemgr โ€” toggles the presence of the WorkSpaceManager. If it's mapped, it gets unmapped, and vice versa. ๐Ÿ‘ป
  • f.topzoom โ€” this variable is similar to the f.bottomzoom function, except the selected window only gets resized to the top half of the display. ๐Ÿ’œ
  • f.unfocus โ€” resets the focus back to pointer-driven. You should use this when a focused window is no longer desired. letting go is self care ๐Ÿ“
  • f.upiconmgr โ€” warps the pointer to the previous row in the current icon manager, wrapping to the last row in the same column if it has to. โฌ†๏ธ
  • f.upworkspace โ€” jumps to the workspace immediately above the current one in the workspace manager. If you're already on the top one, it goes to the bottom one in the same column. The result depends on the layout of the workspace manager. ๐ŸŒˆ
  • f.vanish โ€” the specified window vanishes from the current workspace if it occupies at least one other WorkSpace. In the other cases? Do nothing. poof, but conditionally ๐Ÿ’จ
  • f.vlzoom โ€” a synonym for f.leftzoom. same energy, different name ๐Ÿชž
  • f.vrzoom โ€” a synonym for f.rightzoom. ๐Ÿชž
  • f.warphere win_name โ€” adds the window that has a name or class matching string to the current workspace, and warps the pointer to it. If the window is iconified, it gets deiconified if the variable WarpUnmapped is set โ€” otherwise it's ignored. ๐ŸŒ€
  • f.warpring string โ€” warps the pointer to the next or previous window as indicated by the argument string, which may be "next" or "prev", specified in the WindowRing variable. ๐Ÿ’ซ
  • f.warpto string โ€” warps the pointer to the window that has a name or class matching string. If the window is iconified, it gets deiconified if the variable WarpUnmapped is set โ€” otherwise it's ignored. ๐ŸŒ€
  • f.warptoiconmgr string โ€” warps the pointer to the icon manager entry associated with the window containing the pointer, in the icon manager specified by the argument string. If string is empty (i.e. ""), the current icon manager gets chosen. ๐ŸŽฏ
  • f.warptoscreen string โ€” warps the pointer to the screen specified by the argument string. And string has options, bestie:
    • a number (e.g. "0" or "1") ๐Ÿ”ข
    • the word "next" โ€” the current screen plus 1, skipping over any unmanaged screens โญ๏ธ
    • the word "back" โ€” the current screen minus 1, skipping over any unmanaged screens โฎ๏ธ
    • the word "prev" โ€” the last screen visited ๐Ÿ•ฐ๏ธ
  • f.winrefresh โ€” similar to the f.refresh function, except only the selected window gets refreshed. targeted glow-up โœจ
  • f.zoom โ€” similar to the f.fullzoom function, except that only the height of the selected window is changed. tall energy only ๐Ÿ’…

Okay bestie, this is where it gets fun. You can group functions together and pick them interactively โ€” either as a pop-up (when you bind it to a pointer button) or a pull-down (when it's attached to a titlebutton). Every menu spec has: the menu name (that's what f.menu calls it by), optional default foreground + background colors, the list of item names and which functions they fire, and optional per-item foreground + background colors. Look at the shape:

Menu "menuname" [ ("deffore":"defback") ]
{
     string1   [ ("fore1":"backn")]     function1
     string2   [ ("fore2":"backn")]     function2
          .
          .
          .
     stringN   [ ("foreN":"backN")]     functionN
}

menuname is case-sensitive โ€” do not play with her. The optional deffore and defback args set the foreground and background colors used on a color display to highlight menu entries. The string part of each entry is literally the text that shows up in the menu. The optional fore and back args set that entry's foreground/background when the pointer is not in the entry โ€” and heads up, these colors only do anything on a color display. Default behavior is to use the colors from the MenuForeground and MenuBackground variables. The function part of an entry can be any of the functions, including your own user-defined ones, or even additional menus. Menus in menus. It's giving inception. ๐ŸŒ€


โœจ the 3 special menus โœจ

There are exactly three of these and they are iconic:

  • TwmWindows โ€” holds the names of all the client and ctwm-supplied windows in the current workspace. Pick an entry and the WindowFunction gets executed on that window. If WindowFunction hasn't been set, the window just gets deiconified and raised. Simple, effective, slay.
  • TwmWorkspaces โ€” holds the names of your workspaces. Selecting an entry goes to that workspace. And these entries have submenus listing every window in that workspace, and selecting one of those runs f.warpto on that window. Nested menu realness. ๐Ÿซถ
  • TwmAllWindows โ€” holds the names of all the windows ctwm manages. Selecting an entry executes f.warpto on that window. That's it. That's the whole job.

And here's a lil trick that's so satisfying: if an entry name starts with a * (star), that star won't be displayed and that entry becomes the default entry for the menu. So when a menu has a default entry and it's used as a submenu of another menu, that default entry's action runs automatically the moment the submenu is selected โ€” without the submenu ever being displayed. It's hard to explain, but easy to understand. Trust. ๐Ÿ˜Œ


๐Ÿฆ‹ ICONS ๐Ÿฆ‹

ctwm supports several different ways of messing with iconified windows, because of course she does. The classic pixmap-and-text style can be laid out by hand or automatically arranged as described by the IconRegion variable. And then there's the icon manager โ€” a terse little grid of icon names that uses screen space way more efficiently and also lets you navigate between windows straight from the keyboard. Keyboard girlies, this one's for you. โŒจ๏ธ

An icon manager is a window containing the names of selected (or all) windows currently on the display. Besides the window name, a small button using the default iconify symbol shows up to the left of the name when the window is iconified. By default, clicking an entry in the icon manager performs f.iconify. Want different behavior? Use the iconmgr context when you're specifying button and keyboard bindings.

Moving the pointer into the icon manager also directs keyboard focus to the indicated window (setting the focus explicitly or else sending synthetic events NoTitleFocus is set). And with the f.upiconmgr, f.downiconmgr, f.lefticonmgr, and f.righticonmgr functions, you can move input focus between windows directly from the keyboard. Up down left right, no mouse required, main character energy fr. ๐Ÿ‘‘


๐Ÿ”Š SOUNDS ๐Ÿ”Š

If it was compiled with the USE_SOUND flag, ctwm can play sounds for any X event. She'll look for a file called .ctwm-sounds in your home directory to map every X event to a sound file to be played. Vibe check: passed.

Each line in .ctwm-sounds has this syntax:

{X event}: {sound file}

The currently known X events you can use are:

KeyPress
KeyRelease
ButtonPress
ButtonRelease
MotionNotify
EnterNotify
LeaveNotify
FocusIn
FocusOut
KeymapNotify
Expose
GraphicsExpose
NoExpose
VisibilityNotify
CreateNotify
DestroyNotify
UnmapNotify
MapNotify
MapRequest
ReparentNotify
ConfigureNotify
ConfigureRequest
GravityNotify
ResizeRequest
CirculateNotify
CirculateRequest
PropertyNotify
SelectionClear
SelectionRequest
SelectionNotify
ColormapNotify
ClientMessage
MappingNotify

And additionally, these two are recognised, and they represent the time when ctwm is started or shut down:

Startup
Shutdown

๐Ÿ’€ BUGS ๐Ÿ’€

Okay so nobody's perfect and here's the receipts:

  • The resource manager should have been used instead of all of the window lists. (ngl, fair.)
  • The IconRegion variable should take a list.
  • Double clicking very fast to get the constrained move function will sometimes cause the window to move, even though the pointer is not moved. ๐Ÿ˜ญ
  • If IconifyByUnmapping is on and windows are listed in IconManagerDontShow but not in DontIconifyByUnmapping, they may be lost if they are iconified and no bindings to f.menu "TwmWindows" or f.warpto are setup. โš ๏ธ
Bestie. That last one is a real one. Windows can just be gone. Set up those bindings, I'm begging. ๐Ÿ™ˆ

๐ŸŽ€ FILES ๐ŸŽ€

  • $HOME/.ctwmrc.<screen number>
  • $HOME/.ctwmrc
  • /usr/lib/X11/twm/system.ctwmrc
  • $HOME/.twmrc

๐ŸŒˆ ENVIRONMENT VARIABLES ๐ŸŒˆ

  • DISPLAY โ€” this one determines which X server to use. It's also set during f.exec so that programs come up on the proper screen. Very important, very on top of things. โœจ
  • HOME โ€” used as the prefix for files that begin with a tilde, and for locating the ctwm startup file. Home sweet home. ๐Ÿ 

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

X(1), Xserver(1), xdm(1), xrdb(1)


Portions copyright 1988 Evans & Sutherland Computer Corporation; portions copyright 1989 Hewlett-Packard Company and the Massachusetts Institute of Technology. See X(1) for a full statement of rights and permissions.


โญ AUTHORS โญ

The absolute legends who built this, no cap:

  • Tom LaStrange, Solbourne Computer
  • Jim Fulton, MIT X Consortium
  • Steve Pitschke, Stardent Computer
  • Keith Packard, MIT X Consortium
  • Dave Sternlicht, MIT X Consortium
  • Dave Payne, Apple Computer
  • Claude Lecommandeur, Swiss Polytechnical Institute of Lausanne (lecom@sic.epfl.ch)
  • Richard Levitte (richard@levitte.org)

And that's the whole page, bestie โ€” we made it. ๐Ÿฅน This was CTWM(1), Version 3.7 โ€” the CTWM manual page, served fresh from the source itself. Go forth, configure your window manager, and be the main character of your own desktop. periodt. ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from