1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
|
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "ICESH 1"
.TH ICESH 1 2024-05-20 "icewm 3.5.0" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SS NAME
.IX Subsection "NAME"
.Vb 1
\& icesh \- control window properties and the IceWM window manager
.Ve
.SS SYNOPSIS
.IX Subsection "SYNOPSIS"
.IP "\fBicesh\fR \fIOPTIONS|ACTIONS\fR+" 4
.IX Item "icesh OPTIONS|ACTIONS+"
.SS DESCRIPTION
.IX Subsection "DESCRIPTION"
\&\fBicesh\fR provides two types of commands:
.IP "1. Commands to directly interact with icewm:" 4
.IX Item "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, \f(CW\*(C`icesh restart\*(C'\fR will restart
icewm and \f(CW\*(C`icesh clients\*(C'\fR lists the applications that
are managed by icewm.
.IP "2. Commands that operate on a selection of windows:" 4
.IX Item "2. Commands that operate on a selection of windows:"
See the section \f(CW\*(C`WINDOW ACTIONS\*(C'\fR below. For example, \f(CW\*(C`icesh close\*(C'\fR
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.
.Sp
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 \fBicewm\-keys\fR\|(5)
to define your own window management hotkeys. For example, to
immediately close all xterm windows do \f(CW\*(C`icesh \-c xterm close\*(C'\fR.
.Sp
There are a dozen \f(CW\*(C`SELECT OPTIONS\*(C'\fR to select windows. They start
with a '\-' or a '+'. The '\-' starts a new selection, while the '+'
adds more windows to an existing selection.
.Sp
This selection of windows can be reduced by \f(CW\*(C`FILTER OPTIONS\*(C'\fR.
These remove unwanted windows from the current selection.
Multiple filter options can be given. For example,
\&\f(CW\*(C`icesh \-c xterm \-W this close\*(C'\fR will close only those xterms
that are shown on the current workspace. The xterms on other
workspaces are filtered out by the \f(CW\*(C`\-W this\*(C'\fR filter option.
.PP
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.
.SS OPTIONS
.IX Subsection "OPTIONS"
\&\fBicesh\fR recognizes the following options:
.SS "SELECT OPTIONS"
.IX Subsection "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.
.PP
The following options \fIselect\fR one or more client windows.
If needed, they can be repeated for successive actions.
.IP "\fB\-a\fR, \fB\-all\fR" 4
.IX Item "-a, -all"
Selects all client windows of the window manager.
.IP "\fB\-f\fR, \fB\-focus\fR, \fB+f\fR, \fB+focus\fR" 4
.IX Item "-f, -focus, +f, +focus"
Selects the application window that is currently focused.
The option with minus sign replaces the existing selection with
the focused window. With a plus sign the focused window is added to
an existing selection.
.IP "\fB+g\fR, \fB+group\fR" 4
.IX Item "+g, +group"
Extend the current selection with client windows that
belong to the same application window group.
.IP "\fB\-r\fR, \fB\-root\fR, \fB+r\fR, \fB+root\fR" 4
.IX Item "-r, -root, +r, +root"
Selects the root window.
The option with minus sign replaces the existing selection with
the root window. With a plus sign the root window is added to
an existing selection.
.IP "\fB\-s\fR, \fB\-shown\fR" 4
.IX Item "-s, -shown"
Selects all client windows that are on the current workspace.
.IP "\fB\-t\fR, \fB\-top\fR" 4
.IX Item "-t, -top"
Selects all toplevel windows from the display unconditionally.
This includes windows that have never been mapped and windows
with the override redirect bit set to evade management.
.IP "\fB\-w\fR, \fB\-window\fR, \fB+w\fR, \fB+window\fR \fIWINDOW_ID\fR" 4
.IX Item "-w, -window, +w, +window WINDOW_ID"
Specifies the identifier of the window, \fIWINDOW_ID\fR, for which the
action applies. Special identifiers are \fBroot\fR for the root window
and \fBfocus\fR for the currently focused window.
The option with minus sign replaces the existing selection.
With a plus sign the window is added to an existing selection.
.IP "\fB\-x\fR, \fB\-xembed\fR" 4
.IX Item "-x, -xembed"
Selects all windows that are embedded using the \fIXEMBED\fR protocol.
.IP "\fB+c\fR, \fB+class\fR \fICLASS\fR" 4
.IX Item "+c, +class CLASS"
Extend the current selection with client windows that have a
\&\fIWM_CLASS\fR property equal to \fICLASS\fR. This is the resource
instance and class name. If \fICLASS\fR contains a period, only
windows with exactly the same \fIWM_CLASS\fR property are matched.
If there is no period, windows of the same class and windows
of the same instance are selected.
.IP "\fB+C\fR, \fB+Class\fR" 4
.IX Item "+C, +Class"
Extend the current selection with client windows that
have a \fIWM_CLASS\fR property \fIsimilar\fR to the already
selected set of windows.
.IP "\fB\-D\fR, \fB\-Dockapps\fR" 4
.IX Item "-D, -Dockapps"
Selects all Dockapp applications that are managed by icewm.
.IP "\fB+P\fR, \fB+Pid\fR" 4
.IX Item "+P, +Pid"
Extend the current selection with client windows that have
the same process identifier as one of the selected windows.
.IP \fB\-T\fR 4
.IX Item "-T"
Selects the IceWM taskbar.
.SS "FILTER OPTIONS"
.IX Subsection "FILTER OPTIONS"
The following options \fIfilter\fR the currently selected set of windows.
If no previous \fIselect\fR option was given then a \fB\-all\fR option is
implicitly assumed to filter all client windows.
.IP "\fB\-c\fR, \fB\-class\fR \fICLASS\fR" 4
.IX Item "-c, -class CLASS"
Filters the set of windows on their \fIWM_CLASS\fR property. This is
the resource instance and class name. If \fICLASS\fR contains a period,
only windows with exactly the same \fIWM_CLASS\fR property are matched.
If there is no period, windows of the same class and windows of the
same instance (aka. \fI\-name\fR) are selected.
.IP "\fB\-l\fR, \fB\-last\fR" 4
.IX Item "-l, -last"
Filter clients and keep only the most recent client.
.IP "\fB\-m\fR, \fB\-machine\fR \fIHOST\fR" 4
.IX Item "-m, -machine HOST"
Filters clients by host name. Clients with a WM_CLIENT_MACHINE property
equal to \fIHOST\fR are selected.
.IP "\fB\-n\fR, \fB\-name\fR \fINAME\fR" 4
.IX Item "-n, -name NAME"
Filters clients by _NET_WM_NAME or WM_NAME.
\&\fINAME\fR matches any part of the property value.
To match at the beginning use a \f(CW\*(C`^\*(C'\fR prefix.
To match at the end use a \f(CW\*(C`$\*(C'\fR suffix.
.IP "\fB\-p\fR, \fB\-pid\fR \fIPID\fR" 4
.IX Item "-p, -pid PID"
Filters clients by process ID. Clients with a _NET_WM_PID property equal
to \fIPID\fR are selected.
.IP "\fB\-u\fR, \fB\-unmapped\fR" 4
.IX Item "-u, -unmapped"
Filter clients and keep those that are currently not viewable.
These are hidden, minimized, rolled-up, or on another workspace.
.IP "\fB\-v\fR, \fB\-viewable\fR" 4
.IX Item "-v, -viewable"
Filter clients and keep only those that are currently viewable.
These clients are mapped on the current workspace.
.IP "\fB\-G\fR, \fB\-Gravity\fR \fIGRAVITY\fR" 4
.IX Item "-G, -Gravity GRAVITY"
Filters clients by the window gravity field of the WM_NORMAL_HINTS
property. Clients with a gravity equal to \fIGRAVITY\fR are selected.
If \fIGRAVITY\fR starts with an exclamation mark then the filtering is
inverted.
.IP "\fB\-L\fR, \fB\-Layer\fR \fILAYER\fR" 4
.IX Item "-L, -Layer LAYER"
Filters clients by \fIGNOME window layer\fR, which can either be a layer
name or a layer number. See EXPRESSIONS below. If \fILAYER\fR starts with
an exclamation mark then the filtering is inverted.
.IP "\fB\-N\fR, \fB\-Netstate\fR \fISTATE\fR" 4
.IX Item "-N, -Netstate STATE"
Filters clients by \fIEWMH window state\fR. Clients that have at
least an EWMH window state of \fISTATE\fR are selected. This state
refers to details like \fBMINIZED\fR or \fBMAXIMIZED\fR. See EXPRESSIONS
below. If \fISTATE\fR starts with an exclamation mark then the filtering
is inverted. A question mark \f(CW\*(C`?\*(C'\fR filters clients with any bit set
in \fISTATE\fR.
.IP "\fB\-P\fR, \fB\-Property\fR \fIPROP[=value]\fR" 4
.IX Item "-P, -Property PROP[=value]"
Filters clients by property. Clients that have a property \fIPROP\fR
are selected. If the optional \fIvalue\fR is given, the match succeeds
only if \fIPROP\fR is a string, window, cardinal, or atom, with a value
equal to \fIvalue\fR. The filtering is inverted if \fIPROP\fR starts with
an exclamation mark.
.IP "\fB\-R\fR, \fB\-Role\fR \fIROLE\fR" 4
.IX Item "-R, -Role ROLE"
Filters clients by WM_WINDOW_ROLE. Clients that have a WM_WINDOW_ROLE
property value equal to \fIROLE\fR are selected. The filtering is inverted
if \fIROLE\fR starts with an exclamation mark.
.IP "\fB\-W\fR, \fB\-Workspace\fR \fIWORKSPACE\fR" 4
.IX Item "-W, -Workspace WORKSPACE"
Filter clients by workspace. Workspace \fIWORKSPACE\fR is either a
workspace name, or a workspace number counting from zero, or the word
\&\f(CW\*(C`this\*(C'\fR for the current workspace, or the word \f(CW\*(C`All\*(C'\fR for all workspaces.
If \fIWORKSPACE\fR starts with an exclamation mark then the filtering is
inverted.
.IP "\fB\-X\fR, \fB\-Xinerama\fR \fIMONITOR\fR" 4
.IX Item "-X, -Xinerama MONITOR"
Limit clients by \fIRandR\fR/\fIXinerama\fR monitor. Only operate on
clients that are displayed on \fIMONITOR\fR, where \fIMONITOR\fR can
be \f(CW\*(C`All\*(C'\fR for all monitors, \f(CW\*(C`this\*(C'\fR for the monitor where the
active window is displayed, or a monitor number starting from zero.
See the output of \f(CW\*(C`randr\*(C'\fR or \f(CW\*(C`xinerama\*(C'\fR below.
.SS "GENERAL OPTIONS"
.IX Subsection "GENERAL OPTIONS"
The following options are identical for every IceWM command.
.IP "\fB\-d\fR, \fB\-display\fR \fIDISPLAY\fR" 4
.IX Item "-d, -display DISPLAY"
Specifies the X11 DISPLAY. If unspecified, defaults to \fR\f(CB$DISPLAY\fR\fB\fR.
.IP "\fB\-h\fR, \fB\-\-help\fR" 4
.IX Item "-h, --help"
Print a brief usage statement to \fIstdout\fR and exit.
.IP "\fB\-V\fR, \fB\-\-version\fR" 4
.IX Item "-V, --version"
Print the program version to \fIstdout\fR and exit.
.IP "\fB\-C\fR, \fB\-\-copying\fR" 4
.IX Item "-C, --copying"
Print copying permissions to \fIstdout\fR for the program and exit.
.IP "\fB\-q\fR, \fB\-\-quiet\fR" 4
.IX Item "-q, --quiet"
Don't complain if no matching windows could be found.
.SS ACTIONS
.IX Subsection "ACTIONS"
\&\fBicesh\fR expects one or more action arguments. There are two kinds of
actions: \fIwindow actions\fR and \fImanager actions\fR. The first operates on
the selected windows. The second directly interacts with the \fBicewm\fR
window manager.
.SS "WINDOW ACTIONS"
.IX Subsection "WINDOW ACTIONS"
The following actions affect the selected window or windows.
.IP \fBactivate\fR 4
.IX Item "activate"
Activate the window, aka. \fIto focus\fR.
.IP \fBclose\fR 4
.IX Item "close"
Send a close request to the client that created the window.
.IP \fBkill\fR 4
.IX Item "kill"
Force an immediate close down of the client that created the window.
.IP \fBid\fR 4
.IX Item "id"
Print window identifiers for the selected windows.
.IP \fBpid\fR 4
.IX Item "pid"
Print process identifiers for the selected windows.
.IP \fBlist\fR 4
.IX Item "list"
Show window details, like geometry and names.
.IP \fBlower\fR 4
.IX Item "lower"
Lower the window.
.IP \fBraise\fR 4
.IX Item "raise"
Raise the window.
.IP \fBabove\fR 4
.IX Item "above"
Stack the window above others.
.IP \fBbelow\fR 4
.IX Item "below"
Stack the window below others.
.IP \fBrollup\fR 4
.IX Item "rollup"
Rollup the specified window.
.IP \fBfullscreen\fR 4
.IX Item "fullscreen"
Set the window to fullscreen.
.IP \fBmaximize\fR 4
.IX Item "maximize"
Maximize the window.
.IP \fBhorizontal\fR 4
.IX Item "horizontal"
Maximize the window only horizontally.
.IP \fBvertical\fR 4
.IX Item "vertical"
Maximize the window only vertically.
.IP \fBminimize\fR 4
.IX Item "minimize"
Minimize the window.
.IP \fBrestore\fR 4
.IX Item "restore"
Restore the window to normal and clear urgency.
.IP \fBhide\fR 4
.IX Item "hide"
Hide the window.
.IP \fBunhide\fR 4
.IX Item "unhide"
Reveal the window.
.IP \fBskip\fR 4
.IX Item "skip"
Don't show the window on the taskbar.
.IP \fBunskip\fR 4
.IX Item "unskip"
Do show the window on the taskbar.
.IP \fBsticky\fR 4
.IX Item "sticky"
Show the window on all workspaces.
.IP \fBunsticky\fR 4
.IX Item "unsticky"
Show the window on just one workspace.
.IP \fBurgent\fR 4
.IX Item "urgent"
Set the urgency flag to flash the task button.
.IP "\fBresize\fR \fIWIDTH\fR \fIHEIGHT\fR" 4
.IX Item "resize WIDTH HEIGHT"
Resize window to \fIWIDTH\fR by \fIHEIGHT\fR window units. For text based
applications like terminals, a window unit is the size of a single
character cell.
.IP "\fBsizeto\fR \fIWIDTH\fR \fIHEIGHT\fR" 4
.IX Item "sizeto WIDTH HEIGHT"
Resize window to \fIWIDTH\fR by \fIHEIGHT\fR pixels. If \fIWIDTH\fR or \fIHEIGHT\fR
ends with a percent sign \f(CW\*(C`%\*(C'\fR, then they refer to a percentage of the
desktop work area. For instance, \f(CW\*(C`sizeto 50% 100%\*(C'\fR resizes to half
the desktop width and whatever height is available above or below the
taskbar.
.IP "\fBsizeby\fR \fIWIDTH\fR \fIHEIGHT\fR" 4
.IX Item "sizeby WIDTH HEIGHT"
Resize window by \fIWIDTH\fR by \fIHEIGHT\fR pixels. If \fIWIDTH\fR or \fIHEIGHT\fR
ends with a percent sign \f(CW\*(C`%\*(C'\fR, then they refer to a percentage of the
current window size. For instance, \f(CW\*(C`sizeby 50% 200\*(C'\fR increases the width
by 50% and increases the height by 200 pixels.
.IP "\fBmove\fR \fIX\fR \fIY\fR" 4
.IX Item "move X Y"
Move the selected window or windows to the screen position \fIX\fR \fIY\fR.
To specify \fIX\fR or \fIY\fR values relative to the right side or bottom side
precede the value with an extra minus sign, like in \f(CW\*(C`move \-+10 \-\-20\*(C'\fR.
.IP "\fBmoveby\fR \fIX\fR \fIY\fR" 4
.IX Item "moveby X Y"
Displace window by \fIX\fR \fIY\fR pixels.
.IP \fBcenter\fR 4
.IX Item "center"
Position the window in the center of the desktop work area.
.IP \fBleft\fR 4
.IX Item "left"
Position the window against the left side of the desktop work area.
.IP \fBright\fR 4
.IX Item "right"
Position the window against the right side of the desktop work area.
.IP \fBtop\fR 4
.IX Item "top"
Position the window against the top side of the desktop work area.
.IP \fBbottom\fR 4
.IX Item "bottom"
Position the window against the bottom side of the desktop work area.
.IP "\fBsetIconTitle\fR \fITITLE\fR" 4
.IX Item "setIconTitle TITLE"
Set the icon title to \fITITLE\fR.
.IP \fBgetIconTitle\fR 4
.IX Item "getIconTitle"
Print the icon title.
.IP "\fBsetWindowTitle\fR \fITITLE\fR" 4
.IX Item "setWindowTitle TITLE"
Set the window title to \fITITLE\fR.
.IP \fBgetWindowTitle\fR 4
.IX Item "getWindowTitle"
Print the window title.
.IP "\fBsetGeometry\fR \fIGEOMETRY\fR" 4
.IX Item "setGeometry GEOMETRY"
Set the window geometry to \fIGEOMETRY\fR. This geometry should be
specified in a format that can be parsed by \fBXParseGeometry\fR\|(3).
Negative offsets are with respect to the bottom or right side of
the screen. Use \f(CW\*(C`+\-\*(C'\fR for a truly negative position.
.IP \fBgetGeometry\fR 4
.IX Item "getGeometry"
Print the window geometry.
.IP "\fBsetClass\fR \fICLASS\fR" 4
.IX Item "setClass CLASS"
Set the resource name and class to \fICLASS\fR, which should be a resource
name and a resource class connected by a dot. To preserve either the
existing name or class, use a percentage sign for that part.
.IP \fBgetClass\fR 4
.IX Item "getClass"
Print the resource name and class.
.IP "\fBnetState\fR \fI[STATE]\fR" 4
.IX Item "netState [STATE]"
If \fISTATE\fR is omitted then it shows the \fIEWMH window state\fR.
If \fISTATE\fR starts with a \f(CW\*(C`+\*(C'\fR then flags in \fISTATE\fR are appended to
the existing \fIEWMH window state\fR. If \fISTATE\fR starts with a \f(CW\*(C`\-\*(C'\fR
then flags in \fISTATE\fR are removed from the existing \fIEWMH window
state\fR. If \fISTATE\fR starts with a \f(CW\*(C`^\*(C'\fR then flags in \fISTATE\fR are
toggled with respect to the existing \fIEWMH window state\fR.
If \fISTATE\fR starts with a \f(CW\*(C`=\*(C'\fR then the \fIEWMH window state\fR
is set to \fISTATE\fR. See EXPRESSIONS below. A list of \fIEWMH flags\fR
can be found in the output of \f(CW\*(C`icesh symbols\*(C'\fR.
.IP "\fBsetLayer\fR \fILAYER\fR" 4
.IX Item "setLayer LAYER"
Move the specified window to another \fIwindow layer\fR.
See EXPRESSIONS below for a list of \fILAYER\fR symbols.
.IP \fBgetLayer\fR 4
.IX Item "getLayer"
Print the \fIwindow layer\fR for the specified window.
.IP "\fBsetWorkspace\fR \fIWORKSPACE\fR" 4
.IX Item "setWorkspace WORKSPACE"
Move the specified window to another workspace. Select the root
window to change the current workspace. If \fIWORKSPACE\fR is \f(CW\*(C`All\*(C'\fR
then the specified window becomes visible on all workspaces.
Specify \f(CW\*(C`this\*(C'\fR for the current workspace, \f(CW\*(C`next\*(C'\fR for the subsequent
workspace or \f(CW\*(C`prev\*(C'\fR for the preceding workspace.
.IP \fBgetWorkspace\fR 4
.IX Item "getWorkspace"
Print the workspace for the specified window.
.IP "\fBopacity\fR [\fIOPACITY\fR]" 4
.IX Item "opacity [OPACITY]"
Print the window opacity if \fIOPACITY\fR is not given,
otherwise set the window opacity to \fIOPACITY\fR.
.IP "\fBsetTrayOption\fR \fITRAYOPTION\fR" 4
.IX Item "setTrayOption TRAYOPTION"
Set the \fIIceWM tray option\fR for the specified window to \fITRAYOPTION\fR.
See \fIIceWM tray options\fR, below, for \fITRAYOPTION\fR symbols.
.IP \fBgetTrayOption\fR 4
.IX Item "getTrayOption"
Print the \fIIceWM tray option\fR for the specified window.
.IP "\fBsetNormalGravity\fR \fIGRAVITY\fR" 4
.IX Item "setNormalGravity GRAVITY"
Set the window gravity field in the WM_NORMAL_HINTS property for the
specified window to \fIGRAVITY\fR. See below for \fIGRAVITY\fR symbols.
.IP \fBgetNormalGravity\fR 4
.IX Item "getNormalGravity"
Print the window gravity from the WM_NORMAL_HINTS property for the
specified window.
.IP "\fBsetWindowGravity\fR \fIGRAVITY\fR" 4
.IX Item "setWindowGravity GRAVITY"
Set the window gravity for the specified window to \fIGRAVITY\fR.
See below for \fIGRAVITY\fR symbols.
.IP \fBgetWindowGravity\fR 4
.IX Item "getWindowGravity"
Print the window gravity for the specified window.
.IP "\fBsetBitGravity\fR \fIGRAVITY\fR" 4
.IX Item "setBitGravity GRAVITY"
Set the bit gravity> for the specified window to \fIGRAVITY\fR.
See below for \fIGRAVITY\fR symbols.
.IP \fBgetBitGravity\fR 4
.IX Item "getBitGravity"
Print the bit gravity for the specified window.
.IP "\fBmotif\fR [\fBfuncs\fR \fIFUNCTIONS\fR | \fBdecor\fR \fIDECORATIONS\fR | \fBremove\fR]" 4
.IX Item "motif [funcs FUNCTIONS | decor DECORATIONS | remove]"
Query, set or modify the \f(CW\*(C`_MOTIF_WM_HINTS\*(C'\fR property for the specified
window. Without arguments \fBmotif\fR will show the current value, but
only if the window has such a property. The property can be removed or
reset with the \fBremove\fR argument. With \fBfuncs\fR and \fBdecor\fR individual
fields of this property can be enabled or disabled. If \fIFUNCTIONS\fR or
\&\fIDECORATIONS\fR starts with a minus or plus sign then the existing value
is modified, otherwise it is set to the new value. Note that if \f(CW\*(C`All\*(C'\fR
is set, other set fields are disabled and cleared fields are enabled.
.IP \fBborderless\fR 4
.IX Item "borderless"
Hide the frame borders and title.
.IP \fBbordered\fR 4
.IX Item "bordered"
Show the frame borders and title.
.IP \fBdenormal\fR 4
.IX Item "denormal"
Remove the WM_NORMAL_HINTS property, if it exists. This lifts
font-size restrictions on resizing, especially for terminals.
.IP "\fBprop\fR \fIPROPERTY\fR" 4
.IX Item "prop PROPERTY"
Print the value of property \fIPROPERTY\fR, if it is present.
.IP \fBproperties\fR 4
.IX Item "properties"
Print all properties and their values.
.IP \fBframe\fR 4
.IX Item "frame"
Print the identifier of the window frame.
.IP \fBextents\fR 4
.IX Item "extents"
Print the window identifier and the frame border sizes: left, right,
top and bottom.
.IP \fBfocusmodel\fR 4
.IX Item "focusmodel"
Print the ICCCM focus model as advertised by the client window.
This is either Locally, Passive, Globally or NoInput.
.IP "\fBoverride\fR [\fI0|1\fR]" 4
.IX Item "override [0|1]"
Print the override redirect status for the window, or if either 0 or 1
is given, then disable or enable the override redirect status.
.IP "\fBtabto\fR \fIlabel\fR" 4
.IX Item "tabto label"
Move the windows as tabs to a frame that has \f(CW\*(C`frame\*(C'\fR label \fIlabel\fR.
Such a frame is created if needed.
.IP \fBuntab\fR 4
.IX Item "untab"
Move each window to its own frame, if it is currently tabbed.
.IP "\fBloadicon\fR \fIimage.pam\fR" 4
.IX Item "loadicon image.pam"
Load an icon from file, which must be in the PAM image format,
with dimensions at most 256, a depth of 4, and type \fIRGB_ALPHA\fR.
.IP "\fBsaveicon\fR \fIfile000.pam\fR" 4
.IX Item "saveicon file000.pam"
Save an icon to a new file in the PAM image format. Digits are
increased to generate a unique new filename for each window.
.IP "\fBclick\fR \fIwindow-x\fR \fIwindow-y\fR \fIbutton\fR" 4
.IX Item "click window-x window-y button"
Send a button press and release event at position (\fIwindow-x\fR,
\&\fIwindow-y\fR). A negative position is relative to the bottom right
corner. The mouse pointer is warped to the position before sending
the events. The button number should be between 1 and 5 inclusive.
.IP "\fBmonitors\fR \fItop\fR \fIbottom\fR \fIleft\fR \fIright\fR" 4
.IX Item "monitors top bottom left right"
This sets the monitors to use for fullscreen.
Top, bottom, left, and right are indices of the \fIicesh xinerama\fR command.
.IP \fBspy\fR 4
.IX Item "spy"
Observe the selected windows and report any changes. This includes
focus, visibility, position, size and all window properties.
To monitor all of the protocol request messages that client applications
may send to icewm, also spy on the root window.
.IP \fBstacking\fR 4
.IX Item "stacking"
Sort the list of windows from topmost to bottom-most.
.IP \fBreverse\fR 4
.IX Item "reverse"
Reverse the order of the list of windows.
.SS "MANAGER ACTIONS"
.IX Subsection "MANAGER ACTIONS"
The following actions control the IceWM window manager and therefore
do not require a window \fIselect\fR or \fIfilter\fR option:
.IP \fBlistWorkspaces\fR 4
.IX Item "listWorkspaces"
List the names of all workspaces.
.IP \fBcurrent\fR 4
.IX Item "current"
Show the number and name of the current workspace.
.IP "\fBgoto\fR \fIWORKSPACE\fR" 4
.IX Item "goto WORKSPACE"
Change the current workspace to \fIWORKSPACE\fR. Specify \f(CW\*(C`next\*(C'\fR for the
subsequent workspace or \f(CW\*(C`prev\*(C'\fR for the preceding workspace.
.IP "\fBworkspaces\fR [\fICOUNT\fR]" 4
.IX Item "workspaces [COUNT]"
Print the number of workspaces if \fICOUNT\fR is not given,
otherwise set the number of workspaces to \fICOUNT\fR.
.IP "\fBsetWorkspaceName\fR \fIINDEX\fR \fINAME\fR" 4
.IX Item "setWorkspaceName INDEX NAME"
Change the name of the workspace \fIINDEX\fR to \fINAME\fR, where \fIINDEX\fR is
a workspace number starting from zero.
.IP "\fBsetWorkspaceNames\fR \fINAME\fR [\fINAME\fR]*" 4
.IX Item "setWorkspaceNames NAME [NAME]*"
Change the workspace names to the list of \fINAME\fRs.
.IP "\fBaddWorkspace\fR \fINAME\fR" 4
.IX Item "addWorkspace NAME"
Create a new workspace with name \fINAME\fR.
.IP "\fBdesktop\fR [\fISHOWING\fR]" 4
.IX Item "desktop [SHOWING]"
If \fISHOWING\fR is \f(CW1\fR then set \f(CW\*(C`showing the desktop\*(C'\fR mode.
If \fISHOWING\fR is \f(CW0\fR then turn off \f(CW\*(C`showing the desktop\*(C'\fR.
Print the current mode if \fISHOWING\fR is not given.
.IP \fBworkarea\fR 4
.IX Item "workarea"
Print the dimensions of the work area for the current workspace.
This is the desktop, but minus space occupied by dock and panel windows.
.IP \fBrandr\fR 4
.IX Item "randr"
Summarize the \fIRandR\fR configuration.
.IP \fBxinerama\fR 4
.IX Item "xinerama"
Summarize the \fIXinerama\fR configuration.
.IP \fBcheck\fR 4
.IX Item "check"
Print information about the current window manager, like name,
version, class, locale, command, host name and pid.
.IP \fBclients\fR 4
.IX Item "clients"
List all managed client windows, their titles and geometries.
.IP \fBshown\fR 4
.IX Item "shown"
List all mapped client windows for the current desktop,
their titles and geometries.
.IP \fBwindows\fR 4
.IX Item "windows"
List all toplevel windows, their titles and geometries.
.IP \fBsystray\fR 4
.IX Item "systray"
List applications that are managed by the IceWM system tray.
.IP \fBxembed\fR 4
.IX Item "xembed"
List application windows that are embedded using the \fIXEMBED\fR protocol.
This is another way to discover system tray applications.
.IP \fBlogout\fR 4
.IX Item "logout"
Let icewm execute the \f(CW\*(C`LogoutCommand\*(C'\fR.
.IP \fBreboot\fR 4
.IX Item "reboot"
Let icewm execute the \f(CW\*(C`RebootCommand\*(C'\fR.
.IP \fBshutdown\fR 4
.IX Item "shutdown"
Let icewm execute the \f(CW\*(C`ShutdownCommand\*(C'\fR.
.IP \fBcancel\fR 4
.IX Item "cancel"
Let icewm cancel the logout/reboot/shutdown.
.IP \fBabout\fR 4
.IX Item "about"
Let icewm show the about window.
.IP \fBwindowlist\fR 4
.IX Item "windowlist"
Let icewm show the window list window.
.IP \fBrestart\fR 4
.IX Item "restart"
Let icewm restart itself.
.IP \fBsuspend\fR 4
.IX Item "suspend"
Let icewm execute the \f(CW\*(C`SuspendCommand\*(C'\fR.
.IP \fBhibernate\fR 4
.IX Item "hibernate"
Let icewm execute the \f(CW\*(C`HibernateCommand\*(C'\fR.
.IP \fBwinoptions\fR 4
.IX Item "winoptions"
Let icewm reload the \f(CW\*(C`winoptions\*(C'\fR.
This only affects new windows.
.IP \fBkeys\fR 4
.IX Item "keys"
Let icewm reload the \f(CW\*(C`keys\*(C'\fR file.
.IP \fBrefresh\fR 4
.IX Item "refresh"
Let icewm refresh the desktop background.
.IP \fBguievents\fR 4
.IX Item "guievents"
Monitor the \fBICEWM_GUI_EVENT\fR property and report all changes.
Hit \f(CW\*(C`Ctrl+C\*(C'\fR to abort this and continue with the next command.
.IP "\fBdelay\fR [\fItime\fR]" 4
.IX Item "delay [time]"
Stop execution for \fItime\fR or 0.1 seconds.
.IP "\fBrunonce\fR \fIprogram\fR [\fIarguments...\fR]" 4
.IX Item "runonce program [arguments...]"
This action is meant to be used together with the \fB\-class\fR option.
Only if no window is matched by \fIWM_CLASS\fR then
\&\fIprogram\fR [\fIarguments...\fR] is executed.
.IP "\fBloop\fR [\fIcount\fR]" 4
.IX Item "loop [count]"
Loop back to the beginning of the command and repeat. The optional
\&\fIcount\fR limits the number of repetitions.
.IP \fBpick\fR 4
.IX Item "pick"
Choose a window by a mouse button click.
.IP \fBsync\fR 4
.IX Item "sync"
Synchronize with the IceWM window manager. That is, wait for icewm to
process all previous actions.
.IP \fBsymbols\fR 4
.IX Item "symbols"
List all named symbols.
.SS CONDITIONALS
.IX Subsection "CONDITIONALS"
Icesh supports \f(CW\*(C`if\-then\-else\*(C'\fR expressions. The full syntax is:
.PP
.Vb 9
\& if selection
\& then
\& actions
\& elif selection
\& then
\& actions
\& else
\& actions
\& end
.Ve
.PP
Where \f(CW\*(C`selection\*(C'\fR is a sequence of selection and filtering options,
which evaluates to \fBtrue\fR when it is non-empty. That is, if one or more
windows fulfilled the condition. If it is empty, then its \f(CW\*(C`actions\*(C'\fR
clause is ignored and the subsequent \f(CW\*(C`elif\*(C'\fR or \f(CW\*(C`else\*(C'\fR clause is tried
or taken. Each clause is optional.
.PP
Whenever a selection condition evaluates to \fBfalse\fR, the window selection
that existed before the \f(CW\*(C`if\*(C'\fR clause is immediately restored. This also
happens after an \f(CW\*(C`end\*(C'\fR clause.
.SS EXPRESSIONS
.IX Subsection "EXPRESSIONS"
Some of the window actions require one or two \fIEXPRESSION\fR arguments.
.ie n .IP "\fBEXPRESSION\fR ::= \fISYMBOL\fR | \fIEXPRESSION\fR { ""+"" | ""|"" } \fISYMBOL\fR" 4
.el .IP "\fBEXPRESSION\fR ::= \fISYMBOL\fR | \fIEXPRESSION\fR { \f(CW+\fR | \f(CW|\fR } \fISYMBOL\fR" 4
.IX Item "EXPRESSION ::= SYMBOL | EXPRESSION { + | | } SYMBOL"
.PP
Each \fISYMBOL\fR may be from one of the following applicable domains:
.IP "\fIWindow layer\fR" 4
.IX Item "Window layer"
Named symbols of the domain \fIWindow layer\fR (numeric range: 0\-15):
.Sp
.Vb 9
\& Desktop (0)
\& Below (2)
\& Normal (4)
\& OnTop (6)
\& Dock (8)
\& AboveDock (10)
\& Menu (12)
\& Fullscreen (14)
\& AboveAll (15)
.Ve
.Sp
These symbols are used with the \fILAYER\fR argument to the \f(CW\*(C`setLayer\*(C'\fR
action.
.IP "\fIIceWM tray option\fR" 4
.IX Item "IceWM tray option"
Named symbols of the domain \fIIceWM tray option\fR (numeric range: 0\-2):
.Sp
.Vb 3
\& Ignore (0)
\& Minimized (1)
\& Exclusive (2)
.Ve
.Sp
These symbols are used with the \fITRAYOPTION\fR argument to the
\&\f(CW\*(C`setTrayOption\*(C'\fR action.
.IP "\fIGravity symbols\fR" 4
.IX Item "Gravity symbols"
Named symbols for window and bit gravity (numeric range: 0\-10):
.Sp
.Vb 11
\& ForgetGravity (0)
\& NorthWestGravity (1)
\& NorthGravity (2)
\& NorthEastGravity (3)
\& WestGravity (4)
\& CenterGravity (5)
\& EastGravity (6)
\& SouthWestGravity (7)
\& SouthGravity (8)
\& SouthEastGravity (9)
\& StaticGravity (10)
.Ve
.IP "\fIMotif functions\fR" 4
.IX Item "Motif functions"
.Vb 6
\& All (1)
\& Resize (2)
\& Move (4)
\& Minimize (8)
\& Maximize (16)
\& Close (32)
.Ve
.IP "\fIMotif decorations\fR" 4
.IX Item "Motif decorations"
.Vb 7
\& All (1)
\& Border (2)
\& Resize (4)
\& Title (8)
\& Menu (16)
\& Minimize (32)
\& Maximize (64)
.Ve
.IP "\fIEWMH window state symbols\fR" 4
.IX Item "EWMH window state symbols"
Named symbols of the domain \fIEWMH state\fR (numeric range:
0\-8191):
.Sp
.Vb 10
\& ABOVE (1)
\& BELOW (2)
\& DEMANDS_ATTENTION (4)
\& FOCUSED (8)
\& FULLSCREEN (16)
\& HIDDEN (32)
\& MAXIMIZED_HORZ (64)
\& MAXIMIZED_VERT (128)
\& MODAL (256)
\& SHADED (512)
\& SKIP_PAGER (1024)
\& SKIP_TASKBAR (2048)
\& STICKY (4096)
.Ve
.SS EXAMPLES
.IX Subsection "EXAMPLES"
List all workspace names:
.PP
.Vb 1
\& icesh listWorkspaces
.Ve
.PP
Example output:
.PP
.Vb 4
\& workspace #0: \`main\*(Aq
\& workspace #1: \`web\*(Aq
\& workspace #2: \`doc\*(Aq
\& workspace #3: \`dev\*(Aq
.Ve
.PP
Close terminal work and activate terminal fun.
.PP
.Vb 1
\& icesh \-c work.XTerm close \-a \-c fun.XTerm activate
.Ve
.PP
Print opacity for all xterms.
.PP
.Vb 1
\& icesh \-c XTerm opacity
.Ve
.PP
Change opacity for all xterms.
.PP
.Vb 1
\& icesh \-c XTerm opacity 84
.Ve
.PP
Move all windows on workspace "Top" to the current workspace.
.PP
.Vb 1
\& icesh \-W "Top" setWorkspace "this"
.Ve
.PP
Restore all hidden clients, minimize all clients on the current
workspace and activate Firefox.
.PP
.Vb 1
\& icesh \-N HIDDEN restore \-a \-W "this" minimize \-a \-c Firefox activate
.Ve
.PP
Resize the focused window to occupy the right half of the desktop area.
.PP
.Vb 1
\& icesh \-f sizeto 49% 100% top right raise
.Ve
.PP
Toggle the frame border of the focused window.
.PP
.Vb 2
\& if icesh \-f motif | grep \-q \*(Aqdecor:$\*(Aq; then \e
\& icesh \-f motif decor All; else icesh \-f motif decor ""; fi
.Ve
.PP
Here is a different solution using conditionals.
.PP
.Vb 1
\& icesh \-f if \-P _NET_FRAME_EXTENTS=0 then bordered else borderless
.Ve
.PP
Here is a conditional to either toggle the visibility of a roxterm
that has a WM_ROLE value of \f(CW\*(C`special\*(C'\fR or start it with \fBrunonce\fR.
.PP
.Vb 4
\& icesh if \-c roxterm.Roxterm \-R special then \e
\& if \-v then hide \e
\& elif \-u then setWorkspace this activate end \e
\& else runonce roxterm \-\-role=special
.Ve
.PP
Collect all urxvt terminals from the fourth workspace in a single frame
on the current workspace.
.PP
.Vb 1
\& icesh \-W 3 \-c urxvt tabto myfunnyname
.Ve
.PP
Use the loop construct conditionally to wait for a certain window to
appear.
.PP
.Vb 1
\& icesh \-t if \-n Tooltip then list else delay 0.05 loop end
.Ve
.SS ENVIRONMENT
.IX Subsection "ENVIRONMENT"
.IP \fBDISPLAY\fR 4
.IX Item "DISPLAY"
The default display.
.SS "EXIT STATUS"
.IX Subsection "EXIT STATUS"
.IP \fB0\fR 4
.IX Item "0"
The last action completed successfully.
.IP \fB1\fR 4
.IX Item "1"
The last action completed unsuccessfully, or no window met the condition.
.IP \fB2\fR 4
.IX Item "2"
A conditional has invalid syntax.
.IP \fB3\fR 4
.IX Item "3"
The display could not be opened.
.IP \fB4\fR 4
.IX Item "4"
The X server reports an error while processing a request.
.SS COMPLIANCE
.IX Subsection "COMPLIANCE"
\&\fBicesh\fR is largely compliant with the EWMH and ICCCM specifications.
Some commands, like manager actions, are specific to IceWM.
.SS "SEE ALSO"
.IX Subsection "SEE ALSO"
\&\fBicewm\fR\|(1), \fBwmctrl\fR\|(1), \fBxdotool\fR\|(1), \fBxprop\fR\|(1),
\&\fBxwininfo\fR\|(1), \fBXParseGeometry\fR\|(3).
.SS BUGS
.IX Subsection "BUGS"
Please report bugs at <https://github.com/bbidulock/icewm/issues>.
.SS AUTHOR
.IX Subsection "AUTHOR"
Brian Bidulock <mailto:bidulock@openss7.org>.
.PP
See \fB\-\-copying\fR for full copyright notice and copying permissions.
.SS LICENSE
.IX Subsection "LICENSE"
\&\fBIceWM\fR is licensed under the GNU Library General Public License.
See the \fICOPYING\fR file in the distribution or use the \fB\-\-copying\fR flag
to display copying permissions.
|