man

IceWM man pages

View the Project on GitHub

NAME

icesh - control window properties and the IceWM window manager

SYNOPSIS

DESCRIPTION

icesh provides two types of commands:

  1. Commands to directly interact with icewm:

    These are listed in the section “MANAGER ACTIONS” below. They are easy to use, because they don’t require to select one or more windows. For example, icesh restart will restart icewm and icesh clients lists the applications which are managed by icewm.

  2. Commands which operate on a selection of windows:

    See the section WINDOW ACTIONS below. For example, icesh close is a request to close a window, but which window? Now icesh will turn the mouse pointer into a crosshair. Click on a window and a close request will be sent to that application.

    The power of icesh lies in its ability to programmatically select one or more windows and operate on that selection. This can be used in scripts and in icewm-keys(5) to define your own window management hotkeys. For example, to immediately close all xterm windows do icesh -c xterm close.

    There are about ten SELECT OPTIONS to select windows. They start with a minus sign ‘-‘ or with a plus sign ‘+’. The first starts a new selection. The second adds more windows to an existing selection.

    This selection of windows can be reduced by FILTER OPTIONS. These remove unwanted windows from the current selection. Multiple filter options can be given. For example, icesh -c xterm -W this close will close only those xterms which are shown on the current workspace. The xterms on other workspaces are filtered out by the -W this filter option.

There is no limit to the number of commands, selections, filters and actions which you can give to a single icesh command. They are processed and evaluated one by one from left to right. This makes icesh a small declarative programming language. Have a look at some examples near the end of this document.

OPTIONS

icesh recognizes the following options:

SELECT OPTIONS

Select options specify the window or windows to which subsequent actions apply. If none is given, but an action does require a window, then a selection crossbar is invoked to select the desired window interactively. The manager actions do not require window options.

The following five options select one or more client windows. If needed, they can be repeated for successive actions.

FILTER OPTIONS

The following options filter the currently selected set of windows. If no previous select option was given then a -all option is implicitly assumed to filter all client windows.

GENERAL OPTIONS

The following options are identical for every IceWM command.

ACTIONS

icesh expects one or more action arguments. There are two kinds of actions: window actions and manager actions. The first operates on the selected windows. The second directly interacts with the icewm window manager.

WINDOW ACTIONS

The following actions affect the selected window or windows.

MANAGER ACTIONS

The following actions control the IceWM window manager and therefore do not require a window select or filter option:

CONDITIONALS

Icesh supports if-then-else expressions. The full syntax is:

if selection
then
    actions
elif selection
then
    actions
else
    actions
end

Where selection is a sequence of selection and filtering options, which evaluates to true when it is non-empty. That is, if one or more windows fulfilled the condition. If it is empty, then its actions clause is ignored and the subsequent elif or else clause is tried or taken. Each clause is optional.

Whenever a selection condition evaluates to false, the window selection that existed before the if clause is immediately restored. This also happens after an end clause.

EXPRESSIONS

Some of the window actions require one or two EXPRESSION arguments.

Each SYMBOL may be from one of the following applicable domains:

EXAMPLES

List all workspace names:

icesh listWorkspaces

Example output:

workspace #0: `main'
workspace #1: `web'
workspace #2: `doc'
workspace #3: `dev'

Close terminal work and activate terminal fun.

icesh -c work.XTerm close -a -c fun.XTerm activate

Print opacity for all xterms.

icesh -c XTerm opacity

Change opacity for all xterms.

icesh -c XTerm opacity 84

Move all windows on workspace “Top” to the current workspace.

icesh -W "Top" setWorkspace "this"

Restore all hidden clients, minimize all clients on the current workspace and activate Firefox.

icesh -S hidden restore -a -W "this" minimize -a -c Firefox activate

Resize the focused window to occupy the right half of the desktop area.

icesh -f sizeto 49% 100% sync top sync right sync raise activate

Toggle the frame border of the focused window.

if icesh -f motif | grep -q 'decor:$'; then \
    icesh -f motif decor All; else icesh -f motif decor ""; fi

Here is a different solution using conditionals.

icesh -f if -P _NET_FRAME_EXTENTS=0 then bordered else borderless

Here is a conditional to either toggle the visibility of a roxterm, which has a WM_ROLE value of special, or start it with runonce.

icesh sync if -c roxterm.Roxterm -R special then \
    if -v then hide \
    elif -u then setWorkspace this sync activate end \
    else runonce roxterm --role=special

ENVIRONMENT

EXIT STATUS

COMPLIANCE

icesh is largely compliant with the EWMH and ICCCM specifications. Some commands, like manager actions, are specific to IceWM.

SEE ALSO

icewm(1), wmctrl(1), xdotool(1), xprop(1), xwininfo(1), XParseGeometry(3).

BUGS

Please report bugs at Github.

AUTHOR

Brian Bidulock.

See –copying for full copyright notice and copying permissions.

LICENSE

IceWM is licensed under the GNU Library General Public License. See the COPYING file in the distribution or use the –copying flag to display copying permissions.

Index IceWM