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

12. Interacting With Unix

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

Default Values:

  collect-output-p  nil

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

Default Values:

  full-path  nil
  path       (stumpwm:split-string (stumpwm: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.

Function: pathname-is-executable-p pathname

Return T if the pathname describes an executable file.

Function: pathname-as-directory pathspec

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

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

Default Values:

  all-groups   stumpwm:*run-or-raise-all-groups*
  all-screens  stumpwm:*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.

Variable: *shell-program*

The shell program used by run-shell-command.

Function: getenv var

Return the value of the environment variable.

Function: (setf getenv) val var

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


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

This document was generated on February 2, 2024 using texi2html 1.82.