[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11. Interacting With Unix

Command: run-shell-command cmd &optional collect-output-p

Run the specified shell command. If collect-output-p is T then run the command synchonously and collect the output. Be careful. If the shell command doesn’t return, it will hang StumpWM. In such a case, kill the shell command to resume StumpWM.

Function: programs-in-path &optional full-path (path (split-string (getenv PATH) :))

Return a list of programs in the path. If full-path is t then return the full path, otherwise just return the filename. path is by default the PATH evironment variable but can be specified. It should be a string containing each directory seperated by a colon.

@ programs-in-path

Function: pathname-is-executable-p pathname

Return T if the pathname describes an executable file.

@ pathname-is-executable-p

Function: pathname-as-directory pathspec

Converts the non-wild pathname designator PATHSPEC to directory form.

@ pathname-as-directory

Function: run-or-raise cmd props &optional (all-groups *run-or-raise-all-groups*) (all-screens *run-or-raise-all-screens*)

Run the shell command, cmd, unless an existing window matches props. props is a property list with the following keys:

:class

Match the window’s class.

:instance

Match the window’s instance or resource-name.

:role

Match the window’s WM_WINDOW_ROLE.

:title

Match the window’s title.

By default, the global *run-or-raise-all-groups* decides whether to search all groups or the current one for a running instance. all-groups overrides this default. Similarily for *run-or-raise-all-screens* and all-screens.

@ run-or-raise

Variable: *shell-program*

The shell program used by run-shell-command.

Function: getenv var

Return the value of the environment variable.

@ getenv

Function: (setf getenv) val var

Set the value of the environment variable, var to val.

@ (setf getenv)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on January 28, 2024 using texi2html 1.82.