1ICESH(1) User Commands ICESH(1)
2
3
4
6 icesh - control window properties and the IceWM window manager
7
9 icesh OPTIONS|ACTIONS+
10
12 icesh provides commands to directly interact with the icewm(1) window
13 manager. There are two types of commands:
14
15 1. Commands to directly interact with icewm:
16 These are listed in the section "MANAGER ACTIONS" below. They are
17 easy to use, because they don't require to select one or more
18 windows. For example, "icesh restart" will restart icewm and "icesh
19 clients" lists the applications which are managed by icewm.
20
21 2. Commands which operate on a selection of windows:
22 See the section "WINDOW ACTIONS" below. For example, "icesh close"
23 is a request to close a window, but which window? Now icesh will
24 turn the mouse pointer into a crosshair. Click on a window and a
25 close request will be sent to that application.
26
27 The power of icesh lies in its ability to programmatically select
28 one or more windows and operate on that selection. This can be
29 used in scripts and in icewm-keys(5) to define your own window
30 management hotkeys. For example, to immediately close all xterm
31 windows do "icesh -c xterm close".
32
33 There are about seven "SELECT OPTIONS" to select windows. They
34 start with a minus sign '-' or with a plus sign '+'. The first
35 starts a new selection. The second adds more windows to an existing
36 selection.
37
38 This selection of windows can be reduced by "FILTER OPTIONS".
39 These remove unwanted windows from the current selection. Multiple
40 filter options can be given. For example, "icesh -c xterm -W this
41 close" will close only those xterms which are shown on the current
42 workspace. The xterms on other workspaces are filtered out by the
43 "-W this" filter option.
44
45 There is no limit to the number of commands, selections, filters and
46 actions which you can give to a single icesh command. They are
47 processed and evaluated one by one from left to right. This makes
48 icesh a small declarative programming language. Have a look at some
49 examples near the end of this document.
50
52 icesh recognizes the following options:
53
54 SELECT OPTIONS
55 Select options specify the window or windows to which subsequent
56 actions apply. If none is given, but an action does require a window,
57 then a selection crossbar is invoked to select the desired window
58 interactively. The manager actions do not require window options.
59
60 The following five options select one or more client windows. If
61 needed, they can be repeated for successive actions.
62
63 -w, -window, +w, +window WINDOW_ID
64 Specifies the identifier of the window, WINDOW_ID, for which the
65 action applies. Special identifiers are root for the root window
66 and focus for the currently focused window. The option with minus
67 sign replaces the existing selection. With a plus sign the window
68 is added to an existing selection.
69
70 -r, -root, +r, +root
71 Is equivalent to -window root and selects the root window. The
72 option with minus sign replaces the existing selection with the
73 root window. With a plus sign the root window is added to an
74 existing selection.
75
76 -f, -focus, +f, +focus
77 Is equivalent to -window focus and selects the focused window. The
78 option with minus sign replaces the existing selection with the
79 focused window. With a plus sign the focused window is added to an
80 existing selection.
81
82 -a, -all
83 Selects all client windows of the window manager.
84
85 -s, -shown
86 Selects all clients which are on the current workspace.
87
88 -t, -top
89 Selects all toplevel windows from the display unconditionally.
90 This includes windows which have never been mapped and windows with
91 the override redirect bit set to evade management.
92
93 -x, -xembed
94 Selects all windows which are embedded using the XEMBED protocol.
95
96 FILTER OPTIONS
97 The following options filter the currently selected set of windows. If
98 no previous select option was given then a -all option is implicitly
99 assumed to filter all client windows.
100
101 -c, -class WM_CLASS
102 Filters the set of windows on window manager class, WM_CLASS. If
103 WM_CLASS contains a period, only windows with exactly the same
104 WM_CLASS property are matched. If there is no period, windows of
105 the same class and windows of the same instance (aka. -name) are
106 selected.
107
108 -l, -last
109 Filter clients and keep only the most recent client.
110
111 -m, -machine HOST
112 Filters clients by host name. Clients with a WM_CLIENT_MACHINE
113 property equal to HOST are selected.
114
115 -n, -name NAME
116 Filters clients by _NET_WM_NAME or WM_NAME. NAME matches any part
117 of the property value. To match at the beginning use a "^" prefix.
118 To match at the end use a "$" suffix.
119
120 -p, -pid PID
121 Filters clients by process ID. Clients with a _NET_WM_PID property
122 equal to PID are selected.
123
124 -G, -Gravity GRAVITY
125 Filters clients by the window gravity field of the WM_NORMAL_HINTS
126 property. Clients with a gravity equal to GRAVITY are selected.
127 If GRAVITY starts with an exclamation mark then the filtering is
128 inverted.
129
130 -L, -Layer LAYER
131 Filters clients by GNOME window layer, which can either be a layer
132 name or a layer number. See EXPRESSIONS below. If LAYER starts with
133 an exclamation mark then the filtering is inverted.
134
135 -N, -Netstate STATE
136 Filters clients by EWMH window state. Clients which have at least
137 an EWMH window state of STATE are selected. This state refers to
138 details like minized or maximized. See EXPRESSIONS below. If STATE
139 starts with an exclamation mark then the filtering is inverted. A
140 question mark "?" filters clients with any bit set in STATE.
141
142 -P, -Property PROP[=value]
143 Filters clients by property. Clients which have a property PROP are
144 selected. If the optional value is given, the match succeeds only
145 if PROP is a string, window, cardinal, or atom, with a value equal
146 to value. The filtering is inverted if PROP starts with an
147 exclamation mark.
148
149 -R, -Role ROLE
150 Filters clients by WM_WINDOW_ROLE. Clients which have a
151 WM_WINDOW_ROLE property value equal to ROLE are selected. The
152 filtering is inverted if ROLE starts with an exclamation mark.
153
154 -W, -Workspace WORKSPACE
155 Filter clients by workspace. Workspace WORKSPACE is either a
156 workspace name, or a workspace number counting from zero, or the
157 word "this" for the current workspace, or the word "All" for all
158 workspaces. If WORKSPACE starts with an exclamation mark then the
159 filtering is inverted.
160
161 -X, -Xinerama MONITOR
162 Limit clients by RandR/Xinerama monitor. Only operate on clients
163 which are displayed on MONITOR, where MONITOR can be "All" for all
164 monitors, "this" for the monitor where the active window is
165 displayed, or a monitor number starting from zero. See the output
166 of "randr" or "xinerama" below.
167
168 GENERAL OPTIONS
169 The following options are identical for every IceWM command.
170
171 -d, -display DISPLAY
172 Specifies the X11 DISPLAY. If unspecified, defaults to $DISPLAY.
173
174 -h, --help
175 Print a brief usage statement to stdout and exit.
176
177 -V, --version
178 Print the program version to stdout and exit.
179
180 -C, --copying
181 Print copying permissions to stdout for the program and exit.
182
184 icesh expects one or more action arguments. There are two kinds of
185 actions: window actions and manager actions. The first operates on the
186 selected windows. The second directly interacts with the icewm window
187 manager.
188
189 WINDOW ACTIONS
190 The following actions affect the selected window or windows.
191
192 activate
193 Activate the window, aka. to focus.
194
195 close
196 Send a close request to the client that created the window.
197
198 kill
199 Force an immediate close down of the client that created the
200 window.
201
202 id Print window identifiers for the selected windows.
203
204 pid Print process identifiers for the selected windows.
205
206 list
207 Show window details, like geometry and names.
208
209 lower
210 Lower the window.
211
212 raise
213 Raise the window.
214
215 above
216 Stack the window above others.
217
218 below
219 Stack the window below others.
220
221 rollup
222 Rollup the specified window.
223
224 fullscreen
225 Set the window to fullscreen.
226
227 maximize
228 Maximize the window.
229
230 horizontal
231 Maximize the window only horizontally.
232
233 vertical
234 Maximize the window only vertically.
235
236 minimize
237 Minimize the window.
238
239 restore
240 Restore the window to normal.
241
242 hide
243 Hide the window.
244
245 unhide
246 Reveal the window.
247
248 skip
249 Don't show the window on the taskbar.
250
251 unskip
252 Do show the window on the taskbar.
253
254 sticky
255 Show the window on all workspaces.
256
257 unsticky
258 Show the window on only one workspace.
259
260 urgent
261 Set the urgent flag.
262
263 resize WIDTH HEIGHT
264 Resize window to WIDTH by HEIGHT window units.
265
266 sizeto WIDTH HEIGHT
267 Resize window to WIDTH by HEIGHT pixels. If WIDTH or HEIGHT ends
268 with a percent sign "%", then they refer to a percentage of the
269 desktop work area. For instance, "sizeto 50% 100%" resizes to half
270 the desktop width and whatever height is available above or below
271 the taskbar.
272
273 sizeby WIDTH HEIGHT
274 Resize window by WIDTH by HEIGHT pixels. If WIDTH or HEIGHT ends
275 with a percent sign "%", then they refer to a percentage of the
276 current window size. For instance, "sizeto 50% 200" increases the
277 width by 50% and increases the height by 200 pixels.
278
279 move X Y
280 Move the selected window or windows to the screen position X Y. To
281 specify X or Y values relative to the right side or bottom side
282 precede the value with an extra minus sign, like in "move -+10
283 --20".
284
285 moveby X Y
286 Displace window by X Y pixels.
287
288 center
289 Position the window in the center of the desktop work area.
290
291 left
292 Position the window against the left side of the desktop work area.
293
294 right
295 Position the window against the right side of the desktop work
296 area.
297
298 top Position the window against the top side of the desktop work area.
299
300 bottom
301 Position the window against the bottom side of the desktop work
302 area.
303
304 setIconTitle TITLE
305 Set the icon title to TITLE.
306
307 getIconTitle
308 Print the icon title.
309
310 setWindowTitle TITLE
311 Set the window title to TITLE.
312
313 getWindowTitle
314 Print the window title.
315
316 setGeometry GEOMETRY
317 Set the window geometry to GEOMETRY.
318
319 getGeometry
320 Print the window geometry.
321
322 netState [STATE]
323 If STATE is omitted then it shows the EWMH window state. If STATE
324 starts with a "+" then flags in STATE are appended to the existing
325 EWMH window state. If STATE starts with a "-" then flags in STATE
326 are removed from the existing EWMH window state. If STATE starts
327 with a "=" then the EWMH window state is set to STATE. See
328 EXPRESSIONS below. A list of EWMH flags can be found in the output
329 of "icesh symbols".
330
331 setLayer LAYER
332 Move the specified window to another GNOME window layer. See below
333 for LAYER symbols.
334
335 getLayer
336 Print the GNOME window layer for the specified window.
337
338 setWorkspace WORKSPACE
339 Move the specified window to another workspace. Select the root
340 window to change the current workspace. If WORKSPACE is "All" then
341 the specified window becomes visible on all workspaces. Specify
342 "this" for the current workspace.
343
344 getWorkspace
345 Print the workspace for the specified window.
346
347 opacity [OPACITY]
348 Print the window opacity if OPACITY is not given, otherwise set the
349 window opacity to OPACITY.
350
351 setTrayOption TRAYOPTION
352 Set the IceWM tray option for the specified window to TRAYOPTION.
353 See IceWM tray options, below, for TRAYOPTION symbols.
354
355 getTrayOption
356 Print the IceWM tray option for the specified window.
357
358 setNormalGravity GRAVITY
359 Set the window gravity field in the WM_NORMAL_HINTS property for
360 the specified window to GRAVITY. See below for GRAVITY symbols.
361
362 getNormalGravity
363 Print the window gravity from the WM_NORMAL_HINTS property for the
364 specified window.
365
366 setWindowGravity GRAVITY
367 Set the window gravity for the specified window to GRAVITY. See
368 below for GRAVITY symbols.
369
370 getWindowGravity
371 Print the window gravity for the specified window.
372
373 setBitGravity GRAVITY
374 Set the bit gravity> for the specified window to GRAVITY. See
375 below for GRAVITY symbols.
376
377 getBitGravity
378 Print the bit gravity for the specified window.
379
380 motif [funcs FUNCTIONS | decor DECORATIONS | remove]
381 Query, set or modify the "_MOTIF_WM_HINTS" property for the
382 specified window. Without arguments motif will show the current
383 value, but only if the window has such a property. The property can
384 be removed or reset with the remove argument. With funcs and decor
385 individual fields of this property can be enabled or disabled. If
386 FUNCTIONS or DECORATIONS starts with a minus or plus sign then the
387 existing value is modified, otherwise it is set to the new value.
388 Note that if "All" is set, then other set fields will be disabled
389 and cleared fields will be enabled.
390
391 borderless
392 Hide the frame borders and title.
393
394 bordered
395 Show the frame borders and title.
396
397 denormal
398 Remove the WM_NORMAL_HINTS property, if it exists. This lifts
399 font-size restrictions on resizing, especially for terminals.
400
401 prop PROPERTY
402 Print the value of property PROPERTY if it is present.
403
404 properties
405 Print all properties.
406
407 frame
408 Print the identifier of the window frame.
409
410 click window-x window-y button
411 Send a button press and release event at position (window-x,
412 window-y). A negative position is relative to the bottom right
413 corner. The mouse pointer is warped to the position before sending
414 the events. The button number should be between 1 and 5 inclusive.
415
416 monitors top bottom left right
417 This sets the monitors to use for fullscreen. Top, bottom, left,
418 and right are indices of the icesh xinerama command.
419
420 spy Observe the selected windows and report any changes. This includes
421 focus, visibility, position, size and all window properties.
422
423 MANAGER ACTIONS
424 The following actions control the IceWM window manager and therefore do
425 not require a window select or filter option:
426
427 listWorkspaces
428 List the names of all workspaces.
429
430 current
431 Show the number and name of the current workspace.
432
433 goto WORKSPACE
434 Change the current workspace to WORKSPACE.
435
436 workspaces [COUNT]
437 Print the number of workspaces if COUNT is not given, otherwise set
438 the number of workspaces to COUNT.
439
440 setWorkspaceName INDEX NAME
441 Change the name of the workspace INDEX to NAME, where INDEX is a
442 workspace number starting from zero.
443
444 setWorkspaceNames NAME [NAME]*
445 Change the workspace names to the list of NAMEs.
446
447 addWorkspace NAME
448 Create a new workspace with name NAME.
449
450 desktop [SHOWING]
451 If SHOWING is 1 then set "showing the desktop" mode. If SHOWING is
452 0 then turn off "showing the desktop". Print the current mode if
453 SHOWING is not given.
454
455 randr
456 Summarize the RandR configuration.
457
458 xinerama
459 Summarize the Xinerama configuration.
460
461 check
462 Print information about the current window manager, like name,
463 version, class, locale, command, host name and pid.
464
465 clients
466 List all managed client windows, their titles and geometries.
467
468 shown
469 List all mapped client windows for the current desktop, their
470 titles and geometries.
471
472 windows
473 List all toplevel windows, their titles and geometries.
474
475 systray
476 List applications which are managed by the IceWM system tray.
477
478 xembed
479 List application windows which are embedded using the XEMBED
480 protocol. This is another way to discover system tray
481 applications.
482
483 logout
484 Let icewm execute the "LogoutCommand".
485
486 reboot
487 Let icewm execute the "RebootCommand".
488
489 shutdown
490 Let icewm execute the "ShutdownCommand".
491
492 cancel
493 Let icewm cancel the logout/reboot/shutdown.
494
495 about
496 Let icewm show the about window.
497
498 windowlist
499 Let icewm show the window list window.
500
501 restart
502 Let icewm restart itself.
503
504 suspend
505 Let icewm execute the "SuspendCommand".
506
507 winoptions
508 Let icewm reload the "winoptions".
509
510 keys
511 Let icewm reload the "keys" file.
512
513 guievents
514 Monitor the ICEWM_GUI_EVENT property and report all changes.
515
516 delay [time]
517 Stop execution for time or 0.1 seconds.
518
519 runonce program [arguments...]
520 This action is meant to be used together with the -class option.
521 Only if no window is matched by WM_CLASS then program
522 [arguments...] is executed.
523
524 sync
525 Synchronize with the IceWM window manager. That is, wait for icewm
526 to process all previous actions.
527
528 symbols
529 List all named symbols.
530
531 EXPRESSIONS
532 Some of the window actions require one or two EXPRESSION arguments.
533
534 EXPRESSION ::= SYMBOL | EXPRESSION { "+" | "|" } SYMBOL
535
536 Each SYMBOL may be from one of the following applicable domains:
537
538 Window layer
539 Named symbols of the domain Window layer (numeric range: 0-15):
540
541 Desktop (0)
542 Below (2)
543 Normal (4)
544 OnTop (6)
545 Dock (8)
546 AboveDock (10)
547 Menu (12)
548
549 These symbols are used with the LAYER argument to the "setLayer"
550 action.
551
552 IceWM tray option
553 Named symbols of the domain IceWM tray option (numeric range: 0-2):
554
555 Ignore (0)
556 Minimized (1)
557 Exclusive (2)
558
559 These symbols are used with the TRAYOPTION argument to the
560 "setTrayOption" action.
561
562 Gravity symbols
563 Named symbols for window and bit gravity (numeric range: 0-10):
564
565 ForgetGravity (0)
566 NorthWestGravity (1)
567 NorthGravity (2)
568 NorthEastGravity (3)
569 WestGravity (4)
570 CenterGravity (5)
571 EastGravity (6)
572 SouthWestGravity (7)
573 SouthGravity (8)
574 SouthEastGravity (9)
575 StaticGravity (10)
576
577 Motif functions
578 All (1)
579 Resize (2)
580 Move (4)
581 Minimize (8)
582 Maximize (16)
583 Close (32)
584
585 Motif decorations
586 All (1)
587 Border (2)
588 Resize (4)
589 Title (8)
590 Menu (16)
591 Minimize (32)
592 Maximize (64)
593
594 EWMH window state symbols
595 Named symbols of the domain EWMH state (numeric range: 0-8191):
596
597 ABOVE (1)
598 BELOW (2)
599 DEMANDS_ATTENTION (4)
600 FOCUSED (8)
601 FULLSCREEN (16)
602 HIDDEN (32)
603 MAXIMIZED_HORZ (64)
604 MAXIMIZED_VERT (128)
605 MODAL (256)
606 SHADED (512)
607 SKIP_PAGER (1024)
608 SKIP_TASKBAR (2048)
609 STICKY (4096)
610
612 List all workspace names:
613
614 icesh listWorkspaces
615
616 Example output:
617
618 workspace #0: `main'
619 workspace #1: `web'
620 workspace #2: `doc'
621 workspace #3: `dev'
622
623 Close terminal work and activate terminal fun.
624
625 icesh -c work.XTerm close -a -c fun.XTerm activate
626
627 Print opacity for all xterms.
628
629 icesh -c XTerm opacity
630
631 Change opacity for all xterms.
632
633 icesh -c XTerm opacity 84
634
635 Move all windows on workspace "Top" to the current workspace.
636
637 icesh -W "Top" setWorkspace "this"
638
639 Restore all hidden clients, minimize all clients on the current
640 workspace and activate Firefox.
641
642 icesh -S hidden restore -a -W "this" minimize -a -c Firefox activate
643
644 Resize the focused window to occupy the right half of the desktop area.
645
646 icesh -f sizeto 49% 100% sync top sync right sync raise activate
647
648 Toggle the frame border of the focused window.
649
650 if icesh -f motif | grep -q 'decor:$'; then \
651 icesh -f motif decor All; else icesh -f motif decor ""; fi
652
654 DISPLAY
655 The default display.
656
658 icesh is largely compliant with the EWMH and ICCCM specifications.
659 Some commands, like manager actions, are specific to IceWM.
660
662 icewm(1), wmctrl(1), xdotool(1), xprop(1), xwininfo(1).
663
665 icesh had no known bugs at the time of release. Please report bugs for
666 current versions to the source code repository at
667 <https://github.com/bbidulock/icewm/issues>.
668
670 Brian Bidulock <mailto:bidulock@openss7.org>.
671
672 See --copying for full copyright notice and copying permissions.
673
675 IceWM is licensed under the GNU Library General Public License. See
676 the COPYING file in the distribution or use the --copying flag to
677 display copying permissions.
678
679
680
681icewm 2.3.0 2021-04-02 ICESH(1)