CTWM(1)
โจ 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-displayor by theDISPLAYenvironment variable) should be managed. By default,ctwmwill attempt to manage all screens on the display. lowkey a "just the one, thanks" flag โจ-cfgchkโ This option causesctwmto 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.ctwmwill first try to loadfilename.num, where num is the screen number. If it fails, it will try to loadfilename. By default,ctwmwill 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 thatctwmshould 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 thatctwmshould not filter the startup file throughm4. Available only ifctwmis compiled with theUSEM4flag. ๐ซ-kโ This option indicates thatctwmshould keep the definitions it prepends to your startup file when filtering throughm4in/tmp. Available only ifctwmis compiled with theUSEM4flag. ๐-K m4fileโ This option indicates thatctwmshould keep the result of filtering your startup file throughm4in the named file. Available only ifctwmis compiled with theUSEM4flag. ๐๏ธ-versionโctwmjust prints its version number. short n sweet, no notes ๐-infoโctwmprints its detailed version and compile time options. the full dossier ๐-w [win-id]โ If-wis specified without a win-id value,ctwmdoes 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,ctwmwill try to use this window as root window. You can run any number of instantiation ofctwmat the same time. You can even have embeddedctwminstantiations. This is totally useless, but I like it. Thef.adoptwindowfunction can be used to capture an existing window belonging to anotherctwm. A possible use of such mode can be to test new configuration file without restartingctwm. ๐ช (window managers inside window managers inside window managers, it's giving matryoshka)-Wโ This option tellsctwmnot 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 theDISPLAYenvironment variablehost: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 userstwmstartup file./usr/lib/X11/twm/system.ctwmrcโ If none of the preceding files are found,ctwmwill 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 ofCLIENTHOST)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 byProtocolVersion(3).REVISIONโ The X minor protocol revision. As seen byProtocolRevision(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 is5.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.twmrcfile that ctwm proper won't understand (likeWorkSpaces) 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 ofStaticGray,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โ onStaticGrayandGrayScale.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 ifTWM_CAPTIVEis also defined. Contains the name of the captive ctwm (-nameflag);
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 them4preprocessing is subject to the compilation defineUSEM4. 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โ WhenReallyMoveInWorkspaceManageris present and the user is moving a window from theWorkSpaceMap, ctwm display the actual window only if it crosses the current active workspace. IfAlwaysShowWindowWhenMovingFromWorkspaceManageris present, the actual window is always visible during the move, regardless of whether it crosses the current workspace or not. TheShiftkey 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 is0, animations are freezed. The default value is0. ๐ง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 functionf.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 theOccupyandOccupyAllfields in the.ctwmrcfile.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 theRaiseDelayvariable. This action can be interactively enabled or disabled on individual windows using the functionf.autoraise.AutoRaiseIconsโ Icons are raised when the cursor enters it. Useful withShrinkIconTitles.AutoRelativeResizeโ This variable indicates that dragging out a window size (either when initially sizing the window with pointerButton2or 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 (seef.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 specifyBeNiceToColormapctwm uses stipling instead of new colors, the effect is less beautiful, but acceptable. In this caseClearShadowContrastandDarkShadowContrasthave 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.movewithDontMoveOff, etc...) will consider this zone as offscreen. Default is0.
๐ 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 aColororMonochromelist. 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 theIconManagerDontShowoptions set may not be accessible at all if you haven't bound theTwmWindowsmenu 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 whenNoTitleis 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 aColororMonochromelist, 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 neitherMapWindowBackgroundnorMapWindowForeground? 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 theWorkSpacecommand. 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:ColororMonochromelist only, optional win-list of window names and colors for per-window flair, and if neitherMapWindowBackgroundnorMapWindowForegroundis 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,ColororMonochromelist 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,ColororMonochromelist only. Default is'black'. ๐คMenuShadowColor stringโ the color of the shadow behind pull-down menus.ColororMonochromelist only. Default is'black'. ๐MenuShadowDepth pixelsโ how deep the shadow is that ctwm uses for 3D menus, whenUseThreeDMenusis selected. ๐ฅMenuTitleBackground stringโ the background color forf.titleentries in menus.ColororMonochromelist only. Default is'white'.MenuTitleForeground stringโ the foreground color forf.titleentries in menus, alsoColororMonochromelist only. Default is'black'.Monochrome { colors }โ a whole list of color assignments that should be made if the screen has a depth of1. Go read the description ofColor, it's the same energy. ๐จMoveDelta pixelsโ how many pixels the pointer has to move beforef.movestarts working. Also peepf.deltastop. Default is zero pixels. ๐MovePackResistance pixelsโ how many pixels of the movepack and movepush resistance. Seef.movepackandf.movepush. ๐ชMoveOffResistance pixelsโ how many pixels of the moveoff resistance. Here's the tea: if pixels is positive,DontMoveOffwill only stop you from going off the edge if you're within n pixels of that edge. Go further andDontMoveOffliterally gives up and lets you go as far as you want.f.forcemovestill lets you completely ignoreDontMoveOff. 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 theBorderWidthkeyword 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 currentBorderColor; when it's not highlighted it's stippled with a gray pattern using the currentBorderTileForegroundandBorderTileBackgroundcolors. ๐ฉถ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 theWorkSpaceMap. Instead, only the colors defined inWorkSpacesare used as background in theWorkSpaceMap. ๐ผ๏ธ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 ofOpaqueMove. SeeOpaqueMove. ๐NoOpaqueResize { window-list }โ the counterpart ofOpaqueResize. SeeOpaqueResize. ๐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 thef.warptofunction. 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 withf.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โOccupyAllwindows won't be displayed in theWorkSpaceMapwindow.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:MakeTitlecan 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 theSqueezeTitleoptions 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: TheOccupydeclaration should come after theWorkSpacesdeclaration. 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: TheOccupyAlldeclaration should come after theWorkSpacesdeclaration. 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:imfileor|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"}
}
TheWorkSpacesdeclaration should come before theOccupyorOccupyAlldeclarations. 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 to1often 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 is1. Heads up:f.forcemovestraight-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 is8. โจ
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 tof.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 theTwmWindowsmenu. 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 forf.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-wflag.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 keywordalterin 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 keywordafollowed 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 theroot,window,iconandiconmgrcontexts are allowed. โ ๏ธ
f.autolowerโ toggles whether or not the selected window gets lowered whenever the pointer leaves it. Peep the description of the variableAutoLower.f.autoraiseโ toggles whether or not the selected window gets raised whenever the pointer enters it. Peep the description of the variableAutoRaise.f.backmapiconmgrโ warps the pointer the same way asf.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 tof.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 ofTop,Bottom,LeftorRight) 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 theWM_COLORMAP_WINDOWSproperty 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 theWM_DELETE_WINDOWmessage to the selected window if the client app asked for it through theWM_PROTOCOLSwindow property. The app is supposed to respond by removing the indicated window. If the window did not requestWM_DELETE_WINDOWmessages, the keyboard bell rings to tell you to pick another method. โ ๏ธ Note: this is very different fromf.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 aWM_DELETE_WINDOWmessage), 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 thanMoveDeltapixels. 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 alsof.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/shfor 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 eitherright,left,top,bottomorvertical. 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 anf.unfocus. Focus flip!f.forcemoveโ likef.moveexcept that it ignores theDontMoveOffvariable. 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 asf.forwiconmgrbut 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 forf.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 thef.zoomfunction except that the selected window is resized to the full width of the display. Wide leg energy.f.htzoomโ synonym forf.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 forf.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 theWM_NORMAL_HINTShints. 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 (alaf.pack). Hop down, bestie.f.jumpleft stepโ leftward equivalent off.jumpdown.f.jumpright stepโ rightward equivalent off.jumpdown.f.jumpup stepโ upward equivalent off.jumpdown.f.lefticonmgrโ similar tof.backiconmgrexcept 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 thef.bottomzoomfunction 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 tof.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 theOpaqueMovevariable is set) until the invoking pointer button is released. Double clicking within the number of milliseconds given byConstrainedMoveTimewarps 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โ likef.moveexcept 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 thatMovePackResistancepixels), 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โ likef.moveexcept 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 thatMovePackResistancepixels), there is no push and the moving window can overlap with the other window. Only available ifOpaqueMoveis 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.ctwmrcfile. Order matters, bestie.f.nopโ does nothing and is typically used with theDefaultFunctionorWindowFunctionvariables 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.packstring โ okay so string is one ofright,left,toporbottom. 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.ctwmrcfile. ๐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โ makesctwmrestore the window's borders and then dip out entirely. ๐ช And heads up: ifctwmis the first client invoked fromxdm, 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.removefromworkspacestring โ 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-soundsfile 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 settingAutoRelativeResize) 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 restartsctwm. glowed down just to glow back up ๐โจf.restoregeometryโ restores the current window geometry to whatever was saved in the last call tof.savegeometry. it's giving "remember when" ๐f.righticonmgrโ similar tof.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 thef.bottomzoomfunction, except the selected window only gets resized to the right half of the display. halfsies ๐f.ringโ selects a window and adds it to theWarpRing, or removes it if it was already in the ring. This command makesf.warpringmuch 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 tof.restoregeometrywill restore this window right back to this geometry. screenshotting the vibe for later ๐ธf.saveyourselfโ sends aWM_SAVEYOURSELFmessage to the selected window, but only if it has requested that message in itsWM_PROTOCOLSwindow property. Clients that accept this message are supposed to checkpoint all state associated with the window and update theWM_COMMANDproperty as specified in theICCCM. And if the selected window hasn't selected for this message? The keyboard bell gets rung. ๐ awkward but okf.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 rulesf.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 variableSortIconManagerfor 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. ๐ผ๏ธ peekaboof.showworkspacemgrโ maps the WorkSpace manager. ๐บ๏ธโจf.slowdownanimationโ decreasesAnimationSpeedby1. slow it down, we're savoring it ๐f.speedupanimationโ increasesAnimationSpeedby1. zoom zoom โกf.squeezeโf.squeezesqueezes 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.toggleoccupationstring โ 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 thef.bottomzoomfunction, 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 forf.leftzoom. same energy, different name ๐ชf.vrzoomโ a synonym forf.rightzoom. ๐ชf.warpherewin_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 variableWarpUnmappedis set โ otherwise it's ignored. ๐f.warpringstring โ warps the pointer to the next or previous window as indicated by the argument string, which may be"next"or"prev", specified in theWindowRingvariable. ๐ซf.warptostring โ warps the pointer to the window that has a name or class matching string. If the window is iconified, it gets deiconified if the variableWarpUnmappedis set โ otherwise it's ignored. ๐f.warptoiconmgrstring โ 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.warptoscreenstring โ 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 ๐ฐ๏ธ
- a number (e.g.
f.winrefreshโ similar to thef.refreshfunction, except only the selected window gets refreshed. targeted glow-up โจf.zoomโ similar to thef.fullzoomfunction, except that only the height of the selected window is changed. tall energy only ๐
๐ธ MENUS ๐ธ
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 theWindowFunctiongets executed on that window. IfWindowFunctionhasn'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 runsf.warptoon that window. Nested menu realness. ๐ซถTwmAllWindowsโ holds the names of all the windows ctwm manages. Selecting an entry executesf.warptoon 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
IconRegionvariable 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
IconifyByUnmappingis on and windows are listed inIconManagerDontShowbut not inDontIconifyByUnmapping, they may be lost if they are iconified and no bindings tof.menu "TwmWindows"orf.warptoare 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 duringf.execso 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)
๐ COPYRIGHT ๐
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
- ubuntu jammy: ctwm 3.7-5
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms