.\" t .\" @(#)Functions.1 08/31/2018 .TH Functions 1x "AfterStep v.2.2.12" "Aug 31 2018" "AfterStep X11 window manager" .UC .SH NAME \fBFunctions\fP\ \- built in AfterStep functions .SH CONFIGURATION OPTIONS .IP "Background \fI""name"" filename\fP " 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\&. .IP "BackgroundForeign \fI""name"" filename\fP " 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\&. .IP "Beep" Make the window manager issue a beep \- pretty useful eh? :) .IP "BookmarkWindow \fI""name"" new_bookmark\fP " Places a bookmark on the selected window, to be used later on to get back to that window\&. .IP "Category"" \fIcategory\-name\fP """ 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 .IP "CategoryTree" FIXME: add proper description here\&. .IP "ChangeColorscheme \fI""name"" filename\fP " Change Color Scheme to specified file Copies color scheme configuration file specified by filename into user's non\-configurable directory\&. .IP "ChangeFeel \fI""name"" filename\fP " Change Feel to specified file Copies feel configuration file specified by filename into user's non\-configurable directory\&. .IP "ChangeLook \fI""name"" filename\fP " Change Look to specified file Copies Look configuration file specified by filename into user's non\-configurable directory, to be used by AfterStep\&. .IP "ChangeTheme \fI""name"" file_name\fP " Sets current theme config file\&. Such config file may include settings for look, feel, menu, autoexec and any module\&. .IP "ChangeThemeFile" Installs a theme from a provided \&.tar, \&.tar\&.gz, or \&.tar\&.bz2 AfterStep theme file\&. .IP "ChangeWindowDown [ \fI""name"" window_name\fP ]" Causes the pointer to move to the previous window in the list of windows for which \fICirculateSkip\fP has not not been specified\&. The mouse will jump (going backwards) to the first window whose name (or icon name or class) matches \fIwindow_name\fP \&. The \fI"name"\fP entry then becomes required, but serves no purpose if the function is not called from a menu or popup\&. .IP "ChangeWindowUp [ \fI""name"" window_name\fP ]" Causes the pointer to move to the previous window in the list of windows for which \fICirculateSkip\fP has not not been specified\&. The mouse will jump to the first window whose name (or icon name or class) matches \fIwindow_name\fP \&. The \fI"name"\fP entry then becomes required, but serves no purpose if the function is not called from a menu or popup\&. .IP "Close [ \fI""name""\fP ]" First sends the WM_DELETE message, if this is not understood, then the \fIXKillClient(3)\fP is sent to the window\&. .IP "CursorMove \fIhorizontal vertical\fP " Moves the mouse pointer by \fIhorizontal\fP views in the x\-direction, and \fIvertical\fP views in the y\-direction\&. Either or both entries may be negative\&. Both \fIhorizontal\fP and \fIvertical\fP 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\&. .IP "Delete [ \fI""name""\fP ]" Sends a WM_DELETE message to a window asking that it remove itself, frequently causing the application to exit\&. .IP "Desk \fIarg1\fP [ \fIarg2\fP ]" Changes current desk to another desk as surmised from the arguments supplied\&. If only \fIarg1\fP is specified and is non\-zero, then the current desk will become "desk + arg1" and \fIarg2\fP is ignored\&. If \fIarg1\fP is zero, then \fIarg2\fP must be specified or no desk change will occur; and \fIarg2\fP 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\&. .IP "DesktopEntry" FIXME: add proper description here\&. .IP "Destroy [ \fI""name""\fP ]" Sends the \fIXKillClient(3)\fP to a window\&. Guaranteed to get rid of the window\&. .IP "EndFunction" Terminates a Complex Function definition\&. .IP "EndPopup" Terminates a Popup definition\&. .IP "Exec \fI""name""\fP \fIcommand\fP [\-options]" Specifies a sub process to initiate\&. The \fI"name"\fP is required for ease of parsing\&. The \fIcommand\fP is the command or application to be invoked along with any desired\-options\&. .IP "ExecBrowser \fI""name"" URL\fP " Open URL in web browser\&. .IP "ExecEditor \fI""name"" filename\fP " Open file in text editor\&. .IP "ExecInTerm \fI""name""\fP \fIcommand\fP [\-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\&. .IP "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\&. .IP "Folder "" \fIfolder\-name\fP """ Defines a slide\-out folder inside the current folder\&. The following button definitions will be placed inside of the subfolder, until a \fI*Wharf ~Folder\fP line is encountered\&. See the \fIEXAMPLES\fP section below for an example\&. Folders may be nested\&. This is a Wharf specific Function\&. .IP "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\&. .IP "Function \fI""function_name""\fP " There are also two situations where this might occur as well; as a function definition stanza, or in calling a previously defined function decleration\&. .fi Function \fI"function_name"\fP built\-in_file \fB"action"\fP [ \fIargument\fP ] EndFunction .fi Specifies the definition of a complex function \fI"function_name"\fP , which can later be bound to a mouse button or key using \fI"function_name"\fP to recall this declaration\&. \fIbuilt\-in_command\fP specifies which command will be performed, taking its syntax from this list of Built\-In Commands/Functions\&. \fI"action"\fP specifies the action to take followed by any additional \fIarguments\fP needed by the \fIbuilt\-in_command\fP \&. Menus can be specified by using the \fIPopup\fP command, as long as the menu was defined earlier in the configuration file\&. The trigger \fIactions\fP 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, \fBafterstep\fP 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 \fBafterstep\fP 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 \fBafterstep\fP 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 \fIautoexec\fP 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 \fI"action"\fP from the same \fIfunction_name\fP \&. .fi Function \fIbuilt\-in_command\fP \fI"action"\fP \fIfunction_name\fP .fi Refer to the \fIfeel\&.name\fP files and below in EXAMPLES for examples\&. .IP "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\&. .IP "GoToBookmark \fI[""name"" window_bookmark ]\fP " Focuses window specified by previously placed window_bookmark\&. .IP "GotoDeskViewport \fIDesk+Vx+Vy\fP " Changes both current desk and viewport\&. .IP "GotoPage \fIx y\fP " Moves the desktop view to page \fIx y\fP \&. 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 \fIDeskTopSize\fP command detailed in the \fIPager(1)\fP 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 \fIDeskTopSize\fP command\&. The GotoPage function should not be used in a pop\-up menu\&. .IP "Iconify [ \fI""name""\fP ] [ \fIvalue\fP ]" Iconifies a window if it is not already iconified, or de\-iconifies it if it is already iconified\&. If the optional argument \fIvalue\fP 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\&. .IP "InstallBackground \fI""name"" filename\fP " Copies specified file to ~/\&.afterstep/backgrounds/ directory, so that it will show up in the menu, to be used for Root background\&. .IP "InstallColorscheme \fI""name"" filename\fP " Copies specified file to ~/\&.afterstep/colorschemes/ directory, so that it will show up in the menu, to be used as color scheme\&. .IP "InstallFeel \fI""name"" filename\fP " Copies specified file to ~/\&.afterstep/feels/ directory, so that it will show up in the menu\&. .IP "InstallFont \fI""name"" filename\fP " Copies specified TTF file to ~/\&.afterstep/desktop/fonts/ directory, so that it could be used in look configuration\&. .IP "InstallIcon \fI""name"" filename\fP " Copies specified image file to ~/\&.afterstep/desktop/icons/ directory, so that it could be used in look and database configuration\&. .IP "InstallLook \fI""name"" filename\fP " Copies specified look file to ~/\&.afterstep/looks/ directory, so that it could be selected from the menu\&. .IP "InstallThemeFile \fI""name"" filename\fP " Copies specified theme file to ~/\&.afterstep/themes/ directory, so that it could be selected from the menu\&. .IP "InstallTile \fI""name"" filename\fP " Copies specified image file to ~/\&.afterstep/desktop/tiles/ directory, so that it could be used in look and database configuration\&. .IP "KIPCsendMessageAll" Sends a signal to all KDE applications, refreshing their visual properties\&. .IP "KillAllModulesByName" Kills AfterStep modules with a provided matching name\&. .IP "KillModuleByName \fI""name"" modulename\fP " Kill module with specified name\&. .IP "LargeMiniPixmap \fIpixmap\fP " 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 when it is not desired to scale\-down a pixmap image\&. Pixmap images are full\-size\&. Opposite is SmallMiniPixmap\&. See Also: MiniPixmap, SmallMiniPixmap, MenuMiniPixmaps\&. .IP "Lower [ \fI""name""\fP ]" Allows the user to lower a window\&. .IP "MaxSwallow "" \fIwindow\-name\fP "" \fIcommand\fP " Like \fISwallow\fP , except the button will be resized to fit the application\&. This is a Wharf specific Function\&. .IP "MaxSwallowModule "" \fIwindow\-name\fP "" \fIcommand\fP " Like \fIMaxSwallow\fP , except the \fIcommand\fP is an AfterStep module\&. This is a Wharf specific Function\&. .IP "Maximize [ \fI""name""\fP ] [ \fIhorizontal vertical\fP ]" Causes the window to alternately switch from a full\-screen size to its normal size\&. Specifying the optional arguments of \fIhorizontal\fP and \fIvertical\fP , control can be attained as to the percentage of the full screen that the new size of the window becomes\&. If \fIhorizontal\fP > 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 \fIhorizontal\fP and \fIvertical\fP are 100s (ie, fullscreen)\&. .IP "MiniPixmap \fIpixmap\fP " Specifies a given pixmap to display to the left of the menu item which invokes this menu, or in the title of this menu\&. Default pixmap size is 24x24 pixels; this size can be adjusted in Look via MiniPixmapSize\&. See Also: MinipixmapSize, LargeMiniPixmap, SmallMiniPixmap, MenuMiniPixmaps\&. .IP "Module \fIModuleName\fP [ \fIarguments\fP ]" Specifies that \fIModuleName\fP should be spawned\&. Currently, many modules are included with \fBafterstep\fP \&. \fIWharf(1x)\fP and \fIPager(1x)\fP 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 \fBafterstep\fP prior to restarts and quits, if possible\&. .IP "Move [ \fI""name""\fP ]" Allows the user to move a window or iconified app\&. .IP "Nop """"" Inserts a horizontal line (
type html line) in a menu entry list\&. .IP "Nop ""name""" Inserts a \fIname\fP in the menu, stippled (disabled and grayed\-out)\&. .IP "PasteSelection" This function allows for substitute of X clipboard copy\-pasting if application is missing it\&. .IP "PinMenu \fI[""name""]\fP " Pins menu on desktop\&. .IP "PopUp \fI""popup_name""\fP " There are two situations where this might occur; as a popup menu stanza definition, or in calling a previously defined menu declaration\&. .fi Popup \fI"popup_name"\fP built\-in_command \fI"name"\fP [ \fIargument\fP ] EndPopup .fi Specifies the definition of a complex menu popup \fI"popup_name"\fP , which can be bound to a mouse button or key using \fI"popup_name"\fP to recall this declaration\&. \fIbuilt\-in_command\fP specifies which command will be performed, utilizing it's syntax from this list of Built\-In Commands/Functions\&. \fI"name"\fP specifies the name which will appear within the menu for the given item, and additionally any \fIarguments\fP needed by the \fIbuilt\-in_command\fP \&. 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 \fI"name"\fP 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 \fIfeel\&.name\fP files and below in EXAMPLES for examples\&. .IP "PutOnBack" Moves the target window to the bottom of its layer, or down one layer if it is already at the bottom\&. .IP "PutOnTop" Moves the target window to the top of its layer, or up one layer if it is already at the top\&. .IP "QuickRestart \fIlook|feel|look+feel\fP " Causes AfterStep to reload specified config\&. .IP "Quit [ \fI""name""\fP ]" Exits \fBafterstep\fP , generally causing X to exit too\&. .IP "Raise [ \fI""name""\fP ]" Allows the user to raise a window\&. .IP "RaiseLower [ \fI""name""\fP ]" Alternately raises and lowers a window; i\&.e\&. if it's raised, the window will lower, and vice versa\&. .IP "Refresh [ \fI""name""\fP ]" Causes all windows on the screen to re\-draw themselves\&. .IP "Resize [ \fI""name""\fP ]" Allows the user to resize a window\&. .IP "Restart \fI""name""\fP \fIWindowManagerName\fP " Restarts \fIX(1)\fP with the given \fIWindowManagerName\fP \&. If \fIWindowManagerName\fP is \fBafterstep\fP , then this forces \fBafterstep\fP to reread all of its configuration files and reinitiate the session\&. If \fIWindowManagerName\fP is not in the default search path, then the full path name should be given\&. .IP "RestartModuleByName" Restarts AfterStep modules with a provided matching name\&. .IP "RestartModuleList" Restarts all AfterStep modules\&. .IP "SET_FLAGS" Do not use\&. Reserved for use by AfterStep modules to set communication flags \- identifying which messages module wishes to receive\&. .IP "SET_MASK" Do not use\&. Reserved for use by AfterStep modules\&. .IP "SET_NAME" Do not use\&. Reserved for use by AfterStep modules to identify themselves to AfterStep\&. .IP "SaveWorkspace \fI""name"" file_name\fP " 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\&. .IP "Scroll \fIhorizontal vertical\fP " Scrolls the desktop's view by \fIhorizontal\fP pages in the x\-direction, and \fIvertical\fP pages in the y\-direction\&. Either or both entries may be negative\&. Both \fIhorizontal\fP and \fIvertical\fP 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 \fIhorizontal\fP and \fIvertical\fP 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\&. .IP "Send_WindowList" This Function is used by modules to obtain list of open windows\&. .IP "Set" FIXME: add proper description here\&. .IP "SetLayer \fIlayer\fP " Moves the target window to layer \fIlayer\fP \&. .IP "Shade [ \fI""name""\fP ]" Emulates the MacOS WindowShade feature\&. Once activated the window will become a titlebar only\&. .IP "SignalReloadGTKRCFile" Forces all GTK apps to reload the gtkrc files\&. .IP "Size \fIwidth\fP \fIheight\fP " Sets the size of the associated button, overriding any other size consideration\&. The \fBWharf\fP button size depends on several things\&. The order of precedence is: .fi 1) Size definition 2) MaxSwallow'd window size 3) \fIWharfPixmap\fP size 4) Use 64x64\&. .fi This is a Wharf specific Function\&. .IP "SmallMiniPixmap \fIpixmap\fP " 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; 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\&. .IP "Stick [ \fI""name""\fP ]" 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\&. .IP "StopModuleList" Stops all AfterStep modules\&. .IP "Swallow "" \fIwindow\-name\fP "" \fIcommand\fP " Causes \fBWharf\fP to run \fIcommand\fP , capture the first window whose name or resource is \fIwindow\-name\fP , 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\&. .IP "SwallowModule "" \fIwindow\-name\fP "" \fIcommand\fP " Like \fISwallow\fP , except the \fIcommand\fP is an AfterStep module\&. This is a Wharf specific Function\&. .IP "SwallowWindow \fI""pattern"" shell_command\fP " will cause already opened window to be swallowed, while just Swallow will run application, if there are no windows matching pattern .IP "TakeFrameShot \fI""name"" filename\fP " Grabs screenshot of the client window including frame decorations and save it in specifyed files\&. .IP "TakeScreenShot \fI""name"" filename\fP " Grabs screenshot of the entire screen and save it in specifyed files\&. .IP "TakeWindowShot \fI""name"" filename\fP " Grabs screenshot of the client window excluding frame decorations and save it in specifyed files\&. .IP "Test" Do not use\&. Internal function\&. .IP "Title \fI""name""\fP " Insert a title line of heading \fIname\fP into a popup or menu\&. .IP "ToggleLayer \fIlayer1\fP \fIlayer2\fP " Specifies that if the window is in \fIlayer1\fP , it should be placed in \fIlayer2\fP \&. Otherwise, it is placed in \fIlayer1\fP \&. In either case, the window will be placed on top of other windows in the target layer\&. .IP "TogglePage [ \fI""name""\fP ]" Temporarily disables \fIEdgeScroll\fP \&. Edge scrolling can be re\-enabled by calling this again\&. .IP "Transient" Specifies that this button will not perform any action, will not be pushable, and will not have an associated balloon\&. .IP "UNLOCK" Do not use\&. Internal function\&. .IP "Wait \fIapp_name\fP " This is intended to be used in \fBafterstep\fP functions only\&. It causes execution of a function to pause until a new window named \fIapp_name\fP appears\&. \fBafterstep\fP 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\&. .IP "WarpBack [ \fI""name"" window_name\fP ]" Same as \fIChangeWindowDown\fP , but uniconifies any iconified windows as it focuses on them\&. .IP "WarpFore [ \fI""name"" window_name\fP ]" Same as \fIChangeWindowUp\fP , but uniconifies any iconified windows as it focuses on them\&. .IP "WindowList [ \fIarg1 arg2\fP ]" 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 \fIarg1\fP is an even number, then the windows will be listed using the window name (the name that shows up in the title\-bar); if \fIarg1\fP is an odd number, then the window's icon name is used\&. Specifically, if \fIarg1\fP is 0, 1 or 2, then all windows on all desks will be shown\&. If \fIarg1\fP is 2 or 3, then only windows on the current desk will be shown\&. If \fIarg1\fP is 4 or 5, then only windows on the desk number specified with \fIarg2\fP , will be shown\&. Windows which have WindowListSkip specified in their style will not be listed in the window list\&. .IP "WindowsDesk \fInew_desk\fP [10000]" Moves the selected window to the desktop specified as \fInew_desk\fP \&. If second argument is set to 10000 then first is treated as relative desktop number\&.