forked from conformal/spectrwm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspectrwm.html
1532 lines (1528 loc) · 87.4 KB
/
spectrwm.html
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
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
Copyright (c) 2009-2012 Marco Peereboom <[email protected]>
Copyright (c) 2009 Darrin Chandler <[email protected]>
Copyright (c) 2011-2022 Reginald Kennedy <[email protected]>
Copyright (c) 2011-2012 Lawrence Teo <[email protected]>
Copyright (c) 2011-2012 Tiago Cunha <[email protected]>
Copyright (c) 2012 David Hill <[email protected]>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<style>
table.head, table.foot { width: 100%; }
td.head-rtitle, td.foot-os { text-align: right; }
td.head-vol { text-align: center; }
.Nd, .Bf, .Op { display: inline; }
.Pa, .Ad { font-style: italic; }
.Ms { font-weight: bold; }
.Bl-diag > dt { font-weight: bold; }
code.Nm, .Fl, .Cm, .Ic, code.In, .Fd, .Fn, .Cd { font-weight: bold;
font-family: inherit; }
</style>
<title>SPECTRWM(1)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">SPECTRWM(1)</td>
<td class="head-vol">General Commands Manual</td>
<td class="head-rtitle">SPECTRWM(1)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">spectrwm</code> — <span class="Nd">window
manager for X11</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<table class="Nm">
<tr>
<td><code class="Nm">spectrwm</code></td>
<td>[<code class="Fl">-c</code> <var class="Ar">file</var>]
[<code class="Fl">-v</code>]</td>
</tr>
</table>
</section>
<section class="Sh">
<h1 class="Sh" id="OPTIONS"><a class="permalink" href="#OPTIONS">OPTIONS</a></h1>
<dl class="Bl-tag">
<dt id="c"><a class="permalink" href="#c"><code class="Fl">-c</code></a>
<var class="Ar">file</var></dt>
<dd>Specify a configuration file to load instead of scanning for one.</dd>
<dt id="v"><a class="permalink" href="#v"><code class="Fl">-v</code></a></dt>
<dd>Print version and exit.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp"><code class="Nm">spectrwm</code> is a minimalistic window manager
that tries to stay out of the way so that valuable screen real estate can be
used for much more important stuff. It has sane defaults and does not
require one to learn a language to do any configuration. It was written by
hackers for hackers and it strives to be small, compact and fast.</p>
<p class="Pp">When <code class="Nm">spectrwm</code> starts up, it reads settings
from its configuration file, <span class="Pa">spectrwm.conf</span>. See the
<a class="Sx" href="#CONFIGURATION_FILES">CONFIGURATION FILES</a> section
below.</p>
<p class="Pp">The following notation is used throughout this page:</p>
<p class="Pp"></p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
<dt id="M"><a class="permalink" href="#M"><code class="Cm">M</code></a></dt>
<dd>Meta</dd>
<dt id="S"><a class="permalink" href="#S"><code class="Cm">S</code></a></dt>
<dd>Shift</dd>
<dt>⟨<code class="Cm">Name</code>⟩</dt>
<dd>Named key or button</dd>
</dl>
</div>
<p class="Pp"><code class="Nm">spectrwm</code> is very simple in its use. Most
of the actions are initiated via key or pointer button bindings. See the
<a class="Sx" href="#BINDINGS">BINDINGS</a> section below for defaults and
customizations.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="CONFIGURATION_FILES"><a class="permalink" href="#CONFIGURATION_FILES">CONFIGURATION
FILES</a></h1>
<p class="Pp"><code class="Nm">spectrwm</code> looks for the user-configuration
file in the following order:</p>
<p class="Pp"></p>
<ol class="Bl-enum Bd-indent Bl-compact">
<li><span class="Pa">$XDG_CONFIG_HOME/spectrwm/spectrwm.conf</span></li>
<li><span class="Pa">~/.config/spectrwm/spectrwm.conf</span> (if
<span class="Pa">$XDG_CONFIG_HOME</span> is either not set or empty)</li>
<li><span class="Pa">~/.spectrwm.conf</span>.</li>
</ol>
<p class="Pp">If the user-configuration file is not found,
<code class="Nm">spectrwm</code> then looks for the global configuration
file in the following order:</p>
<p class="Pp"></p>
<ol class="Bl-enum Bd-indent Bl-compact">
<li><span class="Pa">$XDG_CONFIG_DIRS/spectrwm/spectrwm.conf</span> (each
colon-separated directory in
<span class="Pa">$XDG_CONFIG_DIRS</span>)</li>
<li><span class="Pa">/etc/xdg/spectrwm/spectrwm.conf</span> (if
<span class="Pa">$XDG_CONFIG_DIRS</span> is either not set or empty)</li>
<li><span class="Pa">/etc/spectrwm.conf</span></li>
</ol>
<p class="Pp">The format of the file is</p>
<p class="Pp"></p>
<div class="Bd Bd-indent"><code class="Li"><var class="Ar">keyword</var>
<code class="Li">=</code> <var class="Ar">setting</var></code></div>
<p class="Pp">For example:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent"><code class="Li">color_focus = red</code></div>
<p class="Pp">Enabling or disabling an option is done by using 1 or 0
respectively.</p>
<p class="Pp">Colors need to be specified per the
<a class="Xr">XQueryColor(3)</a> specification.</p>
<p class="Pp">Mark option values may be wrapped in single/double quotes to
prevent whitespace trimming, specify empty strings, etc. Literal
quote/backslash characters can be escaped with backslash '\', when
needed.</p>
<p class="Pp">Comments begin with a #. When a literal
‘<code class="Li">#</code>’ is desired in an option, then it
must be escaped with a backslash, i.e. \#</p>
<p class="Pp">The file supports the following keywords:</p>
<dl class="Bl-tag">
<dt id="autorun"><a class="permalink" href="#autorun"><code class="Ic">autorun</code></a></dt>
<dd>Launch an application in a specified workspace at start-of-day. Defined in
the format
<code class="Li">ws</code>[<var class="Ar">idx</var>]:<var class="Ar">application</var>,
e.g. ws[2]:xterm launches an <a class="Xr">xterm(1)</a> in workspace 2.
<p class="Pp">Note that workspace mapping is handled via
<span class="Pa">libswmhack.so</span>. When
<code class="Ic">autorun</code> spawns windows via a daemon, ensure the
daemon is started with the correct <span class="Pa">LD_PRELOAD</span> in
its environment.</p>
<p class="Pp">For example, starting <a class="Xr">urxvtd(1)</a> via
<a class="Xr">xinit(1)</a>:</p>
<div class="Bd Pp Bd-indent Li">
<pre>LD_PRELOAD=/usr/lib/libswmhack.so.0.0 urxvtd -q -o -f</pre>
</div>
<p class="Pp">Spawned programs automatically have
<span class="Pa">LD_PRELOAD</span> set when executed.</p>
<p class="Pp">It is advised to check the man page of
<span class="Pa">ld.so</span> as <span class="Pa">LD_PRELOAD</span> is
sometimes ignored by some operating systems. A workaround is available,
e.g. launch an xterm(1) in workspace 2:</p>
<div class="Bd Pp Bd-indent Li">
<pre>autorun = ws[2]:xterm -name ws2
quirk[XTerm:ws2] = WS[2]</pre>
</div>
</dd>
<dt id="bar_action"><a class="permalink" href="#bar_action"><code class="Ic">bar_action</code></a></dt>
<dd>External script that populates additional information in the status bar,
such as battery life.</dd>
<dt id="bar_action_expand"><a class="permalink" href="#bar_action_expand"><code class="Ic">bar_action_expand</code></a></dt>
<dd>Process <code class="Ic">bar_format</code> character sequences in
<code class="Ic">bar_action</code> output; default is 0.</dd>
<dt id="bar_at_bottom"><a class="permalink" href="#bar_at_bottom"><code class="Ic">bar_at_bottom</code></a></dt>
<dd>Place the statusbar at the bottom of each region instead of the top.</dd>
<dt id="bar_border"><a class="permalink" href="#bar_border"><code class="Ic">bar_border</code></a>[<var class="Ar">x</var>]</dt>
<dd>Border color of the status bar(s) in screen <var class="Ar">x</var>.</dd>
<dt id="bar_border_unfocus"><a class="permalink" href="#bar_border_unfocus"><code class="Ic">bar_border_unfocus</code></a>[<var class="Ar">x</var>]</dt>
<dd>Border color of the status bar(s) on unfocused region(s) in screen
<var class="Ar">x</var>.</dd>
<dt id="bar_border_width"><a class="permalink" href="#bar_border_width"><code class="Ic">bar_border_width</code></a></dt>
<dd>Set status bar border thickness in pixels. Disable border by setting to
0.</dd>
<dt id="bar_color"><a class="permalink" href="#bar_color"><code class="Ic">bar_color</code></a>[<var class="Ar">x</var>]</dt>
<dd>Background color of the status bar(s) in screen <var class="Ar">x</var>.
<p class="Pp">A comma separated list of up to 10 colors can be specified.
The first value is used as the default background color. Any of these
colors can then be selected as a background color in the status bar
through the use of the markup sequence <code class="Ic">+@bg=n;</code>
where n is between 0 and 9.</p>
</dd>
<dt id="bar_color_selected"><a class="permalink" href="#bar_color_selected"><code class="Ic">bar_color_selected</code></a>[<var class="Ar">x</var>]</dt>
<dd>Background color for selections on the status bar(s) in screen
<var class="Ar">x</var>. Defaults to the value of
<code class="Ic">bar_border</code>.</dd>
<dt id="bar_enabled"><a class="permalink" href="#bar_enabled"><code class="Ic">bar_enabled</code></a></dt>
<dd>Set default <code class="Ic">bar_toggle</code> state; default is 1.</dd>
<dt id="bar_enabled_ws"><a class="permalink" href="#bar_enabled_ws"><code class="Ic">bar_enabled_ws</code></a>[<var class="Ar">x</var>]</dt>
<dd>Set default <code class="Ic">bar_toggle_ws</code> state on workspace
<var class="Ar">x</var>; default is 1.</dd>
<dt id="bar_font"><a class="permalink" href="#bar_font"><code class="Ic">bar_font</code></a></dt>
<dd>Fonts used in the status bar. Either Xft or X Logical Font Description
(XLFD) may be used to specify fonts. Fallback fonts may be specified by
separating each font with a comma. If all entries are in XLFD syntax, font
set will be used. If at least one entry is Xft, Xft will be used.
<p class="Pp">The default is to use font set.</p>
<p class="Pp">If Xft is used, a comma-separated list of up to 10 fonts can
be specified. The first entry is the default font. Any font defined here
can then be selected in the status bar through the use of the markup
sequence <code class="Ic">+@fn=n;</code> where n is between 0 and 9.</p>
<p class="Pp">Also note that <a class="Xr">dmenu(1)</a> prior to 4.6 does
not support Xft fonts.</p>
<p class="Pp">Xft examples:</p>
<div class="Bd Pp Bd-indent Li">
<pre>bar_font = Terminus:style=Regular:pixelsize=14:antialias=true
bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,Terminus:pixelsize=14,-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*</pre>
</div>
<p class="Pp">Font set examples:</p>
<div class="Bd Pp Bd-indent Li">
<pre>bar_font = -*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*
bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,-*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*,-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*</pre>
</div>
<p class="Pp">To list the available fonts in your system see
<a class="Xr">fc-list(1)</a> or <a class="Xr">xlsfonts(1)</a> manpages.
The <a class="Xr">xfontsel(1)</a> application can help with the XLFD
setting.</p>
</dd>
<dt id="bar_font_color"><a class="permalink" href="#bar_font_color"><code class="Ic">bar_font_color</code></a>[<var class="Ar">x</var>]</dt>
<dd>Foreground color of the status bar(s) in screen <var class="Ar">x</var>.
<p class="Pp">A comma separated list of up to 10 colors can be specified.
The first value is used as the default foreground color. Any of these
colors can then be selected as a foreground color in the status bar
through the use of the markup sequence <code class="Ic">+@fg=n;</code>
where n is between 0 and 9.</p>
</dd>
<dt id="bar_font_color_selected"><a class="permalink" href="#bar_font_color_selected"><code class="Ic">bar_font_color_selected</code></a>[<var class="Ar">x</var>]</dt>
<dd>Foreground color for selections on the status bar(s) in screen
<var class="Ar">x</var>. Defaults to the value of
<code class="Ic">bar_color</code>.</dd>
<dt id="bar_font_pua"><a class="permalink" href="#bar_font_pua"><code class="Ic">bar_font_pua</code></a></dt>
<dd>Specify a font to override the Unicode Private Use Area code points
(U+E000 -> U+F8FF, U+F0000 -> U+FFFFD, U+100000 -> U+10FFFD).
Some fonts use these code points to provide special icon glyphs. Available
only with Xft fonts.</dd>
<dt id="bar_format"><a class="permalink" href="#bar_format"><code class="Ic">bar_format</code></a></dt>
<dd>Set the bar format string, overriding <code class="Ic">clock_format</code>
and all of the <code class="Ic">enabled</code> options. The format is
passed through <a class="Xr">strftime(3)</a> before being used. It may
contain the following character sequences:
<table class="Bl-column Bd-indent">
<tr id="Character">
<td><a class="permalink" href="#Character"><b class="Sy">Character
sequence</b></a></td>
<td><a class="permalink" href="#Replaced"><b class="Sy" id="Replaced">Replaced
with</b></a></td>
</tr>
<tr id="+_">
<td><a class="permalink" href="#+_"><code class="Li">+<</code></a></td>
<td>Pad with a space</td>
</tr>
<tr id="+A">
<td><a class="permalink" href="#+A"><code class="Li">+A</code></a></td>
<td>Output of the external script</td>
</tr>
<tr id="+C">
<td><a class="permalink" href="#+C"><code class="Li">+C</code></a></td>
<td>Window class (from WM_CLASS)</td>
</tr>
<tr id="+D">
<td><a class="permalink" href="#+D"><code class="Li">+D</code></a></td>
<td>Workspace name</td>
</tr>
<tr id="+F">
<td><a class="permalink" href="#+F"><code class="Li">+F</code></a></td>
<td>Floating indicator</td>
</tr>
<tr id="+I">
<td><a class="permalink" href="#+I"><code class="Li">+I</code></a></td>
<td>Workspace index</td>
</tr>
<tr id="+L">
<td><a class="permalink" href="#+L"><code class="Li">+L</code></a></td>
<td>Workspace list indicator</td>
</tr>
<tr id="+M">
<td><a class="permalink" href="#+M"><code class="Li">+M</code></a></td>
<td>Number of iconic (minimized) windows in workspace</td>
</tr>
<tr id="+N">
<td><a class="permalink" href="#+N"><code class="Li">+N</code></a></td>
<td>Screen number</td>
</tr>
<tr id="+P">
<td><a class="permalink" href="#+P"><code class="Li">+P</code></a></td>
<td>Window class and instance separated by a colon</td>
</tr>
<tr id="+R">
<td><a class="permalink" href="#+R"><code class="Li">+R</code></a></td>
<td>Region index</td>
</tr>
<tr id="+S">
<td><a class="permalink" href="#+S"><code class="Li">+S</code></a></td>
<td>Stacking algorithm</td>
</tr>
<tr id="+T">
<td><a class="permalink" href="#+T"><code class="Li">+T</code></a></td>
<td>Window instance (from WM_CLASS)</td>
</tr>
<tr id="+U">
<td><a class="permalink" href="#+U"><code class="Li">+U</code></a></td>
<td>Urgency hint</td>
</tr>
<tr id="+V">
<td><a class="permalink" href="#+V"><code class="Li">+V</code></a></td>
<td>Program version</td>
</tr>
<tr id="+W">
<td><a class="permalink" href="#+W"><code class="Li">+W</code></a></td>
<td>Window name (from _NET_WM_NAME/WM_NAME)</td>
</tr>
<tr id="+__weight__justify_">
<td><a class="permalink" href="#+__weight__justify_"><code class="Li">+|[weight][justify]</code></a></td>
<td>Begin new section and reset markup sequence effects.
<p class="Pp"><code class="Ic">weight</code> is a positive integer used
to allocate horizontal space between 'L', 'C' and 'R' sections (see
justify). The default weight is 1.</p>
<p class="Pp"><code class="Ic">justify</code> can have the value L, C, R
or T. L, C, R are for left, center and right justified sections
respectively. A 'T' section will limit its space usage to fit to the
text. If no value is specified for a given section, the setting from
<code class="Ic">bar_justify</code> is used.</p>
</td>
</tr>
<tr id="++">
<td><a class="permalink" href="#++"><code class="Li">++</code></a></td>
<td>A literal ‘<code class="Li">+</code>’</td>
</tr>
<tr id="+@">
<td><a class="permalink" href="#+@"><code class="Li">+@</code></a></td>
<td>Prefix for text markup sequences</td>
</tr>
</table>
<p class="Pp">The currently recognized text markup sequences are:</p>
<table class="Bl-column Bd-indent">
<tr id="Character~2">
<td><a class="permalink" href="#Character~2"><b class="Sy">Character
sequence</b></a></td>
<td><a class="permalink" href="#Action"><b class="Sy" id="Action">Action</b></a></td>
</tr>
<tr id="+@fn=n;">
<td><a class="permalink" href="#+@fn=n;"><code class="Li">+@fn=n;</code></a></td>
<td>Selects font n (from 0 to 9) from
<code class="Ic">bar_font</code>.</td>
</tr>
<tr id="+@fg=n;">
<td><a class="permalink" href="#+@fg=n;"><code class="Li">+@fg=n;</code></a></td>
<td>Selects foreground color n (from 0 to 9) from
<code class="Ic">bar_font_color</code>.</td>
</tr>
<tr id="+@bg=n;">
<td><a class="permalink" href="#+@bg=n;"><code class="Li">+@bg=n;</code></a></td>
<td>Selects background color n (from 0 to 9) from
<code class="Ic">bar_color</code>.</td>
</tr>
<tr id="+@stp;">
<td><a class="permalink" href="#+@stp;"><code class="Li">+@stp;</code></a></td>
<td>Stops the interpretation of markup sequences. Any markup sequence
found after +@stp will appear as normal characters in the status
bar.</td>
</tr>
</table>
<p class="Pp">Note that markup sequences in
<code class="Ic">bar_action</code> script output will only be processed
if <code class="Ic">bar_action_expand</code> is enabled.</p>
<p class="Pp">All character sequences may limit its output to a specific
length, for example +64A. By default, no padding/alignment is done in
case the length of the replaced string is less than the specified length
(64 in the example). The padding/alignment can be enabled using a '_'
character in the sequence. For example: +_64W, +64_W and +_64_W enable
padding before (right alignment), after (left alignment), and both
before and after (center alignment) window name, respectively. Any
characters that do not match the specification are copied as-is.</p>
</dd>
<dt id="bar_justify"><a class="permalink" href="#bar_justify"><code class="Ic">bar_justify</code></a></dt>
<dd>Justify the status bar text. Possible values are
<var class="Ar">left</var>, <var class="Ar">center</var>, and
<var class="Ar">right</var>.
<p class="Pp">Note that if the output is not left justified, it may not be
properly aligned in some circumstances, due to the white-spaces in the
default static format. See the <code class="Ic">bar_format</code> option
for more details.</p>
</dd>
<dt id="bind"><a class="permalink" href="#bind"><code class="Ic">bind</code></a>[<var class="Ar">x</var>]</dt>
<dd>Bind key or button combo to action <var class="Ar">x</var>. See the
<a class="Sx" href="#BINDINGS">BINDINGS</a> section below.</dd>
<dt id="border_width"><a class="permalink" href="#border_width"><code class="Ic">border_width</code></a></dt>
<dd>Set window border thickness in pixels. Disable all borders by setting to
0.</dd>
<dt id="boundary_width"><a class="permalink" href="#boundary_width"><code class="Ic">boundary_width</code></a></dt>
<dd>Set region containment boundary width in pixels. This is how far a window
must be dragged/resized (with the pointer) beyond the region edge before
it is allowed outside the region. Disable the window containment effect by
setting to 0.</dd>
<dt id="clock_enabled"><a class="permalink" href="#clock_enabled"><code class="Ic">clock_enabled</code></a></dt>
<dd>Enable or disable displaying the clock in the status bar. Disable by
setting to 0 so a custom clock could be used in the
<code class="Ic">bar_action</code> script.</dd>
<dt id="color_focus"><a class="permalink" href="#color_focus"><code class="Ic">color_focus</code></a></dt>
<dd>Border color of the currently focused window. Default is red.</dd>
<dt id="color_focus_maximized"><a class="permalink" href="#color_focus_maximized"><code class="Ic">color_focus_maximized</code></a></dt>
<dd>Border color of the currently focused, maximized window. Defaults to the
value of <code class="Ic">color_focus</code>.</dd>
<dt id="color_unfocus"><a class="permalink" href="#color_unfocus"><code class="Ic">color_unfocus</code></a></dt>
<dd>Border color of unfocused windows, default is rgb:88/88/88.</dd>
<dt id="color_unfocus_maximized"><a class="permalink" href="#color_unfocus_maximized"><code class="Ic">color_unfocus_maximized</code></a></dt>
<dd>Border color of unfocused, maximized windows. Defaults to the value of
<code class="Ic">color_unfocus</code>.</dd>
<dt id="cycle_visible"><a class="permalink" href="#cycle_visible"><code class="Ic">cycle_visible</code></a></dt>
<dd>Include workspaces that are mapped when switching with
<code class="Ic">ws_next</code>, <code class="Ic">ws_prev</code>,
<code class="Ic">ws_next_all</code>, <code class="Ic">ws_prev_all</code>,
<code class="Ic">ws_next_move</code>, or
<code class="Ic">ws_prev_move</code>. Enable by setting to 1.
<p class="Pp">Note that mapped workspaces will be swapped unless
<code class="Ic">workspace_clamp</code> is enabled. If
<code class="Ic">warp_focus</code> is also enabled, focus will go to the
region where the workspace is mapped.</p>
</dd>
<dt id="dialog_ratio"><a class="permalink" href="#dialog_ratio"><code class="Ic">dialog_ratio</code></a></dt>
<dd>Some applications have dialogue windows that are too small to be useful.
This ratio is the screen size to what they will be resized. For example,
0.6 is 60% of the physical screen size.</dd>
<dt id="disable_border"><a class="permalink" href="#disable_border"><code class="Ic">disable_border</code></a></dt>
<dd>Remove border when bar is disabled and there is only one window on the
region. Enable by setting to 1. Setting this to
<var class="Ar">always</var> removes the border regardless of the bar
being enabled/disabled. Defaults to 0.</dd>
<dt id="focus_close"><a class="permalink" href="#focus_close"><code class="Ic">focus_close</code></a></dt>
<dd>Window to put focus when the focused window is closed. Possible values are
<var class="Ar">first</var>, <var class="Ar">next</var>,
<var class="Ar">previous</var> (default) and <var class="Ar">last</var>.
<var class="Ar">next</var> and <var class="Ar">previous</var> are relative
to the window that is closed.</dd>
<dt id="focus_close_wrap"><a class="permalink" href="#focus_close_wrap"><code class="Ic">focus_close_wrap</code></a></dt>
<dd>Whether to allow the focus to jump to the last window when the first
window is closed or vice versa. Disable by setting to 0.</dd>
<dt id="focus_default"><a class="permalink" href="#focus_default"><code class="Ic">focus_default</code></a></dt>
<dd>Window to put focus when no window has been focused. Possible values are
<var class="Ar">first</var> and <var class="Ar">last</var> (default).</dd>
<dt id="focus_mode"><a class="permalink" href="#focus_mode"><code class="Ic">focus_mode</code></a></dt>
<dd>Window focus behavior with respect to the pointer. Possible values:
<p class="Pp"></p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
<dt><var class="Ar">default</var></dt>
<dd>Set window focus on border crossings caused by cursor motion and
window interaction.</dd>
<dt><var class="Ar">follow</var></dt>
<dd>Set window focus on all cursor border crossings, including workspace
switches and changes to layout.</dd>
<dt><var class="Ar">manual</var></dt>
<dd>Set window focus on window interaction only.</dd>
</dl>
</div>
</dd>
<dt id="iconic_enabled"><a class="permalink" href="#iconic_enabled"><code class="Ic">iconic_enabled</code></a></dt>
<dd>Display the number of iconic (minimized) windows in the status bar. Enable
by setting to 1.</dd>
<dt id="keyboard_mapping"><a class="permalink" href="#keyboard_mapping"><code class="Ic">keyboard_mapping</code></a></dt>
<dd>Clear all key bindings (not button bindings) and load new bindings from
the specified file. This allows you to load pre-defined key bindings for
your keyboard layout. See the
<a class="Sx" href="#KEYBOARD_MAPPING_FILES">KEYBOARD MAPPING FILES</a>
section below for a list of keyboard mapping files that have been provided
for several keyboard layouts.
<p class="Pp">Note that <span class="Pa">/dev/null</span> can be specified
if you only want to clear bindings.</p>
</dd>
<dt id="layout"><a class="permalink" href="#layout"><code class="Ic">layout</code></a></dt>
<dd>Select layout to use at start-of-day. Defined in the format
<code class="Li">ws</code>[<var class="Ar">idx</var>]:<var class="Ar">master_grow</var>:<var class="Ar">master_add</var>:<var class="Ar">stack_inc</var>:<var class="Ar">always_raise</var>:<var class="Ar">stack_mode</var>,
e.g. ws[2]:-4:0:1:0:horizontal sets workspace 2 to the horizontal stack
mode, shrinks the master area by 4 ticks and adds one window to the stack,
while maintaining default floating window behavior. Possible
<var class="Ar">stack_mode</var> values are
<var class="Ar">vertical</var>, <var class="Ar">vertical_flip</var>,
<var class="Ar">horizontal</var>, <var class="Ar">horizontal_flip</var>
and <var class="Ar">max</var>.
<p class="Pp">See <code class="Ic">master_grow</code>,
<code class="Ic">master_shrink</code>,
<code class="Ic">master_add</code>, <code class="Ic">master_del</code>,
<code class="Ic">stack_inc</code>, <code class="Ic">stack_dec</code>,
<code class="Ic">stack_balance</code>, and
<code class="Ic">always_raise</code> for more information. Note that the
stacking options are complicated and have side-effects. One should
familiarize oneself with these commands before experimenting with the
<code class="Ic">layout</code> option.</p>
<p class="Pp">This setting is not retained at restart.</p>
</dd>
<dt id="maximize_hide_bar"><a class="permalink" href="#maximize_hide_bar"><code class="Ic">maximize_hide_bar</code></a></dt>
<dd>When set to 1, <code class="Ic">maximize_toggle</code> will also
hide/restore the bar visibility of the affected workspace. Defaults to
0.</dd>
<dt id="modkey"><a class="permalink" href="#modkey"><code class="Ic">modkey</code></a></dt>
<dd>Change the current modifier value of <code class="Ic">MOD</code> in
<code class="Ic">bind</code> entries that come later in the configuration
file. For existing bindings, the new value is substituted for the previous
value. Possible values are <var class="Ar">Mod1</var> (default),
<var class="Ar">Mod2</var>, <var class="Ar">Mod3</var>,
<var class="Ar">Mod4</var> and <var class="Ar">Mod5</var>.
<p class="Pp"><var class="Ar">Mod1</var> is generally the Alt key,
<var class="Ar">Mod2</var> is the Command key on macOS and
<var class="Ar">Mod4</var> is the Windows key on a PC. The current
modifier key mapping can be found by running xmodmap(1).</p>
</dd>
<dt id="name"><a class="permalink" href="#name"><code class="Ic">name</code></a></dt>
<dd>Set the name of a workspace at start-of-day. Defined in the format
<code class="Li">ws</code>[<var class="Ar">idx</var>]:<var class="Ar">name</var>,
e.g. ws[1]:Console sets the name of workspace 1 to
“Console”.</dd>
<dt id="program"><a class="permalink" href="#program"><code class="Ic">program</code></a>[<var class="Ar">p</var>]</dt>
<dd>Define new action to spawn a program <var class="Ar">p</var>. See the
<a class="Sx" href="#PROGRAMS">PROGRAMS</a> section below.</dd>
<dt id="quirk"><a class="permalink" href="#quirk"><code class="Ic">quirk</code></a>[<var class="Ar">c</var>[:<var class="Ar">i</var>[:<var class="Ar">n</var>]]]</dt>
<dd>Add "quirk" for windows with class <var class="Ar">c</var>,
instance <var class="Ar">i</var> (optional) and name
<var class="Ar">n</var> (optional). See the
<a class="Sx" href="#QUIRKS">QUIRKS</a> section below.</dd>
<dt id="region"><a class="permalink" href="#region"><code class="Ic">region</code></a></dt>
<dd>Allocates a custom region, removing any autodetected regions which occupy
the same space on the screen. Defined in the format
<code class="Li">screen</code>[<var class="Ar">idx</var>]:<var class="Ar">width</var>x<var class="Ar">height</var>+<var class="Ar">x</var>+<var class="Ar">y</var>,
e.g. screen[1]:800x1200+0+0.
<p class="Pp">To make a region span multiple monitors, create a region big
enough to cover them all, e.g. screen[1]:2048x768+0+0 makes the region
span two monitors with 1024x768 resolution sitting one next to the
other.</p>
</dd>
<dt id="region_padding"><a class="permalink" href="#region_padding"><code class="Ic">region_padding</code></a></dt>
<dd>Pixel width of empty space within region borders. Disable by setting to
0.</dd>
<dt id="spawn_position"><a class="permalink" href="#spawn_position"><code class="Ic">spawn_position</code></a></dt>
<dd>Position in stack to place newly spawned windows. Possible values are
<var class="Ar">first</var>, <var class="Ar">next</var>,
<var class="Ar">previous</var> and <var class="Ar">last</var> (default).
<var class="Ar">next</var> and <var class="Ar">previous</var> are relative
to the focused window.</dd>
<dt id="stack_enabled"><a class="permalink" href="#stack_enabled"><code class="Ic">stack_enabled</code></a></dt>
<dd>Enable or disable displaying the current stacking algorithm in the status
bar.</dd>
<dt id="stack_mark_horizontal"><a class="permalink" href="#stack_mark_horizontal"><code class="Ic">stack_mark_horizontal</code></a></dt>
<dd>Set the <var class="Ar">horizontal</var> layout mark for the
<code class="Ic">bar_format</code> stacking indicator (+S). Default is
'[-]'.</dd>
<dt id="stack_mark_horizontal_flip"><a class="permalink" href="#stack_mark_horizontal_flip"><code class="Ic">stack_mark_horizontal_flip</code></a></dt>
<dd>Set the <var class="Ar">horizontal_flip</var> layout mark for the
<code class="Ic">bar_format</code> stacking indicator (+S). Default is
'[v]'.</dd>
<dt id="stack_mark_max"><a class="permalink" href="#stack_mark_max"><code class="Ic">stack_mark_max</code></a></dt>
<dd>Set the <var class="Ar">max</var> layout mark for the
<code class="Ic">bar_format</code> stacking indicator (+S). Default is '[
]'.</dd>
<dt id="stack_mark_vertical"><a class="permalink" href="#stack_mark_vertical"><code class="Ic">stack_mark_vertical</code></a></dt>
<dd>Set the <var class="Ar">vertical</var> layout mark for the
<code class="Ic">bar_format</code> stacking indicator (+S). Default is
'[|]'.</dd>
<dt id="stack_mark_vertical_flip"><a class="permalink" href="#stack_mark_vertical_flip"><code class="Ic">stack_mark_vertical_flip</code></a></dt>
<dd>Set the <var class="Ar">vertical_flip</var> layout mark for the
<code class="Ic">bar_format</code> stacking indicator (+S). Default is
'[>]'.</dd>
<dt id="term_width"><a class="permalink" href="#term_width"><code class="Ic">term_width</code></a></dt>
<dd>Set a preferred minimum width for the terminal. If this value is greater
than 0, <code class="Nm">spectrwm</code> will attempt to adjust the font
sizes in the terminal to keep the terminal width above this number as the
window is resized. Only <a class="Xr">xterm(1)</a> is currently supported.
The <a class="Xr">xterm(1)</a> binary must not be setuid or setgid, which
it is by default on most systems. Users may need to set program[term] (see
the <a class="Sx" href="#PROGRAMS">PROGRAMS</a> section) to use an
alternate copy of the <a class="Xr">xterm(1)</a> binary without the setgid
bit set.</dd>
<dt id="tile_gap"><a class="permalink" href="#tile_gap"><code class="Ic">tile_gap</code></a></dt>
<dd>Pixel width of empty space between tiled windows. Negative values cause
overlap. Set this to the opposite of <code class="Ic">border_width</code>
to collapse the border between tiles. Disable by setting to 0.</dd>
<dt id="urgent_collapse"><a class="permalink" href="#urgent_collapse"><code class="Ic">urgent_collapse</code></a></dt>
<dd>Minimizes the space consumed by the urgency hint indicator by removing the
placeholders for non-urgent workspaces, the trailing space when there are
urgent windows and the default leading space. Enable by setting to 1.</dd>
<dt id="urgent_enabled"><a class="permalink" href="#urgent_enabled"><code class="Ic">urgent_enabled</code></a></dt>
<dd>Enable or disable the urgency hint indicator in the status bar. Note that
many terminal emulators require an explicit setting for the bell character
to trigger urgency on the window. In <a class="Xr">xterm(1)</a>, for
example, one needs to add the following line to
<span class="Pa">.Xdefaults</span>:
<div class="Bd Pp Bd-indent Li">
<pre>xterm.bellIsUrgent: true</pre>
</div>
</dd>
<dt id="verbose_layout"><a class="permalink" href="#verbose_layout"><code class="Ic">verbose_layout</code></a></dt>
<dd>Enable or disable displaying the current master window count and stack
column/row count in the status bar. Enable by setting to 1. See
<var class="Ar">master_add</var>, <var class="Ar">master_del</var>,
<var class="Ar">stack_inc</var> and <var class="Ar">stack_dec</var> for
more information.</dd>
<dt id="warp_focus"><a class="permalink" href="#warp_focus"><code class="Ic">warp_focus</code></a></dt>
<dd>Focus on the target window/workspace/region when clamped. For example,
when attempting to switch to a workspace that is mapped on another region
and <var class="Ar">workspace_clamp</var> is enabled, focus on the region
with the target workspace. Enable by setting to 1.</dd>
<dt id="warp_pointer"><a class="permalink" href="#warp_pointer"><code class="Ic">warp_pointer</code></a></dt>
<dd>Centers the pointer on the focused window when using bindings to change
focus, switch workspaces, change regions, etc. Enable by setting to
1.</dd>
<dt id="window_class_enabled"><a class="permalink" href="#window_class_enabled"><code class="Ic">window_class_enabled</code></a></dt>
<dd>Enable or disable displaying the window class name (from WM_CLASS) in the
status bar. Enable by setting to 1.</dd>
<dt id="window_instance_enabled"><a class="permalink" href="#window_instance_enabled"><code class="Ic">window_instance_enabled</code></a></dt>
<dd>Enable or disable displaying the window instance name (from WM_CLASS) in
the status bar. Enable by setting to 1.</dd>
<dt id="window_name_enabled"><a class="permalink" href="#window_name_enabled"><code class="Ic">window_name_enabled</code></a></dt>
<dd>Enable or disable displaying the window display name (from
_NET_WM_NAME/WM_NAME) in the status bar. Enable by setting to 1.
<p class="Pp">To prevent excessively large window names from pushing the
remaining text off the bar, it is limited to 64 characters, by default.
See the <code class="Ic">bar_format</code> option for more details.</p>
</dd>
<dt id="workspace_clamp"><a class="permalink" href="#workspace_clamp"><code class="Ic">workspace_clamp</code></a></dt>
<dd>Prevents workspaces from being swapped when attempting to switch to a
workspace that is mapped to another region. Use
<var class="Ar">warp_focus</var> if you want to focus on the region
containing the workspace and <var class="Ar">warp_pointer</var> if you
want to also send the pointer. Enable by setting to 1.</dd>
<dt id="workspace_indicator"><a class="permalink" href="#workspace_indicator"><code class="Ic">workspace_indicator</code></a></dt>
<dd>Configure the status bar workspace indicator. One or more of the following
options may be specified in a comma-separated list:
<p class="Pp"></p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
<dt><var class="Ar">listcurrent</var></dt>
<dd>Include the current workspace.</dd>
<dt><var class="Ar">listactive</var></dt>
<dd>Include workspaces with windows.</dd>
<dt><var class="Ar">listempty</var></dt>
<dd>Include empty workspaces.</dd>
<dt><var class="Ar">listnamed</var></dt>
<dd>Include named workspaces.</dd>
<dt><var class="Ar">listurgent</var></dt>
<dd>Include workspaces with urgent window(s).</dd>
<dt><var class="Ar">listall</var></dt>
<dd>Include all workspaces.</dd>
<dt><var class="Ar">hidecurrent</var></dt>
<dd>Always exclude the current workspace from the list.</dd>
<dt><var class="Ar">markcurrent</var></dt>
<dd>Indicate the current workspace if it is in the list.</dd>
<dt><var class="Ar">markactive</var></dt>
<dd>Indicate workspaces in the list that are active.</dd>
<dt><var class="Ar">markempty</var></dt>
<dd>Indicate workspaces in the list that are empty.</dd>
<dt><var class="Ar">markurgent</var></dt>
<dd>Indicate workspaces in the list that contain urgent window(s).</dd>
<dt><var class="Ar">printnames</var></dt>
<dd>Display the names of named workspaces in the list.</dd>
<dt><var class="Ar">noindexes</var></dt>
<dd>Hide the index of the workspaces.</dd>
</dl>
</div>
<p class="Pp">The default is
<var class="Ar">listcurrent</var>,<var class="Ar">listactive</var>,<var class="Ar">markcurrent</var>,<var class="Ar">printnames</var></p>
</dd>
<dt id="workspace_mark_active"><a class="permalink" href="#workspace_mark_active"><code class="Ic">workspace_mark_active</code></a></dt>
<dd>Set the 'active workspace' mark used in the
<code class="Ic">workspace_indicator</code>. Default is '^'.</dd>
<dt id="workspace_mark_current"><a class="permalink" href="#workspace_mark_current"><code class="Ic">workspace_mark_current</code></a></dt>
<dd>Set the 'current workspace' mark used in the
<code class="Ic">workspace_indicator</code>. Default is '*'.</dd>
<dt id="workspace_mark_empty"><a class="permalink" href="#workspace_mark_empty"><code class="Ic">workspace_mark_empty</code></a></dt>
<dd>Set the 'empty workspace' mark used in the
<code class="Ic">workspace_indicator</code>. Default is '-'.</dd>
<dt id="workspace_mark_urgent"><a class="permalink" href="#workspace_mark_urgent"><code class="Ic">workspace_mark_urgent</code></a></dt>
<dd>Set the 'urgent workspace' mark used in the
<code class="Ic">workspace_indicator</code>. Default is '!'.</dd>
<dt id="workspace_limit"><a class="permalink" href="#workspace_limit"><code class="Ic">workspace_limit</code></a></dt>
<dd>Set the total number of workspaces available. Minimum is 1, maximum is 22,
default is 10.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="STACK_MODES"><a class="permalink" href="#STACK_MODES">STACK
MODES</a></h1>
<dl class="Bl-tag">
<dt id="vertical"><a class="permalink" href="#vertical"><code class="Ic">vertical</code></a></dt>
<dd>Master area is on the left and stack area is on the right. Additional
windows are vertically tiled in stack area.</dd>
<dt><code class="Ic">vertical flipped</code></dt>
<dd>Same as above but stack and master areas are swapped.</dd>
<dt id="horizontal"><a class="permalink" href="#horizontal"><code class="Ic">horizontal</code></a></dt>
<dd>Master area is on the top and stack area is on the bottom. Additional
windows are horizontally tiled in stack area.</dd>
<dt><code class="Ic">horizontal flipped</code></dt>
<dd>Same as above but stack and master areas are swapped.</dd>
<dt id="max"><a class="permalink" href="#max"><code class="Ic">max</code></a></dt>
<dd>The focused window occupies the whole region, except for the bar (if
enabled).</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="WINDOW_STATES"><a class="permalink" href="#WINDOW_STATES">WINDOW
STATES</a></h1>
<p class="Pp">These can be set/unset by the corresponding
<code class="Ic">toggle</code> actions listed in the
<a class="Sx" href="#BINDINGS">BINDINGS</a> section below.</p>
<dl class="Bl-tag">
<dt id="floating"><a class="permalink" href="#floating"><code class="Ic">floating</code></a></dt>
<dd>The window is mapped above others and is not in a tile; it may be freely
resized and positioned.</dd>
<dt id="maximized"><a class="permalink" href="#maximized"><code class="Ic">maximized</code></a></dt>
<dd>The window occupies the whole region, except for the bar (if enabled and
<code class="Ic">maximize_hide_bar</code> is 0). Focusing another window
removes the maximized state of the window.</dd>
<dt id="fullscreen"><a class="permalink" href="#fullscreen"><code class="Ic">fullscreen</code></a></dt>
<dd>The window occupies the whole region. Focusing another window does not
remove the fullscreen state of the window.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="PROGRAMS"><a class="permalink" href="#PROGRAMS">PROGRAMS</a></h1>
<p class="Pp"><code class="Nm">spectrwm</code> allows you to define custom
actions to launch programs of your choice and then bind them the same as
with built-in actions. See the <a class="Sx" href="#BINDINGS">BINDINGS</a>
section below.</p>
<p class="Pp">Custom programs in the configuration file are specified as
follows:</p>
<p class="Pp"></p>
<div class="Bd Bd-indent"><code class="Li">program[<var class="Ar">action</var>]
= <var class="Ar">progpath</var> [<var class="Ar">arg</var>
[<var class="Ar">arg ...</var>]]</code></div>
<p class="Pp"><var class="Ar">action</var> is any identifier that does not
conflict with a built-in action or keyword, <var class="Ar">progpath</var>
is the desired program, and <var class="Ar">arg</var> is zero or more
arguments to the program.</p>
<p class="Pp">With the exception of '~' expansion, program calls are executed
as-is without any interpretation. A shell can be called to execute shell
commands. (e.g. sh -c 'command string').</p>
<p class="Pp">Remember that when using ‘<code class="Li">#</code>’
in your program call, it must be escaped with a backslash, i.e. \#</p>
<p class="Pp">The following argument variables are replaced with values at the
time the program is spawned:</p>
<p class="Pp"></p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
<dt id="$bar_border"><a class="permalink" href="#$bar_border"><code class="Cm">$bar_border</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="$bar_color"><a class="permalink" href="#$bar_color"><code class="Cm">$bar_color</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="$bar_color_selected"><a class="permalink" href="#$bar_color_selected"><code class="Cm">$bar_color_selected</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="$bar_font"><a class="permalink" href="#$bar_font"><code class="Cm">$bar_font</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="$bar_font_color"><a class="permalink" href="#$bar_font_color"><code class="Cm">$bar_font_color</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="$bar_font_color_selected"><a class="permalink" href="#$bar_font_color_selected"><code class="Cm">$bar_font_color_selected</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="$color_focus"><a class="permalink" href="#$color_focus"><code class="Cm">$color_focus</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="$color_unfocus"><a class="permalink" href="#$color_unfocus"><code class="Cm">$color_unfocus</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="$dmenu_bottom"><a class="permalink" href="#$dmenu_bottom"><code class="Cm">$dmenu_bottom</code></a></dt>
<dd>-b if <code class="Ic">bar_at_bottom</code> is enabled.</dd>
<dt id="$region_index"><a class="permalink" href="#$region_index"><code class="Cm">$region_index</code></a></dt>
<dd style="width: auto;"> </dd>
<dt id="$workspace_index"><a class="permalink" href="#$workspace_index"><code class="Cm">$workspace_index</code></a></dt>
<dd style="width: auto;"> </dd>
</dl>
</div>
<p class="Pp">Example:</p>
<div class="Bd Pp Bd-indent Li">
<pre>program[ff] = /usr/local/bin/firefox http://spectrwm.org/
bind[ff] = MOD+Shift+b # Now M-S-b launches firefox</pre>
</div>
<p class="Pp">To cancel the previous, unbind it:</p>
<div class="Bd Pp Bd-indent Li">
<pre>bind[] = MOD+Shift+b</pre>
</div>
<p class="Pp">Default programs:</p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
<dt id="term"><a class="permalink" href="#term"><code class="Cm">term</code></a></dt>
<dd>xterm</dd>
<dt id="lock"><a class="permalink" href="#lock"><code class="Cm">lock</code></a></dt>
<dd>xlock</dd>
<dt id="menu"><a class="permalink" href="#menu"><code class="Cm">menu</code></a></dt>
<dd>dmenu_run $dmenu_bottom -fn $bar_font -nb $bar_color -nf $bar_font_color
-sb $bar_color_selected -sf $bar_font_color_selected</dd>
<dt id="search"><a class="permalink" href="#search"><code class="Cm">search</code></a></dt>
<dd>dmenu $dmenu_bottom -i -fn $bar_font -nb $bar_color -nf $bar_font_color
-sb $bar_color_selected -sf $bar_font_color_selected</dd>
<dt id="name_workspace"><a class="permalink" href="#name_workspace"><code class="Cm">name_workspace</code></a></dt>
<dd>dmenu $dmenu_bottom -p Workspace -fn $bar_font -nb $bar_color -nf
$bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected</dd>
<dt id="initscr"><a class="permalink" href="#initscr"><code class="Cm">initscr</code></a></dt>
<dd>initscreen.sh # optional</dd>
<dt id="screenshot_all"><a class="permalink" href="#screenshot_all"><code class="Cm">screenshot_all</code></a></dt>
<dd>screenshot.sh full # optional</dd>
<dt id="screenshot_wind"><a class="permalink" href="#screenshot_wind"><code class="Cm">screenshot_wind</code></a></dt>
<dd>screenshot.sh window # optional</dd>
</dl>
</div>
<p class="Pp">Note that optional default programs will not be validated unless
overridden. If a default program fails validation, you can resolve the
exception by installing the program, modifying the program call or disabling
the program by freeing the respective binding.</p>
<p class="Pp">For example, to override <code class="Ic">lock</code>:</p>
<div class="Bd Pp Bd-indent Li">
<pre>program[lock] = xscreensaver-command -lock</pre>
</div>
<p class="Pp">To unbind <code class="Ic">lock</code> and prevent it from being
validated:</p>
<div class="Bd Pp Bd-indent Li">
<pre>bind[] = MOD+Shift+Delete</pre>
</div>
</section>
<section class="Sh">
<h1 class="Sh" id="BINDINGS"><a class="permalink" href="#BINDINGS">BINDINGS</a></h1>
<p class="Pp"><code class="Nm">spectrwm</code> provides many functions (or
actions) accessed via key or pointer button bindings.</p>
<p class="Pp">The default bindings are listed below:</p>
<p class="Pp"></p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
<dt>⟨<code class="Cm">Button1</code>⟩</dt>
<dd>focus</dd>
<dt id="M-"><a class="permalink" href="#M-"><code class="Cm">M-</code></a>⟨<code class="Cm">Button1</code>⟩</dt>
<dd>move</dd>
<dt id="M-~2"><a class="permalink" href="#M-~2"><code class="Cm">M-</code></a>⟨<code class="Cm">Button3</code>⟩</dt>
<dd>resize</dd>
<dt id="M-S-"><a class="permalink" href="#M-S-"><code class="Cm">M-S-</code></a>⟨<code class="Cm">Button3</code>⟩</dt>
<dd>resize_centered</dd>
<dt id="M-S-~2"><a class="permalink" href="#M-S-~2"><code class="Cm">M-S-</code></a>⟨<code class="Cm">Return</code>⟩</dt>
<dd>term</dd>
<dt id="M-p"><a class="permalink" href="#M-p"><code class="Cm">M-p</code></a></dt>
<dd>menu</dd>
<dt id="M-S-q"><a class="permalink" href="#M-S-q"><code class="Cm">M-S-q</code></a></dt>
<dd>quit</dd>
<dt id="M-q"><a class="permalink" href="#M-q"><code class="Cm">M-q</code></a></dt>
<dd>restart</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>restart_of_day</dd>
<dt id="M-~3"><a class="permalink" href="#M-~3"><code class="Cm">M-</code></a>⟨<code class="Cm">Space</code>⟩</dt>
<dd>cycle_layout</dd>
<dt><code class="Cm">M-S-\</code></dt>
<dd>flip_layout</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>layout_vertical</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>layout_horizontal</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>layout_max</dd>
<dt id="M-S-~3"><a class="permalink" href="#M-S-~3"><code class="Cm">M-S-</code></a>⟨<code class="Cm">Space</code>⟩</dt>
<dd>stack_reset</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>stack_balance</dd>
<dt id="M-h"><a class="permalink" href="#M-h"><code class="Cm">M-h</code></a></dt>
<dd>master_shrink</dd>
<dt id="M-l"><a class="permalink" href="#M-l"><code class="Cm">M-l</code></a></dt>
<dd>master_grow</dd>
<dt id="M-,"><a class="permalink" href="#M-,"><code class="Cm">M-,</code></a></dt>
<dd>master_add</dd>
<dt id="M-."><a class="permalink" href="#M-."><code class="Cm">M-.</code></a></dt>
<dd>master_del</dd>
<dt id="M-S-,"><a class="permalink" href="#M-S-,"><code class="Cm">M-S-,</code></a></dt>
<dd>stack_inc</dd>
<dt id="M-S-."><a class="permalink" href="#M-S-."><code class="Cm">M-S-.</code></a></dt>
<dd>stack_dec</dd>
<dt id="M-~4"><a class="permalink" href="#M-~4"><code class="Cm">M-</code></a>⟨<code class="Cm">Return</code>⟩</dt>
<dd>swap_main</dd>
<dt id="M-j"><a class="permalink" href="#M-j"><code class="Cm">M-j</code></a>,
<code class="Cm">M-</code>⟨<code class="Cm">TAB</code>⟩</dt>
<dd>focus_next</dd>
<dt id="M-k"><a class="permalink" href="#M-k"><code class="Cm">M-k</code></a>,
<code class="Cm">M-S-</code>⟨<code class="Cm">TAB</code>⟩</dt>
<dd>focus_prev</dd>
<dt id="M-m"><a class="permalink" href="#M-m"><code class="Cm">M-m</code></a></dt>
<dd>focus_main</dd>
<dt id="M-u"><a class="permalink" href="#M-u"><code class="Cm">M-u</code></a></dt>
<dd>focus_urgent</dd>
<dt id="M-S-j"><a class="permalink" href="#M-S-j"><code class="Cm">M-S-j</code></a></dt>
<dd>swap_next</dd>
<dt id="M-S-k"><a class="permalink" href="#M-S-k"><code class="Cm">M-S-k</code></a></dt>
<dd>swap_prev</dd>
<dt id="M-b"><a class="permalink" href="#M-b"><code class="Cm">M-b</code></a></dt>
<dd>bar_toggle</dd>
<dt id="M-S-b"><a class="permalink" href="#M-S-b"><code class="Cm">M-S-b</code></a></dt>
<dd>bar_toggle_ws</dd>
<dt id="M-x"><a class="permalink" href="#M-x"><code class="Cm">M-x</code></a></dt>
<dd>wind_del</dd>
<dt id="M-S-x"><a class="permalink" href="#M-S-x"><code class="Cm">M-S-x</code></a></dt>
<dd>wind_kill</dd>
<dt id="M-~5"><a class="permalink" href="#M-~5"><code class="Cm">M-</code></a>⟨<var class="Ar">1-9,0,F1-F12</var>⟩</dt>
<dd>ws_⟨<var class="Ar">1-22</var>⟩</dd>
<dt id="M-S-~4"><a class="permalink" href="#M-S-~4"><code class="Cm">M-S-</code></a>⟨<var class="Ar">1-9,0,F1-F12</var>⟩</dt>
<dd>mvws_⟨<var class="Ar">1-22</var>⟩</dd>
<dt id="M-~6"><a class="permalink" href="#M-~6"><code class="Cm">M-</code></a>⟨<var class="Ar">Keypad
1-9</var>⟩</dt>
<dd>rg_⟨<var class="Ar">1-9</var>⟩</dd>
<dt id="M-S-~5"><a class="permalink" href="#M-S-~5"><code class="Cm">M-S-</code></a>⟨<var class="Ar">Keypad
1-9</var>⟩</dt>
<dd>mvrg_⟨<var class="Ar">1-9</var>⟩</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>mvrg_next</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>mvrg_prev</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>ws_empty</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>ws_empty_move</dd>
<dt id="M-~7"><a class="permalink" href="#M-~7"><code class="Cm">M-</code></a>⟨<code class="Cm">Right</code>⟩</dt>
<dd>ws_next</dd>
<dt id="M-~8"><a class="permalink" href="#M-~8"><code class="Cm">M-</code></a>⟨<code class="Cm">Left</code>⟩</dt>
<dd>ws_prev</dd>
<dt id="M-~9"><a class="permalink" href="#M-~9"><code class="Cm">M-</code></a>⟨<code class="Cm">Up</code>⟩</dt>
<dd>ws_next_all</dd>
<dt id="M-~10"><a class="permalink" href="#M-~10"><code class="Cm">M-</code></a>⟨<code class="Cm">Down</code>⟩</dt>
<dd>ws_prev_all</dd>
<dt id="M-a"><a class="permalink" href="#M-a"><code class="Cm">M-a</code></a></dt>
<dd>ws_prior</dd>
<dt id="M-S-~6"><a class="permalink" href="#M-S-~6"><code class="Cm">M-S-</code></a>⟨<code class="Cm">Down</code>⟩</dt>
<dd>ws_prev_move</dd>
<dt id="M-S-~7"><a class="permalink" href="#M-S-~7"><code class="Cm">M-S-</code></a>⟨<code class="Cm">Up</code>⟩</dt>
<dd>ws_next_move</dd>
<dt id="M-S-~8"><a class="permalink" href="#M-S-~8"><code class="Cm">M-S-</code></a>⟨<code class="Cm">Right</code>⟩</dt>
<dd>rg_next</dd>
<dt id="M-S-~9"><a class="permalink" href="#M-S-~9"><code class="Cm">M-S-</code></a>⟨<code class="Cm">Left</code>⟩</dt>
<dd>rg_prev</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>rg_move_next</dd>
<dt>⟨<var class="Ar">unbound</var>⟩</dt>
<dd>rg_move_prev</dd>
<dt id="M-s"><a class="permalink" href="#M-s"><code class="Cm">M-s</code></a></dt>
<dd>screenshot_all</dd>
<dt id="M-S-s"><a class="permalink" href="#M-S-s"><code class="Cm">M-S-s</code></a></dt>
<dd>screenshot_wind</dd>
<dt id="M-S-v"><a class="permalink" href="#M-S-v"><code class="Cm">M-S-v</code></a></dt>
<dd>version</dd>
<dt id="M-t"><a class="permalink" href="#M-t"><code class="Cm">M-t</code></a></dt>
<dd>float_toggle</dd>
<dt id="M-S-~10"><a class="permalink" href="#M-S-~10"><code class="Cm">M-S-</code></a>⟨<code class="Cm">Delete</code>⟩</dt>
<dd>lock</dd>
<dt id="M-S-i"><a class="permalink" href="#M-S-i"><code class="Cm">M-S-i</code></a></dt>
<dd>initscr</dd>
<dt id="M-w"><a class="permalink" href="#M-w"><code class="Cm">M-w</code></a></dt>
<dd>iconify</dd>
<dt id="M-S-w"><a class="permalink" href="#M-S-w"><code class="Cm">M-S-w</code></a></dt>
<dd>uniconify</dd>
<dt id="M-e"><a class="permalink" href="#M-e"><code class="Cm">M-e</code></a></dt>
<dd>maximize_toggle</dd>
<dt id="M-S-e"><a class="permalink" href="#M-S-e"><code class="Cm">M-S-e</code></a></dt>
<dd>fullscreen_toggle</dd>
<dt id="M-r"><a class="permalink" href="#M-r"><code class="Cm">M-r</code></a></dt>
<dd>raise</dd>
<dt id="M-S-r"><a class="permalink" href="#M-S-r"><code class="Cm">M-S-r</code></a></dt>
<dd>always_raise</dd>
<dt id="M-v"><a class="permalink" href="#M-v"><code class="Cm">M-v</code></a></dt>
<dd>button2</dd>
<dt id="M--"><a class="permalink" href="#M--"><code class="Cm">M--</code></a></dt>
<dd>width_shrink</dd>
<dt id="M-="><a class="permalink" href="#M-="><code class="Cm">M-=</code></a></dt>
<dd>width_grow</dd>
<dt id="M-S--"><a class="permalink" href="#M-S--"><code class="Cm">M-S--</code></a></dt>
<dd>height_shrink</dd>
<dt id="M-S-="><a class="permalink" href="#M-S-="><code class="Cm">M-S-=</code></a></dt>
<dd>height_grow</dd>
<dt id="M-_"><a class="permalink" href="#M-_"><code class="Cm">M-[</code></a></dt>
<dd>move_left</dd>
<dt id="M-_~2"><a class="permalink" href="#M-_~2"><code class="Cm">M-]</code></a></dt>
<dd>move_right</dd>
<dt id="M-S-_"><a class="permalink" href="#M-S-_"><code class="Cm">M-S-[</code></a></dt>
<dd>move_up</dd>
<dt id="M-S-_~2"><a class="permalink" href="#M-S-_~2"><code class="Cm">M-S-]</code></a></dt>
<dd>move_down</dd>
<dt id="M-S-/"><a class="permalink" href="#M-S-/"><code class="Cm">M-S-/</code></a></dt>
<dd>name_workspace</dd>
<dt id="M-/"><a class="permalink" href="#M-/"><code class="Cm">M-/</code></a></dt>
<dd>search_workspace</dd>
<dt id="M-f"><a class="permalink" href="#M-f"><code class="Cm">M-f</code></a></dt>
<dd>search_win</dd>
</dl>
</div>
<p class="Pp">The action names and descriptions are listed below:</p>
<p class="Pp"></p>
<div class="Bd-indent">
<dl class="Bl-tag Bl-compact">
<dt id="focus"><a class="permalink" href="#focus"><code class="Cm">focus</code></a></dt>
<dd>Focus window/region under pointer.</dd>
<dt id="move"><a class="permalink" href="#move"><code class="Cm">move</code></a></dt>
<dd>Move window with pointer while binding is pressed.</dd>