man Functions () - built in AfterStep functions
NAME
Functions - built in AfterStep functions
CONFIGURATION OPTIONS
- Nop
Inserts a horizontal line (<HR> type html line) in a menu entry list.
- Nop
Inserts a name in the menu, stippled (disabled and grayed-out).
- Title
Insert a title line of heading name into a popup or menu.
- Beep
Make the window manager issue a beep - pretty useful eh? :)
- Quit [
Exits afterstep , generally causing X to exit too.
- Restart
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.
- Refresh [
Causes all windows on the screen to re-draw themselves.
- 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.
- 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.
- TogglePage [
Temporarily disables EdgeScroll . Edge scrolling can be re-enabled by calling this again.
- 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.
The CursorMove function should not be called from pop-up menus.
- WarpFore [
Same as ChangeWindowUp , but uniconifies any iconified windows as it focuses on them.
- WarpBack [
Same as ChangeWindowDown , but uniconifies any iconified windows as it focuses on them.
- Wait app_name
This is intended to be used in afterstep functions only. It causes execution of a function to pause until a new window named app_name appears. afterstep remains fully functional during a wait. This is particularly useful in the InitFunction and RestartFunction, if you are trying to start windows on specific desktops.
- 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.
- GotoDeskViewport Desk+Vx+Vy
Changes both current desk and viewport.
- WindowList [ arg1 arg2 ]
Specifies the internal popup menu in which the titles of each open application are displayed, should be popped up. Selecting an item from the list will cause the current desk to switch to the application's desk, and will raise it if it's behind other windows. If the application is currently iconified, then it will be de-iconified normally.
Generally, if arg1 is an even number, then the windows will be listed using the window name (the name that shows up in the title-bar); if arg1 is an odd number, then the window's icon name is used.
Specifically, if arg1 is 0, 1 or 2, then all windows on all desks will be shown. If arg1 is 2 or 3, then only windows on the current desk will be shown. If arg1 is 4 or 5, then only windows on the desk number specified with arg2 , will be shown. Windows which have WindowListSkip specified in their style will not be listed in the window list.
- PopUp
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
Specfies 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 it's 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. 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 definitions 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.
- Function
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.
- MiniPixmap pixmap
Specifies a pixmap to display to the left of the menu item which invokes this menu, and in the title of this menu.
- Exec
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.
- Module ModuleName [ arguments ]
Specifies that ModuleName should be spawned.
Currently, many modules are included with afterstep . Wharf(1) and Pager(1) 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.
- ExecInTerm
Specifies a sub process to initiate. It is similar to Exec , though targeted at programms that need a terminal to run. The following terminal emulators are tried in order: aterm, rxvt, eterm, xterm.
- KillModuleByName
Kill module with specified name.
- QuickRestart look|feel|look+feel
Causes AfterStep to reload specified config.
- Background
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.
- ChangeLook
Change Look to specified file
Copies Look configuration file specified by filename into user's non-configurable directory, to be used by AfterStep.
- ChangeFeel
Change Feel to specified file
Copies feel configuration file specified by filename into user's non-configurable directory.
- ChangeTheme
Sets current theme config file. Such config file may include settings for look, feel, menu, autoexec and any module.
- ChangeThemeFile
FIXME: add proper description here.
- ChangeColorscheme
Change Color Scheme to specified file
Copies color scheme configuration file specified by filename into user's non-configurable directory.
- InstallLook
Copies specified look file to ~/.afterstep/looks/ directory, so that it could be selected from the menu.
- InstallFeel
Copies specified file to ~/.afterstep/feels/ directory, so that it will show up in the menu.
- InstallBackground
Copies specified file to ~/.afterstep/backgrounds/ directory, so that it will show up in the menu, to be used for Root background.
- InstallFont
Copies specified TTF file to ~/.afterstep/desktop/fonts/ directory, so that it could be used in look configuration.
- InstallIcon
Copies specified image file to ~/.afterstep/desktop/icons/ directory, so that it could be used in look and database configuration.
- InstallTile
Copies specified image file to ~/.afterstep/desktop/tiles/ directory, so that it could be used in look and database configuration.
- InstallThemeFile
Copies specified theme file to ~/.afterstep/themes/ directory, so that it could be selected from the menu.
- InstallColorscheme
Copies specified file to ~/.afterstep/colorschemes/ directory, so that it will show up in the menu, to be used as color scheme.
- SaveWorkspace
Write list of presently running applications with its position and desktop number into specified file. You can run this file at a later time as a shell script to restore state of the desktop. Note this does not work for many applications that does not provide needed ICCCM properties on its windows.
- EndFunction
Terminates a Complex Function definition.
- EndPopup
Terminates a Popup definition.
- TakeScreenShot
Grabs screenshot of the entire screen and save it in specifyed files.
- Test
FIXME: add proper description here.
- Move [
Allows the user to move a window or iconified app.
- Resize [
Allows the user to resize a window.
- Raise [
Allows the user to raise a window.
- Lower [
Allows the user to lower a window.
- RaiseLower [
Alternately raises and lowers a window; i.e. if it's raised, the window will lower, and vice versa.
- PutOnTop
Moves the target window to the top of its layer, or up one layer if it is already at the top.
- PutOnBack
Moves the target window to the bottom of its layer, or down one layer if it is already at the bottom.
- SetLayer layer
Moves the target window to layer layer .
- ToggleLayer layer1 layer2
Specifies that if the window is in layer1 , it should be placed in layer2 . Otherwise, it is placed in layer1 . In either case, the window will be placed on top of other windows in the target layer.
- Shade [
Emulates the MacOS WindowShade feature. Once activated the window will become a titlebar only.
- Delete [
Sends a WM_DELETE message to a window asking that it remove itself, frequently causing the application to exit.
- Destroy [
Sends the XKillClient(3) to a window. Guaranteed to get rid of the window.
- Close [
First sends the WM_DELETE message, if this is not understood, then the XKillClient(3) is sent to the window.
- Iconify [
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.
- Maximize [
Causes the window to alternately switch from a full-screen size to its normal size. Specifying the optional arguments of horizontal and vertical , control can be attained as to the percentage of the full screen that the new size of the window becomes. If horizontal > 0, then the horizontal dimension of the window will be set to horizontal*screen_width/100. The vertical resizing is similar. Values larger than 100 can be used with caution. The defaults for horizontal and vertical are 100s (ie, fullscreen).
- Stick [
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.
- 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.
- ChangeWindowUp [
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.
- ChangeWindowDown [
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.
- GoToBookmark [
Focuses window specified by previously placed window_bookmark.
- 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.
- PasteSelection
This function allows for substitute of X clipboard copy-pasting if application is missing it.
- WindowsDesk new_desk [10000]
Moves the selected window to the desktop specified as new_desk . If second argument is set to 10000 then first is treated as relative desktop number.
- BookmarkWindow
Places a bookmark on the selected window, to be used later on to get back to that window.
- PinMenu [
Pins menu on desktop.
- TakeWindowShot
Grabs screenshot of the client window excluding frame decorations and save it in specifyed files.
- TakeFrameShot
Grabs screenshot of the client window including frame decorations and save it in specifyed files.
- SwallowWindow
will cause already opened window to be swallowed, while just Swallow will run application, if there are no windows matching pattern
- Send_WindowList
This Function is used by modules to obtain list of open windows.
- SET_MASK
FIXME: add proper description here.
- SET_NAME
Used by modules to identify self to AfterStep.
- UNLOCK
FIXME: add proper description here.
- SET_FLAGS
Used by modules to set communication flags - identifying which messages module wishes to receive.
- Folder
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.
- Swallow
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.
- MaxSwallow
Like Swallow , except the button will be resized to fit the application.
This is a Wharf specific Function.
- SwallowModule
Like Swallow , except the command is an AfterStep module.
This is a Wharf specific Function.
- MaxSwallowModule
Like MaxSwallow , except the command is an AfterStep module.
This is a Wharf specific Function.
- Size width height
Sets the size of the associated button, overriding any other size consideration.
The Wharf button size depends on several things. 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.
- Transient
Specifies that this button will not perform any action, will not be pushable, and will not have an associated balloon.