Functions(7x)
β¨ NAME β¨
Functions β all the built-in AfterStep functions, bestie π
This is the Functions(7x) page from the AfterStep X11 window manager manual. Now let's get into it π
π¦ CONFIGURATION OPTIONS π¦
okay so this is the whole menu of config options you can use, and we are going through every single one, no skimming, no skipping π ββοΈ
Background "name" filenameβ swap your Background image to the file you pick π
It copies the image file you gave as filename into the user's non-configurable directory. Fair warning though: depending on the Background configuration in your look file, this may not have any effect at all. π
BackgroundForeign "name" filenameβ change the Background image to the file you pick, but make it β¨fancyβ¨
Works the same as Background, except it also generates a minipixmap from the image automagically. It also tries to determine whether the background should be fullscreen, and crops/scales it to the proper size. π¦
Beepβ makes the window manager issue a beep π
Pretty useful eh? :)
BookmarkWindow "name" new_bookmarkβ drops a bookmark on the selected window π
Then you can use it later on to get back to that window.
Category "category-name"β generates a whole menu from every member belonging to the desktop category you name π
Example: Category "Modules" generates a menu of all AfterStep modules in afterstep/applications/modules.desktop.
CategoryTreeβ FIXME: add proper description here. π«
(yes literally, that's what the page says, i'm not making it up, they left us a TODO and i'm passing it straight to you π)
ChangeColorscheme "name" filenameβ change the Color Scheme to the file you name π¨
Copies the color scheme configuration file specified by filename into the user's non-configurable directory.
ChangeFeel "name" filenameβ change the Feel to the file you name β¨
Copies the feel configuration file specified by filename into the user's non-configurable directory.
ChangeLook "name" filenameβ change the Look to the file you name π
Copies the Look configuration file specified by filename into the user's non-configurable directory, to be used by AfterStep.
ChangeTheme "name" file_nameβ sets the current theme config file π
Such a config file may include settings for look, feel, menu, autoexec and any module.
ChangeThemeFileβ installs a theme from a provided.tar,.tar.gz, or.tar.bz2AfterStep theme file π¦ChangeWindowDown [ "name" window_name ]β sends the pointer down the window list, backwards π¦
Causes the pointer to move to the previous window in the list of windows for which CirculateSkip has not been specified.
The mouse will jump (going backwards) to the first window whose name (or icon name or class) matches window_name. The "name" entry then becomes required, but serves no purpose if the function is not called from a menu or popup.
ChangeWindowUp [ "name" window_name ]β sends the pointer through the window list too β¬οΈ
Causes the pointer to move to the previous window in the list of windows for which CirculateSkip has not been specified.
The mouse will jump to the first window whose name (or icon name or class) matches window_name. The "name" entry then becomes required, but serves no purpose if the function is not called from a menu or popup.
Close [ "name" ]β the polite goodbye π
First sends the WM_DELETE message, and if this is not understood, then the XKillClient(3) is sent to the window.
CursorMove horizontal verticalβ moves the mouse pointer around by views π±οΈ
Moves the mouse pointer by horizontal views in the x-direction, and vertical views in the y-direction. Either or both entries may be negative. Both horizontal and vertical values are expressed in percent of pages, so 100 would be one full view.
The CursorMove function should not be called from pop-up menus. no cap π
ββοΈ
Delete [ "name" ]β asks a window very nicely to leave π
Sends a WM_DELETE message to a window asking that it remove itself, frequently causing the application to exit.
Desk arg1 [ arg2 ]β teleports you to another desk π
Changes current desk to another desk as surmised from the arguments supplied. If only arg1 is specified and is non-zero, then the current desk will become "desk + arg1" and arg2 is ignored. If arg1 is zero, then arg2 must be specified or no desk change will occur; and arg2 will specify the desk to switch to. Desk numbers are determined dynamically and must be between 2147483647 and -2147483648; meaning they can also be negative. π
DesktopEntryβ FIXME: add proper description here. π«
(again!! another TODO!! we stay unserious π)
Destroy [ "name" ]β the nuclear option π€
Sends the XKillClient(3) to a window. Guaranteed to get rid of the window. no takebacks, periodt.
EndFunctionβ terminates a Complex Function definition πEndPopupβ terminates a Popup definition πExec "name" command [-options]β launches a sub process π
Specifies a sub process to initiate. The "name" is required for ease of parsing. The command is the command or application to be invoked along with any desired -options.
ExecBrowser "name" URLβ opens URL in your web browser πExecEditor "name" filenameβ opens filename in your text editor πExecInTerm "name" command [-options]β launches a sub process, but for the terminal girlies π»
Specifies a sub process to initiate. It is similar to Exec, though targeted at programs that need a terminal to run. The following terminal emulators are tried in order: aterm, rxvt, eterm, xterm.
Focusβ makes your selected window the main character π
Moves the view or window as needed to make the selected window visible. Sets the keyboard focus to the selected window. Raises the window if needed to make it visible. Warps the pointer into the selected window in focus-follows-mouse mode. Does not de-iconify. This function is primarily handy when used with a module such as the WinList.
Folder "folder-name"β defines a slide-out folder inside the current folder π
The following button definitions will be placed inside of the subfolder, until a *Wharf ~Folder line is encountered. See the EXAMPLES section below for an example. Folders may be nested.
This is a Wharf specific Function.
Fullscreenβ toggles the window's Fullscreen state π₯οΈ
Will disregard any AvoidCover windows and will try to make the window as big as the screen unless its hints set certain limitation on size. A window in Fullscreen mode cannot be Maximized. π
Function "function_name"β the big one, buckle up π
There are also two situations where this might occur as well: as a function definition stanza, or in calling a previously defined function declaration.
Function "function_name" built-in_file "action" [ argument ] EndFunction
Specifies the definition of a complex function "function_name", which can later be bound to a mouse button or key using "function_name" to recall this declaration. built-in_command specifies which command will be performed, taking its syntax from this list of Built-In Commands/Functions. "action" specifies the action to take followed by any additional arguments needed by the built-in_command. Menus can be specified by using the Popup command, as long as the menu was defined earlier in the configuration file.
The trigger actions which are recognized are Immediate (can be shortened to "I"), Motion, Click, DoubleClick and TripleClick. Immediate actions are executed as soon as the function is activated, even if a window has not been selected. If there are actions other than immediate ones, afterstep will wait to see if the user is clicking, double-clicking, triple-clicking or dragging the mouse; then will execute only the built-ins from the function definition whose trigger action matches the action performed by the user. The clicking, double-clicking and triple-clicking concepts do not carry through to using keyboard shortcuts.
Two special functions exist: InitFunction and RestartFunction. The InitFunction will be called when afterstep is started for the first time in any X session, and can be used to start modules and begin programs. The RestartFunction will be called when afterstep is restarted. It can be used to re-start modules but probably should not be used to start programs. These two functions are defined in the autoexec file.
When calling a previously defined Function or a Function from a key-stroke combination, Function is simply used as a built-in command using the previously defined "action" from the same function_name.
Function built-in_command "action" function_name
Refer to the feel.name files and below in EXAMPLES for examples.
GetHelpβ pulls up the docs for you π
Runs the afterstepdoc script, that attempts to guess which web browser is available on the system, and then launches it to display HTML documentation for AfterStep.
GoToBookmark ["name" window_bookmark ]β zooms to a bookmarked window π
Focuses the window specified by a previously placed window_bookmark.
GotoDeskViewport Desk+Vx+Vyβ changes both current desk and viewport, two birds one stone π¦GotoPage x yβ moves the desktop view to that page πΊοΈ
Moves the desktop view to page x y. The upper left page is (0,0), the upper right is (N,0), where N is one less than the current number of horizontal pages specified in the DeskTopSize command detailed in the Pager(1) man page. The lower left page is (0,M), and the lower right page is (N,M), where M is the desktop's vertical size as specified in the DeskTopSize command.
The GotoPage function should not be used in a pop-up menu. π
ββοΈ
Iconify [ "name" ] [ value ]β minimize / un-minimize, your choice π
Iconifies a window if it is not already iconified, or de-iconifies it if it is already iconified. If the optional argument value is positive, then only iconification will be allowed, and de-iconification will be inhibited. If the optional argument is negative, only de-iconification will be allowed.
InstallBackground "name" filenameβ copies the file to~/.afterstep/backgrounds/directory, so that it will show up in the menu, to be used for Root background πΌοΈInstallColorscheme "name" filenameβ copies the file to~/.afterstep/colorschemes/directory, so that it will show up in the menu, to be used as color scheme π¨InstallFeel "name" filenameβ copies the file to~/.afterstep/feels/directory, so that it will show up in the menu β¨InstallFont "name" filenameβ copies the specified TTF file to~/.afterstep/desktop/fonts/directory, so that it could be used in look configuration π€InstallIcon "name" filenameβ copies the specified image file to~/.afterstep/desktop/icons/directory, so that it could be used in look and database configuration πΈInstallLook "name" filenameβ copies the specified look file to~/.afterstep/looks/directory, so that it could be selected from the menu π
and bestie, that's literally not even all of it β more functions are coming, keep going π
πΌοΈ InstallThemeFile "name" filename
Okay so this one takes the theme file you point at and copies it into your ~/.afterstep/themes/ directory β so like, it becomes selectable from the menu afterward. Obsessed with the convenience. β¨
π InstallTile "name" filename
Same vibe but for tiles, bestie: copies the image file you specify into ~/.afterstep/desktop/tiles/, so it's all set to be used in your look and database config. πΈ
π¬ KIPCsendMessageAll
Sends a signal out to every single KDE application, refreshing their visual properties. Group announcement energy, fr fr π£
π KillAllModulesByName
Kills all the AfterStep modules that match the name you give it. All of them. Periodt.
πͺ KillModuleByName "name" modulename
Kills the one specific module matching the name you provided. Surgical. π
β¨ LargeMiniPixmap pixmap
Gives you a way to specify a pixmap to show off to the left of the menu item that invokes this menu, or up in the title of this menu. It's the one you use instead of MiniPixmap when you do not want a pixmap image scaled down β these stay full-size. The opposite of this is SmallMiniPixmap. π
See Also: MiniPixmap, SmallMiniPixmap, MenuMiniPixmaps.
π Lower [ "name" ]
Lets the user lower a window. Down you go, bestie. π
π MaxSwallow " window-name " command
Like Swallow, except the button gets resized to fit the application. Iconic little twist.
This is a Wharf specific Function.
π§ MaxSwallowModule " window-name " command
Like MaxSwallow, except the command is an AfterStep module.
This is a Wharf specific Function.
π² Maximize [ "name" ] [ horizontal vertical ]
Makes the window flip back and forth between full-screen size and its normal size. And if you pass the optional horizontal and vertical args, you get control over the percentage of the full screen that the new window size becomes. Specifically: if horizontal > 0, then the horizontal dimension of the window gets set to horizontal*screen_width/100. Vertical resizing works the same way.
Bestie, values larger than 100 can be used, but with caution. β οΈ
The defaults for horizontal and vertical are 100s (i.e., fullscreen).
πΌοΈ MiniPixmap pixmap
Specifies a pixmap to display to the left of the menu item that invokes this menu, or in the title of this menu. The default pixmap size is 24x24 pixels, and you can adjust that size in Look via MiniPixmapSize. π
See Also: MinipixmapSize, LargeMiniPixmap, SmallMiniPixmap, MenuMiniPixmaps.
π§© Module ModuleName [ arguments ]
Tells AfterStep that ModuleName should be spawned.
Currently, lots of modules ship with afterstep. Wharf(1x) and Pager(1x) are two of the most popular ones. Wharf will normally be spawned during initialization instead of in response to a mouse binding or menu action. Modules can be short-lived transient programs, or β like Wharf β they can be intended to stick around for the whole duration of the X session. Modules will be terminated by afterstep before restarts and quits, if possible. π«Ά
π Move [ "name" ]
Lets the user move a window or an iconified app. Scoot scoot. π»
β Nop ""
Drops a horizontal line (an <HR> type html line) into a menu entry list. Divider, but make it menu. β¨
π«οΈ Nop "name"
Drops a name into the menu, stippled β i.e., disabled and grayed-out. Not me putting a locked item in my menu π
π PasteSelection
This function is a stand-in for X clipboard copy-pasting, for when the application is missing it. So thoughtful of it. π₯°
π PinMenu ["name"]
Pins that menu on the desktop. Sticky. Iconic. β¨
πͺ PopUp "popup_name"
So there are two situations where this can show up: either as a popup menu stanza definition, or when calling a previously defined menu declaration.
Popup "popup_name" built-in_command "name" [ argument ]
EndPopup
This specifies the definition of a complex menu popup "popup_name", which you can then bind to a mouse button or key by using "popup_name" to recall this declaration. built-in_command says which command gets performed, using its syntax from this list of Built-In Commands/Functions. "name" is the name that appears within the menu for that item β plus any arguments the built-in_command needs. The Popup definition wraps up with the keyword EndPopup. You can make sub-menus by calling the Popup built-in inside another Popup declaration, as long as that sub-menu was defined earlier in the config file. π
Shortcut keys can be specified in the menu definition by putting an ampersand before a character. The ampersand is not displayed, but the character right after it is β over on the right side of the same entry. And if the user presses the corresponding key, that item gets activated as if it had been clicked. Only alphanumeric characters can be used as shortcut keys. The shift state of the keyboard is ignored when testing shortcut characters.
Heads up bestie: shortcut keys are not operative unlessMENU_HOTKEYSwas defined when building AfterStep. IfWINDOWLIST_HOTKETSwas also defined, then hot keys are automatically added to theWindowListwhen it's displayed.
When you're calling a previously defined menu, or a menu from a key-stroke combination, Popup is just used as a built-in command, with the "name" referring to the previously defined Popup definition's name.
Popups can be bound to keys through the use of the key modifier. You can operate popups without touching the mouse by binding them to keys and cruising with the up arrow, down arrow, and enter keys. Peep the feel.name files and the EXAMPLES section below for examples. β¨οΈπ
β¬οΈ PutOnBack
Moves the target window to the bottom of its layer β or down one layer, if it's already at the bottom. No escape. π
β¬οΈ PutOnTop
Moves the target window to the top of its layer β or up one layer, if it's already at the top. Main character energy, obviously. π
π QuickRestart look|feel|look+feel
Makes AfterStep reload the specified config. Quick lil glow-up, no full restart needed. β¨
πͺ Quit [ "name" ]
Exits afterstep β which generally means X exits too. Closing time, bestie. π
π Raise [ "name" ]
Lets the user raise a window. Up you go. π«Ά
π RaiseLower [ "name" ]
Alternates between raising and lowering a window β i.e. if it's raised, the window lowers, and vice versa. Flip-flop behavior, we love to see it. π¦
π Refresh [ "name" ]
Makes every window on the screen re-draw itself. Blink and glow up. β¨
π Resize [ "name" ]
Lets the user resize a window. Grab that corner. π
β»οΈ Restart "name" WindowManagerName
Restarts X(1) with the given WindowManagerName. If WindowManagerName is afterstep, then this forces afterstep to reread all its config files and reinitiate the whole session. If WindowManagerName is not in the default search path, then you should give the full path name. π
π RestartModuleByName
Restarts AfterStep modules that match the name you provide. Targeted reboot. π«
π RestartModuleList
Restarts every single AfterStep module. Yeah, all of them. π₯
π« SET_FLAGS
Do not use. Reserved for use by AfterStep modules to set communication flags β identifying which messages a module wishes to receive. π ββοΈ
π« SET_MASK
Do not use. Reserved for use by AfterStep modules. Full stop. π ββοΈ
π« SET_NAME
Do not use. Reserved for use by AfterStep modules to identify themselves to AfterStep. π ββοΈ
πΎ SaveWorkspace "name" file_name
Writes the list of currently running applications β with their position and desktop number β into the specified file. You can run this file later as a shell script to restore the state of your desktop. So cozy. π₯°
But ngl, this does not work for a lot of applications that don't provide the needed ICCCM properties on their windows. π
βοΈ Scroll horizontal vertical
Scrolls the desktop's view by horizontal pages in the x-direction and vertical pages in the y-direction. Either entry β or both β can be negative. Both the horizontal and vertical values are expressed in percent of pages, so 100 would be one full page. Normally, scrolling stops at the edge of the desktop. But if the horizontal and vertical values are multiplied by 1000, then scrolling will wrap around at the edge of the desktop. π
The scroll function should not be called from pop-up menus. β οΈ
π¨ Send_WindowList
This Function is used by modules to get the list of open windows. Very behind-the-scenes of it. π«Ά
β Set
FIXME: add proper description here.
Not the docs literally just saying FIXME π iconic behavior honestly.
ποΈ SetLayer layer
Moves the target window to layer layer. Stack it right. π
πͺ Shade [ "name" ]
Emulates the MacOS WindowShade feature. Once activated, the window becomes a titlebar and nothing else. Rolled-up realness. πΈ
π¨ SignalReloadGTKRCFile
Forces every GTK app to reload their gtkrc files. Refresh, bestie, refresh. β¨
π Size width height
Sets the size of the associated button, overriding every other size consideration. Because sometimes you just know what you want. π
The Wharf button size depends on several things, and the order of precedence is:
- Size definition
MaxSwallow'd window sizeWharfPixmapsize- Use
64x64.
This is a Wharf specific Function.
π£ SmallMiniPixmap pixmap
Specifies a pixmap to display to the left of the menu item that invokes this menu, or in the title of this menu. It's the one you use instead of MiniPixmap when you want the pixmap image scaled down to the smallest size. It gets sized based on the Menu font size plus eight pixels; the width is calculated to keep proportionality. Little and cute. π¦
See Also: MiniPixmap, LargeMiniPixmap, MenuMiniPixmaps.
π Stick [ "name" ]
Makes a window sticky β it stays on screen when desks/views are switched β if it isn't already sticky, or non-sticky if it is already sticky. Toggle the clinginess. π«Ά
π StopModuleList
Stops every AfterStep module. Nap time for the whole squad. π΄
π¦ Swallow " window-name " command
Causes Wharf to run command, capture the first window whose name or resource is window-name, and display it in the associated button. The application window will be shrunk to fit the size of the button. Nom nom. π
This is a Wharf specific Function.
π± SwallowModule " window-name " command
Like Swallow, except the command is an AfterStep module.
This is a Wharf specific Function.
πͺ SwallowWindow "pattern" shell_command
This one will cause an already-opened window to be swallowed β whereas plain Swallow will run the application, if there are no windows matching pattern. Sneaky but useful. β¨
πΈ TakeFrameShot "name" filename
Grabs a screenshot of the client window including frame decorations, and saves it in the specified files. Frame included, obviously, it's in the name. π
π₯οΈ TakeScreenShot "name" filename
Grabs a screenshot of the entire screen and saves it in the specified files. Whole desktop, one shot. π₯
πͺ TakeWindowShot "name" filename
Grabs a screenshot of the client window β frame decorations not included, we're cropping those off β and saves it in the files you specify. πΈ
Testβ β do not use this one. It's an internal function, it's not for you, no cap.Title"name" β drops in a title line of heading name into a popup or menu. cute little label moment π·οΈToggleLayerlayer1 layer2 β says: hey, if this window is chillin' in layer1, actually put it in layer2. Otherwise? It goes into layer1. Either way you slice it, the window gets placed on top of the other windows in whichever target layer it lands in. πTogglePage[ "name" ] β temporarily disablesEdgeScroll. And the way you get edge scrolling back? You call this again. It's a toggle, bestie, it goes both ways πTransientβ says this button is decorative, basically. It won't perform any action, it won't be pushable, and it won't have an associated balloon. It's justβ¦ there. π»UNLOCKβ β same deal asTest: do not use, internal function, not your business, move along.Waitapp_name β this one is only meant to be used inafterstepfunctions, okay? What it does is pause the execution of a function until a new window named app_name shows up. And here's the slay part:afterstepstays fully functional the whole time it's waiting. It's especially useful insideInitFunctionandRestartFunctionwhen you're trying to start windows on specific desktops. β³β¨WarpBack[ "name" window_name ] β does the exact same thing asChangeWindowDown, except it also uniconifies any iconified windows as it focuses on them. π΄β‘οΈπWarpFore[ "name" window_name ] β same energy asChangeWindowUp, but again: it uniconifies any iconified windows as it focuses on them. π΄β‘οΈπWindowList[ arg1 arg2 ] β brings up the internal popup menu where the titles of every open application get listed. Picking an item from that list switches the current desk over to the application's desk, and raises the app if it's hanging out behind other windows. And if the app is iconified at that moment? It gets de-iconified, normal style. πͺ
So, generally speaking: if arg1 is an even number, the windows get listed using the window name β that's the name that shows up in the title-bar. If arg1 is an odd number, then the window's icon name is what's used instead.
And specifically, here's the breakdown:
- if arg1 is
0,1or2β all windows on all desks get shown - if arg1 is
2or3β only the windows on the current desk get shown - if arg1 is
4or5β only the windows on the desk number you set with arg2 get shown
Heads up: any window that has WindowListSkip specified in its style will not show up in the window list. periodt. π
ββοΈ
WindowsDesknew_desk [10000] β moves the selected window over to the desktop you named as new_desk. And if that second argument is set to10000, then the first one gets treated as a relative desktop number instead. π’
<div align="center">πΈ that's a wrap on the function list, bestie πΈ</div>
This one ships out of the 3rd Berkeley Distribution, and it's documenting AfterStep v.2.2.12 β Functions(7x), the one and only. Now go forth and configure your heart out, you absolute main character π«Άπ
β¨
π¦ where this page comes from
- ubuntu resolute: afterstep-data 2.2.12-19 Β· GPL-2.0-or-later
- ubuntu stonking: afterstep-data 2.2.12-19 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms