Functions(1x)

πŸ“¦
version 2.2.12 Β· 3 versions
, in ubuntu jammy

Functions(1x) πŸ’–

okay so bestie, this is the AfterStep X11 window manager built-in functions page β€” it's giving config-file energy and you're gonna slay it. It's Functions(1x), part 1 of 3, no cap.

NAME

Functions β€” built in AfterStep functions. periodt.


CONFIGURATION OPTIONS

  • Background "name" filename β€” Change Background image to specified file.

Copies image file specified by filename into user's non-configurable directory. Depending on Background configuration in look file, this may not have any effect.

  • BackgroundForeign "name" filename β€” Change Background image to specified file.

Works same as Background but generates minipixmap from the image automagically. Also tries to determine if background should be fullscreen and crops/scales it to the proper size.

  • Beep β€” Make the window manager issue a beep - pretty useful eh? :)
  • BookmarkWindow "name" new_bookmark β€” Places a bookmark on the selected window, to be used later on to get back to that window.
  • Category" category-name " β€” Generate a menu from all the members belonging to specified desktop category. For example Category "Modules", generate a menu of all AfterStep modules in afterstep/applications/modules.desktop.
  • CategoryTree β€” FIXME: add proper description here.
  • ChangeColorscheme "name" filename β€” Change Color Scheme to specified file.

Copies color scheme configuration file specified by filename into user's non-configurable directory.

  • ChangeFeel "name" filename β€” Change Feel to specified file.

Copies feel configuration file specified by filename into user's non-configurable directory.

  • ChangeLook "name" filename β€” Change Look to specified file.

Copies Look configuration file specified by filename into user's non-configurable directory, to be used by AfterStep.

  • ChangeTheme "name" file_name β€” Sets current theme config file. Such 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.bz2 AfterStep theme file.
  • ChangeWindowDown [ "name" window_name ] β€” Causes the pointer to move to the previous window in the list of windows for which CirculateSkip has not 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 ] β€” Causes the pointer to move to the previous window in the list of windows for which CirculateSkip has not 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" ] β€” First sends the WM_DELETE message, if this is not understood, then the XKillClient(3) is sent to the window.
  • CursorMove horizontal vertical β€” 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.
bestie, warning: The CursorMove function should not be called from pop-up menus.
  • Delete [ "name" ] β€” Sends a WM_DELETE message to a window asking that it remove itself, frequently causing the application to exit.
  • Desk arg1 [ arg2 ] β€” 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.
  • Destroy [ "name" ] β€” Sends the XKillClient(3) to a window. Guaranteed to get rid of the window.
  • EndFunction β€” Terminates a Complex Function definition.
  • EndPopup β€” Terminates a Popup definition.
  • Exec "name" command [-options] β€” 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 β€” Open URL in web browser.
  • ExecEditor "name" filename β€” Open file in text editor.
  • ExecInTerm "name" command [-options] β€” 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 β€” 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 β€” Toggle window Fullscreen state. Will disregard any AvoidCover windows and will try to make window as big as the screen unless it's hints set certain limitation on size. Window in Fullscreen mode cannot be Maximized.
  • Function "function_name" β€” There are also two situations where this might occur as well; as a function definition stanza, or in calling a previously defined function decleration.
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 β€” Runs 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 ] β€” Focuses window specified by previously placed window_bookmark.
  • GotoDeskViewport Desk+Vx+Vy β€” Changes both current desk and viewport.
  • GotoPage x y β€” 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 ] β€” 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 specified file to ~/.afterstep/backgrounds/ directory, so that it will show up in the menu, to be used for Root background.
  • InstallColorscheme "name" filename β€” Copies specified file to ~/.afterstep/colorschemes/ directory, so that it will show up in the menu, to be used as color scheme.
  • InstallFeel "name" filename β€” Copies specified file to ~/.afterstep/feels/ directory, so that it will show up in the menu.
  • InstallFont "name" filename β€” Copies specified TTF file to ~/.afterstep/desktop/fonts/ directory, so that it could be used in look configuration.
  • InstallIcon "name" filename β€” Copies specified image file to ~/.afterstep/desktop/icons/ directory, so that it could be used in look and database configuration.
  • InstallLook "name" filename β€” Copies specified look file to ~/.afterstep/looks/ directory, so that it could be selected from the menu.

InstallThemeFile "name" filename

Copies the theme file you point at into ~/.afterstep/themes/, so that it can actually be picked from the menu. That's the whole job, bestie ✨

InstallTile "name" filename

Same energy, different folder β€” copies your image file into ~/.afterstep/desktop/tiles/, so that it can be used in look and database configuration. πŸŽ€

KIPCsendMessageAll

Sends a signal to all KDE applications, refreshing their visual properties. Slay. πŸ”₯

KillAllModulesByName

Kills AfterStep modules with a provided matching name. πŸ’€

KillModuleByName "name" modulename

Kills the module with the specified name. Bye bestie 🫢

LargeMiniPixmap pixmap

Specifies a given pixmap to display to the left of the menu item which invokes this menu, or in the title of this menu. Use this in menu entries instead of MiniPixmap when you do not want a pixmap image scaled down β€” these are full-size. The opposite vibe is SmallMiniPixmap.

See Also: MiniPixmap, SmallMiniPixmap, MenuMiniPixmaps.

Lower [ "name" ]

Lets you lower a window. πŸ‘‘

MaxSwallow " window-name " command

Like Swallow, except the button gets resized to fit the application. Iconic.

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 alternately switch from a full-screen size to its normal size. If you pass the optional horizontal and vertical arguments, you get control over what percentage of the full screen the new size of the window becomes. If horizontal > 0, then the horizontal dimension of the window is set to horizontal*screen_width/100. Vertical resizing works the same way. Values larger than 100 can be used with caution. The defaults for horizontal and vertical are 100s (ie, fullscreen).

MiniPixmap pixmap

Specifies a given pixmap to display to the left of the menu item which invokes this menu, or in the title of this menu. The default pixmap size is 24x24 pixels, and that size can be adjusted in Look via MiniPixmapSize.

See Also: MinipixmapSize, LargeMiniPixmap, SmallMiniPixmap, MenuMiniPixmaps.

Module ModuleName [ arguments ]

Says that ModuleName should be spawned.

Currently, many modules are included with afterstep. Wharf(1x) and Pager(1x) are two of the more 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, can be intended to remain for the duration of the X session. Modules will be terminated by afterstep prior to restarts and quits, if possible.

Move [ "name" ]

Lets you move a window or an iconified app. πŸ¦‹

Nop ""

Inserts a horizontal line (an <HR> type html line) in a menu entry list.

Nop "name"

Inserts a name in the menu, stippled β€” that means disabled and grayed-out. πŸ™ˆ

PasteSelection

This function allows for a substitute of X clipboard copy-pasting if the application is missing it.

PinMenu ["name"]

Pins the menu on the desktop.

There are two situations where this might occur: as a popup menu stanza definition, or in calling a previously defined menu declaration.

Popup  "popup_name"     built-in_command   "name"  [ argument ]
EndPopup

Specifies the definition of a complex menu popup "popup_name", which can be bound to a mouse button or key using "popup_name" to recall this declaration. built-in_command specifies which command will be performed, utilizing its syntax from this list of Built-In Commands/Functions. "name" specifies the name which will appear within the menu for the given item, and additionally any arguments needed by the built-in_command. The Popup definition ends with the keyword EndPopup. Sub-menus can be created by calling the Popup built-in within another Popup declaration, as long as that sub-menu was defined earlier in the configuration file.

Shortcut keys may be specified in the menu definition by preceding a character with an ampersand. The ampersand will not be displayed, but the character after it will be displayed at the right side of the same entry, and if the user presses the corresponding key, then that item will be activated as if it had been clicked upon. Only alphanumeric characters may be used as shortcut keys. The shift state of the keyboard is ignored when testing shortcut characters. Shortcut keys are not operative unless MENU_HOTKEYS was defined when building AfterStep. If WINDOWLIST_HOTKETS was also defined, then hot keys are automatically added to the WindowList when it is displayed. (yes, that's spelled HOTKETS up there, we're quoting the page exactly bestie πŸ’€) When calling a previously defined menu or a menu from a key-stroke combination, Popup is simply 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. Popups can be operated without using the mouse by binding to keys, and operating via the up arrow, down arrow, and enter keys. Refer to the feel.name files and below in EXAMPLES for examples. 🌈

PutOnBack

Moves the target window to the bottom of its layer, or down one layer if it is already at the bottom.

PutOnTop

Moves the target window to the top of its layer, or up one layer if it is already at the top.

QuickRestart look|feel|look+feel

Causes AfterStep to reload the config you picked.

Quit [ "name" ]

Exits afterstep, generally causing X to exit too. 😭

Raise [ "name" ]

Lets you raise a window.

RaiseLower [ "name" ]

Alternately raises and lowers a window; i.e. if it's raised, the window will lower, and vice versa.

Refresh [ "name" ]

Causes all windows on the screen to re-draw themselves. ✨

Resize [ "name" ]

Lets you resize a window.

Restart "name" WindowManagerName

Restarts X(1) with the given WindowManagerName. If WindowManagerName is afterstep, then this forces afterstep to reread all of its configuration files and reinitiate the session. If WindowManagerName is not in the default search path, then the full path name should be given.

RestartModuleByName

Restarts AfterStep modules with a provided matching name.

RestartModuleList

Restarts all AfterStep modules.

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.

SET_NAME

🚫 Do not use. Reserved for use by AfterStep modules to identify themselves to AfterStep.

SaveWorkspace "name" file_name

Writes the list of presently running applications, with their position and desktop number, into the specified file. You can run this file at a later time as a shell script to restore the state of the desktop. Note that this does not work for many applications that do not 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 or both entries may be negative. Both 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. 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 obtain the list of open windows.

Set

FIXME: add proper description here.

(not me, that is literally what the page says πŸ’€)

SetLayer layer

Moves the target window to layer layer.

Shade [ "name" ]

Emulates the MacOS WindowShade feature. Once activated, the window will become a titlebar only. πŸ’…

SignalReloadGTKRCFile

Forces all GTK apps to reload the gtkrc files.

Size width height

Sets the size of the associated button, overriding any other size consideration.

The Wharf button size depends on several things, and the order of precedence is:

  1. Size definition
  2. MaxSwallow'd window size
  3. WharfPixmap size
  4. Use 64x64.
This is a Wharf specific Function.

SmallMiniPixmap pixmap

Specifies a given pixmap to display to the left of the menu item which invokes this menu, or in the title of this menu. Used in menu entries instead of MiniPixmap; it scales-down pixmap images to the smallest size. It is sized based on the Menu font size plus eight pixels; width is calculated to keep proportionality.

See Also: MiniPixmap, LargeMiniPixmap, MenuMiniPixmaps.

Stick [ "name" ]

Makes a window sticky (stays on screen when desks/views are switched) if it is not already sticky, or non-sticky if it is already sticky.

StopModuleList

Stops all AfterStep modules.

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.

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

Will cause an already opened window to be swallowed, while just Swallow will run the application, if there are no windows matching pattern.

TakeFrameShot "name" filename

Grabs a screenshot of the client window including the frame decorations and saves it in the specified file. πŸ“Έ

TakeScreenShot "name" filename

Grabs a screenshot of the entire screen and saves it in the specified file. πŸ–ΌοΈ

TakeWindowShot "name" filename

okay bestie we're picking up right where we left off, no re-intros, let's GO πŸ’…

Grabs a screenshot of the client window β€” frame decorations NOT included, she's cropping those out β€” and saves it in the specified files. ✨


  • Test β€” do not use. Internal function. That's it. That's the whole thing. πŸ™ˆ
  • Title "name" β€” drops a title line of the heading name into a popup or a menu. πŸŽ€
  • ToggleLayer layer1 layer2 β€” says: if the window is chillin' in layer1, move it to layer2. Otherwise? It goes to layer1. Either way bestie, the window ends up on top of the other windows in whichever layer it lands in. πŸ‘‘
  • TogglePage [ "name" ] β€” temporarily disables EdgeScroll. Wanna bring edge scrolling back? Just call this again and she's re-enabled. πŸ¦‹
  • Transient β€” this button is not like the other buttons: no action, not pushable, and no balloon attached. It's giving decorative. πŸ’€
  • UNLOCK β€” do not use. Internal function. πŸ™ˆ
  • Wait app_name β€” this one is meant to be used in afterstep functions only, iykyk. It pauses the execution of a function until a new window named app_name shows up. And the cute part? afterstep stays fully functional the entire time it's waiting. Super useful in InitFunction and RestartFunction when you're trying to start windows on specific desktops. 🌸
  • WarpBack [ "name" window_name ] β€” same energy as ChangeWindowDown, except it also uniconifies any iconified windows while it focuses on them. 🫢
  • WarpFore [ "name" window_name ] β€” same energy as ChangeWindowUp, except it also uniconifies any iconified windows while it focuses on them. 🫢
  • WindowList [ arg1 arg2 ] β€” pops up the internal menu that shows the titles of every open application. Pick something from the list and the current desk switches to that app's desk, and if it's buried behind other windows it gets raised. If the app is currently iconified, she gets de-iconified, normally, as one does. ✨

So the tea on arg1: generally, if arg1 is an even number, the windows are listed by window name (the name that shows up in the title-bar). If arg1 is an odd number, then it's the window's icon name that gets used. πŸŽ€

And specifically: if arg1 is 0, 1 or 2, then all windows on all desks get shown. If arg1 is 2 or 3, then only windows on the current desk show up. If arg1 is 4 or 5, then only windows on the desk number you specified with arg2 show up. 🌈

Heads up bestie: windows that have WindowListSkip set in their style will not appear in the window list. No cap. πŸ’€
  • WindowsDesk new_desk [10000] β€” moves the selected window to the desktop you named in new_desk. And if the second argument is set to 10000, then the first argument gets treated as a relative desktop number. πŸ”₯

and that's a wrap on Functions(1x), bestie!! 🌟 this iconic lil page comes to you from the 3rd Berkeley Distribution, AfterStep v.2.2.12, and she's serving Functions(1x) realness. mwah, go configure something gorgeous πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from