forked from stumpwm/stumpwm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstumpwm.texi.in
3092 lines (2479 loc) · 93.3 KB
/
stumpwm.texi.in
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
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename stumpwm.info
@settitle StumpWM Manual
@setchapternewpage odd
@c %**end of header
@dircategory X11
@direntry
* StumpWM: (stumpwm). A Common Lisp window manager
@end direntry
@ifinfo
This is the Stump Window Manager user manual.
Copyright @copyright{} 2000-2008 Shawn Betts
Copyright @copyright{} 2014 David Bjergaard
Permission is granted to make and distribute verbatim
copies of this manual provided the copyright notice and
this permission notice are preserved on all copies.
@ignore
Permission is granted to process this file through TeX
and print the results, provided the printed document
carries a copying permission notice identical to this
one except for the removal of this paragraph (this
paragraph not being relevant to the printed manual).
@end ignore
Permission is granted to copy and distribute modified
versions of this manual under the conditions for
verbatim copying, provided also that the sections
entitled ``Copying'' and ``GNU General Public License''
are included exactly as in the original, and provided
that the entire resulting derived work is distributed
under the terms of a permission notice identical to this
one.
Permission is granted to copy and distribute
translations of this manual into another language,
under the above conditions for modified versions,
except that this permission notice may be stated in a
translation approved by the Free Software Foundation.
@end ifinfo
@iftex
@kbdinputstyle code
@end iftex
@titlepage
@sp 10
@titlefont{The Stump Window Manager}
@author Shawn Betts, David Bjergaard
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 2000-2008 Shawn Betts
Copyright @copyright{} 2014 David Bjergaard
Permission is granted to make and distribute verbatim
copies of this manual provided the copyright notice and
this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified
versions of this manual under the conditions for
verbatim copying, provided also that the sections
entitled ``Copying'' and ``GNU General Public License''
are included exactly as in the original, and provided
that the entire resulting derived work is distributed
under the terms of a permission notice identical to this
one.
Permission is granted to copy and distribute
translations of this manual into another language,
under the above conditions for modified versions,
except that this permission notice may be stated in a
translation approved by the Free Software Foundation.
@end titlepage
@node Top, Introduction, (dir), (dir)
@ifinfo
This document explains how to use The Stump Window Manager.
@end ifinfo
@menu
* Introduction::
* Key Bindings::
* Commands::
* Message and Input Bar::
* Windows::
* Frames::
* Mode-line::
* Groups::
* Screens::
* Internals::
* Interacting With Unix::
* Interacting With X11::
* Miscellaneous Commands::
* Colors::
* Hooks::
* Modules::
* Hacking::
* Advanced Configuration::
* Command and Function Index::
* Variable Index::
@detailmenu
--- The Detailed Node Listing ---
Introduction
* Starting StumpWM::
* Basic Usage::
* Basic Concepts::
* Manipulating Frames and Windows::
* Interacting with the Lisp process::
* Init File::
* Contact the StumpWM developers::
Basic Concepts
* Screens and Heads::
* Group Basics::
* Floating Group Basics::
* Dynamic Group Basics::
* Frame Basics::
* Window Basics::
* System Trays and the Mode Line::
Manipulating Frames and Windows
* Moving Between Frames::
* Manipulating Windows::
Key Bindings
* List of Default Keybindings::
* Binding Keys::
* Modifiers::
* Remapped Keys::
Commands
* Writing Commands::
* StumpWM Types::
Message and Input Bar
* Customizing The Bar::
* Using The Input Bar::
* Programming The Message Bar::
* Programming the Input Bar::
Windows
* Window Marks::
* Customizing Window Appearance::
* Controlling Raise And Map Requests::
* Programming With Windows::
* Rule Based Window Placement::
* Window Selection Expressions::
Frames
* Interactively Resizing Frames::
* Frame Dumping::
Groups
* Customizing Groups::
Screens
* External Monitors::
* Programming With Screens::
Internals
* IO Loop::
Miscellaneous Commands
* Menus::
* StumpWM's Data Directory::
* Debugging StumpWM::
* Sending a Bug Report::
* Timers::
* Getting Help::
Colors
* Behind The Scenes Look At Colors::
Modules
* Writing Modules::
Hacking
* General Advice::
* Adding Documentation and Editing This Manual::
* Using git with StumpWM::
* Sending Patches::
@end detailmenu
@end menu
@node Introduction, Key Bindings, Top, Top
@chapter Introduction
StumpWM is a manual, tiling X11 window manager written entirely in
Common Lisp. Unlike traditional window managers, StumpWM places
windows in order to maximize the amount of the screen used. The
window layouts managed by StumpWM are defined by the user in much the
same way that windows are managed by GNU screen, or emacs.
Before StumpWM, there was ratpoison, another tiling window manager
written entirely in C. StumpWM grew out of the authors' frustration
with writing ratpoison in C. Very quickly we realized we were building
into ratpoison lispy-emacs style paradigms. StumpWM's goals are
similar to ratpoison's but with an emphasis on customizability,
completeness, and cushiness.
@menu
* Starting StumpWM::
* Basic Usage::
* Basic Concepts::
* Manipulating Frames and Windows::
* Interacting with the Lisp process::
* Init File::
* Contact the StumpWM developers::
@end menu
@node Starting StumpWM, Basic Usage, Introduction, Introduction
@section Starting StumpWM
There are a number of ways to start StumpWM but the most straight
forward method is as follows. This assumes you have a copy of the
StumpWM source code and are using the @samp{SBCL} Common Lisp
environment.
@enumerate
@item
Install the prerequisites and build StumpWM as described in
@file{README}. This should give you a @file{stumpwm} executable.
@item
In your @file{~/.xinitrc} file include the line
@command{/path/to/stumpwm}. Remember to replace @samp{/path/to/}
with the actual path.
@item
Finally, start X windows with @command{startx}. Cross your
fingers. You should see a @samp{Welcome To the Stump Window Manager}
message pop up in the upper, right corner. At this point, you have
successfully started StumpWM.
@end enumerate
@@@ stumpwm
@node Basic Usage, Basic Concepts, Starting StumpWM, Introduction
@section Basic Usage
Once you have StumpWM up and running, the first thing you might want
to do is start @command{emacs}. Type @kbd{C-t e}, or in other words
@kbd{Control + t} followed by @kbd{e}. Now perhaps you want an
@command{xterm}. Type @kbd{C-t c}. Now you have some programs running.
To see a list of windows StumpWM is managing, type @kbd{C-t w}. The
highlighted window is the one you're looking at right now. It's the
focused window.
All of StumpWM's keys are bound to named commands, which can be
executed not only by keys but also from the input bar. Type @kbd{C-t
;} to open a command prompt. Now type @command{time} and press
return. Note, @command{time} can also be called by typing @kbd{C-t a}.
Throughout this manual you'll find definitions for commands,
functions, and variables. Any command you see in this manual can be
executed from the input bar or bound to a key.
At this point you probably want to switch back from your new
@command{xterm} to @command{emacs}. Type @kbd{C-t C-t}. This runs the
@command{other} command. Type it again and you're back to xterm.
Perhaps you'd like to see @command{emacs} and @command{xterm}
side-by-side. Type @kbd{C-t s}. You have now split the screen into 2
@command{frames}. For more information see @ref{Frames}. To switch to the
empty frame type @kbd{C-t TAB}. Now let's pull the xterm window into
this empty frame. Type @kbd{C-t w} for a window listing. Find the
@command{xterm} window. See the number beside it? Type @kbd{C-t} followed
by @command{xterm}'s window number.
Another common activity is browsing the internet. Type @kbd{C-t !}.
The input bar pops up again. You can now run a shell command. Let's
start a web browser: type @command{firefox} into the input bar and press
return.
Unfortunately, @command{firefox} probably isn't wide enough because it's
in one of the frames. Type @kbd{C-t Q} to remove all frames but the
current one and resize it to fit the screen.
For a full list of key bindings, see @ref{List of Default Keybindings}.
@node Basic Concepts, Manipulating Frames and Windows, Basic Usage, Introduction
@section Basic Concepts
An introduction to some of the basic concepts used by StumpWM.
@menu
* Screens and Heads::
* Group Basics::
* Floating Group Basics::
* Dynamic Group Basics::
* Frame Basics::
* Window Basics::
* System Trays and the Mode Line::
@end menu
@node Screens and Heads, Group Basics, Basic Concepts, Basic Concepts
@subsection Screens and Heads
A screen is an Xlib concept representing a section of video memory
onto which physical monitors, called ``heads'', are mapped. A screen can
be thought of as an abstract rectangle containing all the heads
arranged in a particular layout.
With most modern systems, you'll only have a single screen no matter
how many heads are connected to your computer. Each head will have its
own frame, and you can move between heads using the normal frame
movement commands.
The layout of the heads within the screen can be specified in one of two
ways: either at startup using your system's Xorg configuration files, or
on the fly using tools like XRandR. If the computer is booted with
multiple monitors attached, but without specifying a layout for them,
they will all show identical output.
StumpWM will attempt to detect the layout of the heads once at
startup, or any time a RandR command is issued.
In rarer setups you may have multiple screens, with one head per
screen. That means that you'll move between heads using screen
movement commands (`snext', `sprev', and `sother') rather than frame
movement commands.
@node Group Basics, Floating Group Basics, Screens and Heads, Basic Concepts
@subsection Group Basics
A group is usually referred to as a ``desktop'' or ``workspace'' in other
window managers. StumpWM starts with a single group, called ``Default''.
Each group has its own configuration of frames and windows that is
separate from and independent of other groups. You can't have
different groups display in different monitors: when you switch
groups, all monitors switch to that group.
Each group contains an ordered list of frames.
@node Floating Group Basics, Dynamic Group Basics, Group Basics, Basic Concepts
@subsection Floating Group Basics
Within a floating group, windows behave more like they do in traditional
window managers: rather than being arranged into frames, they each have
their own box, which can be freely resized and repositioned, and allowed
to overlap. Each window has a thicker border at the top. Left click in
this border and drag to move the window, or right click and drag to
resize it.
A modifier key can be used to perform the move and resize operations
by clicking in the window itself instead of on its top border. The
default modifier is super, and can be configured with
@var{*float-window-modifier*}.
### *float-window-modifier*
Most of the window-switching commands listed below do not function in
a floating group. You're restricted to `other', the `select-window-*'
commands, and `windowlist'.
@node Dynamic Group Basics, Frame Basics, Floating Group Basics, Basic Concepts
@subsection Dynamic Group Basics
Within a dynamic group, windows are automatically tiled. Windows get divided
into a @dfn{master window} and a @dfn{window stack}. Together these form a
@dfn{window wheel} which can be rotated. Each window is a top-level window, and
has a frame to itself. As windows are added to the group, the current master
window gets pushed onto the window stack, and the newest window takes its place.
This causes the frames holding the stack windows to get progressively smaller
the more windows are added to the group. When a window stack frame becomes to
small to split, the window at the bottom of the stack gets sent to an overflow
group. This behavior can be configured with
@var{*dynamic-group-overflow-policy*}.
### *dynamic-group-overflow-policy*
### *dynamic-overflow-group*
### *dynamic-group-master-split-ratio*
Normal tiling group window and frame commands dont work within a dynamic group,
being supplanted by the following group specific selection, rotation,
and swapping commands.
@itemize
@item
@command{dyn-cycle} (@kbd{C-t n} or @kbd{C-t p}) Rotate the
window wheel clockwise or counterclockwise. Takes an optional argument to
control where focus lays after rotating, one of :master, :remain, or :follow.
@item
@command{dyn-switch} (@kbd{C-t W}) Prompt for a window number to swap with the
master window
@item
@command{dyn-switch-prompt-for-window} (@kbd{C-t w}) Displays window numbers on
each frame: hit a number key or click on a window to swap it with the master
window.
@item
@command{dyn-switch-prompt-for-frame} (unbound by default) The same as
@command{dyn-switch-prompt-for-window}, but draws frame numbers.
@item
@command{dyn-focus-current-window} (@kbd{C-t RET}) Swap the current window with
the master window.
@item
@command{dyn-focus-master-window} (@kbd{C-t f}) Move focus to the master window.
@end itemize
When defining commands, anything restricted to tiling groups will also be
active in dynamic groups. To fully restrict it to tiling groups, call the
function dyn-blacklist-command on the command in question.
@node Frame Basics, Window Basics, Floating Group Basics, Basic Concepts
@subsection Frame Basics
Frames are the boxes within which windows are displayed. StumpWM
starts with a single frame per head, meaning that each monitor shows a
single window, full screen. If you want to see windows side-by-side,
you can ``split'' this frame in two, either vertically or horizontally.
These frames can be further split, creating nested boxes.
Technically speaking, frames live within a ``frame tree''. When you
split a frame, the command actually creates @emph{two} new frames
side-by-side within the original parent frame. This makes no practical
difference, unless you use the `sibling' command, which will move to
the other child frame within the parent frame.
Within this frame tree model, all frames either contain other frames,
or windows. The command `fclear' will hide all a frame's windows and
show the background.
@node Window Basics, System Trays and the Mode Line, Frame Basics, Basic Concepts
@subsection Window Basics
Windows are created by programs to display their output. They take the
shape of the frame in which they are created. The windows within a
frame are ordered by how recently that window was focused. Only the
top window in the stack is visible.
@node System Trays and the Mode Line, , Window Basics, Basic Concepts
@subsection System Trays and the Mode Line
Many users choose to sacrifice a little screen real-estate to display
some generally useful information: the current time and date, wireless
network connections, the names of open windows, etc. StumpWM allows
you to display this information in a bar across either the top or the
bottom of the screen. There are two ways to do this: using external
programs called system trays, or using StumpWM's own mode line.
System trays are a special kind of X window. They advertise to running
programs that they are available for embedding icons or notifications
from those programs. They often also display clickable icons for each
open window. Common tray programs include the GNOME panel or KDE's
kicker, or simpler programs such as stalonetray. Simply starting one
of these programs is usually enough for StumpWM to detect it, place it
correctly, and allow it to function normally.
The mode line, a concept borrowed from Emacs, is a built-in part of
StumpWM. It is essentially a string of text that can include a variety
of information about your current session, including the names of
current groups and windows. Several modules provide for
different types of information. @xref{Mode-line, Mode Line}, (and the modules
directory) for more.
@node Manipulating Frames and Windows, Interacting with the Lisp process, Basic Concepts, Introduction
@section Manipulating Frames and Windows
Frames and windows are concepts borrowed from Emacs and the GNU Screen
program, and should be familiar to users of those programs. Others may
find the terms a little confusing. In other window managers, a
``window'' usually refers to a bounded box on the screen, showing output
from a single program. StumpWM splits this into two concepts: the
``frame'' is the bounded box, the ``window'' is the visible output of a
program.
One frame can contain many windows. As new windows are created, they
appear at the top of the window-stack of the current frame. This is
also a little different from other tiling window managers, many of
which automatically create new frames for new windows.
Both frames and windows are ordered by when they were last focused. In
the following commands and documentation, the terms ``next'' and
``previous'' refer to this order. ``Other'' refers to the most-recently
focused object. Calling ``other'' commands multiple times will bounce
back and forth between the two most recent objects.
By default, StumpWM starts with a single group, called ``Default'',
which contains one full-screen frame per head. You can split individual
frames horizontally or vertically using the `hsplit' and `vsplit'
commands, bound to ``C-t S'' and ``C-t s'' by default. When a frame is
split, the next-most-recently-focused window is pulled into the new
frame. @xref{Frames}, and @ref{Windows}, for a complete listing of
commands.
@menu
* Moving Between Frames::
* Manipulating Windows::
@end menu
@node Moving Between Frames, Manipulating Windows, Manipulating Frames and Windows, Manipulating Frames and Windows
@subsection Moving Between Frames
Once you have multiple frames, you can move between them in various
ways:
@itemize
@item
@command{fnext} (@kbd{C-t o} or @kbd{C-t TAB}) jumps to the next frame in
the current group's frame list.
@item
@command{fother} (@kbd{C-t M-TAB}) jumps to the last frame that had
focus.
@item
@command{fselect} (@kbd{C-t f}) displays numbers on each visible frame: hit a
number key or click it to move to that frame.
@item
@command{move-focus} (@kbd{C-t <arrow key>}) focus the frame in the direction of
the arrow key pressed.
@item
@command{sibling} (unbound by default) focus the frame from which the
current frame was split.
@end itemize
@node Manipulating Windows, , Moving Between Frames, Manipulating Frames and Windows
@subsection Manipulating Windows
Some commands change which window is currently focused, some move
windows between frames, and some may do both at once.
There are two general ways to move focus between windows: either
between windows belonging to the current frame, or between all windows
within the current group. Within a single frame:
@itemize
@item
@command{next-in-frame} (@kbd{C-t C-M-n}) focus the next window in the current
frame's list of windows.
@item
@command{prev-in-frame} (@kbd{C-t C-M-p}) focus the previous window in the
current frame's list of windows.
@item
@command{other-in-frame} (@kbd{C-t M-t}) focus the most recently focused window
in the current frame's list of windows.
@item
@command{frame-windowlist} (unbound by default) display a menu of windows in
the currently-focused frame, and allow the user to choose one.
Alternately, the command @command{frame-windows} will simply display the
list of window names, with no menu choice available.
@end itemize
Within the current group, the following commands will go straight to
the specified window. They will never move a window from its original
frame, and so may result in focus switching frames.
@itemize
@item
@command{next} (@kbd{C-t M-n}) focus the next window in the current group.
@item
@command{prev} (@kbd{C-t M-p}) focus the previous window in the current group.
@item
@command{other} or @command{other-window} (unbound by default) focus the
most recently focused window in the current group.
@item
@command{next-urgent} (@kbd{C-t C-u}) focus the next window that has marked
itself ``urgent''.
@item
@command{select} or @command{select-window} (@kbd{C-t '}) prompt for the
title of a window and focus it. Works with partial completion of the
title.
@item
@command{select-window-by-name} (unbound by default) prompt for the
title of a window and focus it. Requires the window title to be entered
exactly.
@item
@command{select-window-by-number} (@kbd{C-t <number>}) choose a window by
number.
@item
@command{windowlist} (@kbd{C-t "}) display a menu of windows in the
currently-focused group, and allow the user to choose one.
@end itemize
The following commands always keep the current frame focused. If the
selected window is not in the current frame, it will be pulled there
from wherever it is (hence the ``pull'' naming scheme).
@itemize
@item
@command{pull} or @command{pull-window-by-number} (@kbd{C-t C-<number>})
pull the numbered window into the current frame.
@item
@command{pull-hidden-next} (@kbd{C-t n} or @kbd{C-t SPC}) pull the next
currently undisplayed window in the window list into the current frame.
@item
@command{pull-hidden-previous} (@kbd{C-t p}) pull the previous currently
undisplayed window in the window list into the current frame.
@item
@command{pull-hidden-other} (@kbd{C-t C-t}) pull the most recently
focused, currently undisplayed window into the current frame.
@end itemize
The following commands move the current window from one frame to
another, bringing focus with them.
@itemize
@item
@command{move-window} (@kbd{C-t M-<arrow>}) move the currently focused
window in the direction indicated by the arrow key.
@item
@command{exchange-direction} (unbound by default) prompt for a
direction, then swap the currently focused window with the top window of
the frame in that direction.
@end itemize
@node Interacting with the Lisp process, Init File, Manipulating Frames and Windows, Introduction
@section Interacting with the Lisp process
Since StumpWM is a Lisp program, there is a way for you to evaluate
Lisp code directly, on the same Lisp process that StumpWM is running on.
Type @kbd{C-t :} and an input box will appear. Then type some Lisp
expression.
When you call @command{eval} this way, you will be in the STUMPWM-USER
package, which imports all the exported symbols from the main STUMPWM
package.
@table @code
@item *mode-line-border-width*
Reads the value of @var{*mode-line-border-width*}.
@item (setf *mode-line-border-width* 3)
Sets the variable @var{*mode-line-border-width*} to 3.
@item (set-prefix-key (kbd "C-M-H-s-z"))
Calls the @code{set-prefix-key} function (and sets a new keyboard prefix)
@end table
@node Init File, Contact the StumpWM developers, Interacting with the Lisp process, Introduction
@section Init File
Like other window managers, StumpWM's configuration and startup
state can be controlled by an initialization file. Unlike other
window managers, StumpWM's init is not limited to changing settings
and keybindings. The init file is itself a Common Lisp program
running in a Common Lisp environment, so you can write your own
hacks and make them a part of your StumpWM experience.
On launch, StumpWM searches for an init file of different names and
locations on your system, and will use the first one found in this
order:
@itemize
@item `~/.stumpwmrc' is the classic UNIX-style configuration name;
@item `~/.stumpwm.d/init.lisp' is an Emacs-style location and name;
@item `~/.config/stumpwm/config' is the XDG standard;
@item `/etc/stumpwmrc' is a system-wide file giving all users a
standardized environment.
@end itemize
StumpWM includes a basic `sample-stumpwm.lisp' in its source
directory. You can use this as a template when you're starting out:
copy it to the above name and location you prefer and edit it to
suit your preferences.
It is possible to split your initialization among multiple files,
if you call the additional files from within an init file matching
the names and locations listed above.
### *processing-existing-windows*
@node Contact the StumpWM developers, , Init File, Introduction
@section Contact the StumpWM developers
The StumpWM home page is @url{http://stumpwm.nongnu.org/}.
The StumpWM mailing list is @email{stumpwm-devel@@nongnu.org} which
you can subscribe to at
@url{https://lists.nongnu.org/mailman/listinfo/stumpwm-devel}. It is
the preferred way of contacting developers for questions. If you have
a bug report or patch, please open an issue or pull request at
@url{https://github.com/stumpwm/stumpwm/issues}.
The StumpWM IRC channel can be found on Freenode at
@uref{irc://irc.freenode.net/#stumpwm, @code{#stumpwm}}.
@node Key Bindings, Commands, Introduction, Top
@chapter Key Bindings
StumpWM is controlled entirely by keystrokes and Lisp commands. It
mimics GNU Screen's keyboard handling. StumpWM's default prefix key is
@kbd{C-t}.
@menu
* List of Default Keybindings::
* Binding Keys::
* Modifiers::
* Remapped Keys::
@end menu
@node List of Default Keybindings, Binding Keys, Key Bindings, Key Bindings
@section List of Default Keybindings
The following is a list of keybindings.
@table @kbd
@item C-t @var{d}
Select the window with the corresponding digit@tie{}@var{d}
@item C-t C-@var{d}
Pull the window with the corresponding digit@tie{}@var{d} into the current frame
@item C-t n
@itemx C-t C-n
@itemx C-t Space
Go to the next window in the window list
@item C-t p
@itemx C-t C-p
Go to the previous window in the window list
@item C-t '
Go to a window by name
@item C-t "
Select a window from a list and focus the window.
@item C-t C-g
Abort the current command. This is useful if you accidentally hit @kbd{C-t}
@item C-t i
Display information about the current window.
@item C-t f
Select a frame by number
@item C-t s
Split current frame vertically
@item C-t S
Split current frame horizontally
@item C-t k
@itemx C-t C-k
Sends a kill message to the current frame and the running program.
@item C-t K
Kills the current frame and running program; like a @command{kill -9}.
@item C-t c
@itemx C-t C-c
Run an X terminal; by default @command{xterm}
@item C-t e
@itemx C-t C-e
Run Emacs or raise it if it is already running.
@item C-t t
Sends a @kbd{C-t} to the frame; this is useful for applications like Firefox
which make heavy use of @kbd{C-t} (in Firefox's case, for opening a new
tab). This is similar to how GNU screen uses @kbd{C-a a}.
@item C-t w
@itemx C-t C-w
Prints out a list of all the windows, their number, and their name.
@item C-t RET
@itemx C-t C-RET
Show all windows and let the user select one, make that window the
focus.
@item C-t b
@itemx C-t C-b
Banish the mouse point to the lower right corner of the screen.
@item C-t a
@itemx C-t C-a
Display the current time and date, much like the Unix command @command{date}.
@item C-t C-t
Switch to the last window to have focus in the current frame.
@item C-t !
Prompt for a shell command to run via @file{/bin/sh}. All output is discarded.
@item C-t R
If the screen is split into multiple frames, one split will be
undone. If there is only one split, the effect will be the same as @kbd{C-t Q}.
@item C-t o
@itemx C-t TAB
If the screen is split into multiple frames, focus shifts to the
@command{next} frame, where it cycles to the right and then down; analogous
to @kbd{C-x o} in Emacs.
@item C-t F
Display ``Current Frame'' in the frame which has focus.
@item C-t ;
Opens the input box. StumpWM commands can be run from here, and the
input history moved through.
@item C-t :
Opens the input box, but all things typed in here will be sent to the
Common Lisp interpreter where they will be run as Lisp programs; thus,
input should be valid Common Lisp.
@item C-t C-h
@itemx C-t ?
The help.
@item C-t -
Hide all frames and show the root window.
@item C-t Q
Removes all splits and maximizes the frame with focus.
@item C-t Up
@itemx C-t Down
@itemx C-t Left
@itemx C-t Right
Shift focus to an adjacent frame in the specified direction. @kbd{C-t Up} will
shift focus up, if possible, @kbd{C-t Down} will shift downwards, etc.
@item C-t v
Prints out the version of the running StumpWM.
@item C-t #
Toggle the mark on the current window
@item C-t m
@itemx C-t C-m
Display the last message. Hitting this keybinding again displays the
message before that, and so on.
@item C-t l
@itemx C-t C-l
redisplay the current window and force it to take up the entire frame.
@item C-t G
Display all groups and windows in each group. For more information see @ref{Groups}.
@item C-t F@var{n}
Jump to the corresponding group @var{n}. @kbd{C-t F1} jumps to group 1 and so on.
@item C-t g g
Show the list of groups.
@item C-t g c
Create a new group.
@item C-t g n
@itemx C-t g C-n
@itemx C-t g SPC
@itemx C-t g C-SPC
Go to the next group in the list.
@item C-t g N
Go to the next group in the list and bring the current window along.
@item C-t g p
@itemx C-t g C-p
Go to the previous group in the list.
@item C-t g P
Go to the previous group in the list and bring the current window along.
@item C-t g '
Select a group by name or by number.
@item C-t g "
Select a group from a list and switch to it.
@item C-t g m
Move the current window to the specified group.
@item C-t g k
Kill the current group. All windows are merged into the next group.
@item C-t g A
@itemx C-t g r
Change the current group's name.
@item C-t g @var{d}
Go to the group with digit @var{d}. @kbd{C-t g 1} jumps to group 1 and so on.
@item C-t +
Make frames the same height or width in the current frame's subtree.
@item C-t h k
Describe the specified key binding.
@item C-t h f
Describe the specified function.
@item C-t h v
Describe the specified variable.
@item C-t h w
List all key sequences that are bound to the specified command
@item C-t h c
Describe the specified command.
@end table
@node Binding Keys, Modifiers, List of Default Keybindings, Key Bindings
@section Binding Keys
@@@ define-key
@@@ undefine-key
@@@ kbd
!!! set-prefix-key
@@@ make-sparse-keymap
### *root-map*
### *top-map*
### *groups-map*
### *group-top-maps*
### *exchange-window-map*
!!! bind
!!! unbind
!!! send-escape
@@@ grab-pointer
@@@ ungrab-pointer
### *banish-pointer-to*
@@@ final-key-p
@@@ help-key-p
@@@ cancel-key-p
### *editor-bindings*
### *numpad-map*
@node Modifiers, Remapped Keys, Binding Keys, Key Bindings
@section Modifiers
Many users have had some difficulty with setting up modifiers for
StumpWM keybindings. This is caused by a combination of how StumpWM
handles modifiers and the default modifiers list for many users' X
servers.
@itemize
@item
My ``Super'' key doesn't work!
This is most likely caused by having the Hyper and Super keys listed
as the same modifier in the modifier list.
@example
$ xmodmap
xmodmap: up to 3 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Alt_R (0x71), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
@end example
The problem is in the line beginning with ``mod4''. The way to set up
the modifier list correctly is to have just the Super key as the mod4
modifier. The following @command{xmodmap} commands will do just that.