man

IceWM man pages

View 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 that are managed by icewm.

  2. Commands that 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 a dozen SELECT OPTIONS to select windows. They start with a ‘-‘ or a ‘+’. The ‘-‘ starts a new selection, while the ‘+’ 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 that 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 that 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 crosshair is shown to select the desired window interactively. The manager actions do not require window options.

The following 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 -N 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% top right raise

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 that has a WM_ROLE value of special or start it with runonce.

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

Collect all urxvt terminals from the fourth workspace in a single frame on the current workspace.

icesh -W 3 -c urxvt tabto myfunnyname

Use the loop construct conditionally to wait for a certain window to appear.

icesh -t if -n Tooltip then list else delay 0.05 loop end

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