]> code.delx.au - spectrwm/blob - scrotwm.1
add initial stack mode at start-of-day. this really could use some
[spectrwm] / scrotwm.1
1 .\" $scrotwm$
2 .\"
3 .\" Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
4 .\" Copyright (c) 2009 Darrin Chandler <dwchandler@stilyagin.com>
5 .\"
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
9 .\"
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .\"
18 .Dd $Mdocdate$
19 .Dt SCROTWM 1
20 .Os
21 .Sh NAME
22 .Nm scrotwm
23 .Nd window manager for X11
24 .Sh SYNOPSIS
25 .Nm scrotwm
26 .Sh DESCRIPTION
27 .Nm
28 is a minimalistic window manager that tries to stay out of the way so that
29 valuable screen real estate can be used for much more important stuff.
30 It has sane defaults and does not require one to learn a language to do any
31 configuration.
32 It was written by hackers for hackers and it strives to be small, compact and
33 fast.
34 .Pp
35 When
36 .Nm
37 starts up, it reads settings from its configuration file,
38 .Pa scrotwm.conf .
39 See the
40 .Sx CONFIGURATION FILES
41 section below.
42 .Pp
43 The following notation is used throughout this page:
44 .Pp
45 .Bl -tag -width Ds -offset indent -compact
46 .It Cm M
47 Meta
48 .It Cm S
49 Shift
50 .It Aq Cm Name
51 Named key
52 .It Cm M1
53 Mouse button 1
54 .It Cm M3
55 Mouse button 3
56 .El
57 .Pp
58 .Nm
59 is very simple in its use.
60 Most of the actions are initiated via key or mouse bindings.
61 See the
62 .Sx BINDINGS
63 section below for defaults and customizations.
64 .Sh CONFIGURATION FILES
65 .Nm
66 first tries to open the user specific file,
67 .Pa ~/.scrotwm.conf .
68 If that file is unavailable,
69 it then tries to open the global configuration file
70 .Pa /etc/scrotwm.conf .
71 .Pp
72 The format of the file is \*(Ltkeyword\*(Gt = \*(Ltsetting\*(Gt.
73 For example:
74 .Pp
75 .Dl color_focus = red
76 .Pp
77 Enabling or disabling an option is done by using 1 or 0 respectively.
78 .Pp
79 The file supports the following keywords:
80 .Pp
81 .Bl -tag -width "title_class_enabledXXX" -offset indent -compact
82 .It Cm autorun
83 Launch an application in a specified workspace at start-of-day.
84 Defined in the format ws[<idx>]:application, e.g. ws[2]:xterm launches and
85 xterm in workspace 2
86 .It Cm color_focus
87 Border color of the currently focussed window.
88 .It Cm color_unfocus
89 Border color of unfocussed windows.
90 .It Cm bar_enabled
91 Enable or disable status bar.
92 .It Cm bar_border Ns Bq Ar x
93 Color of the status bar border in screen
94 .It Cm bar_border_width
95 Set status bar border thickness in pixels.
96 Disable border by setting to 0
97 .Ar x .
98 .It Cm bar_color Ns Bq Ar x
99 Color of the status bar window in screen
100 .Ar x .
101 .It Cm bar_font_color Ns Bq Ar x
102 Color of the font in status bar in screen
103 .Ar x .
104 .It Cm bar_font
105 Status bar font.
106 .It Cm bar_action
107 External script that populates additional information in the status bar,
108 such as battery life.
109 .It Cm bar_delay
110 Update frequency, in seconds, of external script that populates the status bar.
111 .It Cm bar_at_bottom
112 Place the statusbar at the bottom of each region instead of the top.
113 .It Cm stack_enabled
114 Enable or disable displaying the current stacking algorithm in the status bar.
115 .It Cm clock_enabled
116 Enable or disable displaying the clock in the status bar.
117 Disable by setting to 0
118 so a custom clock could be used in the bar_action script.
119 .It Cm dialog_ratio
120 Some applications have dialogue windows that are too small to be useful.
121 This ratio is the screen size to what they will be resized.
122 For example, 0.6 is 60% of the physical screen size.
123 .It Cm layout
124 select layout to use at start-of-day.
125 Defined in the format ws[<idx>]:<layout>, e.g. ws[2]:horizontal sets worskspace
126 2 to the horizontal stack mode.
127 This setting is not retained at restart.
128 Possible values are
129 .Pa vertical ,
130 .Pa horizontal
131 and
132 .Pa fullscreen .
133 .It Cm region
134 Allocates a custom region, removing any autodetected regions which occupy the same
135 space on the screen.
136 Defined in the format screen[<idx>]:WIDTHxHEIGHT+X+Y,
137 e.g.\& screen[1]:800x1200+0+0.
138 .It Cm term_width
139 Set a preferred minimum width for the terminal
140 If this value is greater than 0,
141 .Nm
142 will attempt to adjust the font sizes in the terminal to keep the terminal
143 width above this number as the window is resized.
144 Only
145 .Xr xterm 1
146 is currently supported.
147 The
148 .Xr xterm 1
149 binary must not be setuid or setgid, which it is by default on most systems.
150 Users may need to set program[term] (see the
151 .Sx PROGRAMS
152 section) to use an alternate copy of the
153 .Xr xterm 1
154 binary without the setgid bit set.
155 .It Cm title_class_enabled
156 Enable or disable displaying the window class in the status bar.
157 Enable by setting to 1
158 .It Cm title_name_enabled
159 Enable or disable displaying the window title in the status bar.
160 Enable by setting to 1
161 .It Cm window_name_enabled
162 Enable or disable displaying the window name in the status bar.
163 Enable by setting to 1
164 .It Cm modkey
165 Change mod key.
166 Mod1 is generally the ALT key and Mod4 is the windows key on a PC.
167 .It Cm focus_mode
168 Using a value of follow_cursor will make the window manager focus the window
169 under the mouse when switching workspaces and creating windows.
170 .It Cm disable_border
171 Remove border when bar is disabled and there is only one window on the screen.
172 .It Cm border_width
173 Set window border thickness in pixels.
174 Disable all borders by setting to 0
175 .It Cm program Ns Bq Ar p
176 Define new action to spawn a program
177 .Ar p .
178 See the
179 .Sx PROGRAMS
180 section below.
181 .It Cm bind Ns Bq Ar x
182 Bind key combo to action
183 .Ar x .
184 See the
185 .Sx BINDINGS
186 section below.
187 .It Cm quirk Ns Bq Ar c:n
188 Add "quirk" for windows with class
189 .Ar c
190 and name
191 .Ar n .
192 See the
193 .Sx QUIRKS
194 section below.
195 .El
196 .Pp
197 Colors need to be specified per the
198 .Xr XQueryColor 3
199 specification and fonts need to be specified per the
200 .Xr XQueryFont 3
201 specification.
202 .Pp
203 To list the available fonts in your system see
204 .Xr fc-list 1
205 or
206 .Xr xlsfonts 1
207 manpages.
208 The
209 .Xr xfontsel 1
210 application can help you to show the X Logical Font Description ("XLFD") used
211 as setting in the keyword bar_font.
212 .Sh PROGRAMS
213 .Nm
214 allows you to define custom actions to launch programs of your choice and then
215 bind them the same as with built-in actions.
216 See the
217 .Sx BINDINGS
218 section below.
219 .Pp
220 The default programs are described below:
221 .Pp
222 .Bl -tag -width "screenshot_wind" -offset indent -compact
223 .It Cm term
224 xterm
225 .It Cm screenshot_all
226 screenshot.sh full
227 .It Cm screenshot_wind
228 screenshot.sh window
229 .It Cm lock
230 xlock
231 .It Cm initscr
232 initscreen.sh
233 .It Cm menu
234 dmenu_run \-fn $bar_font \-nb $bar_color \-nf $bar_font_color \-sb $bar_border \-sf $bar_color
235 .El
236 .Pp
237 Custom programs in the configuration file are specified as follows:
238 .Pp
239 .Dl program[<name>] = <progpath> [<arg> [... <arg>]]
240 .Pp
241 .Aq name
242 is any identifier that does not conflict with a built-in action or keyword,
243 .Aq progpath
244 is the desired program, and
245 .Aq arg
246 is zero or more arguments to the program.
247 .Pp
248 The following variables represent settable values in
249 .Nm
250 (see the
251 .Sx CONFIGURATION FILES
252 section above),
253 and may be used in the
254 .Aq arg
255 fields and will be substituted for values at the time the program is spawned:
256 .Pp
257 .Bl -tag -width "$bar_font_color" -offset indent -compact
258 .It Cm $bar_border
259 .It Cm $bar_color
260 .It Cm $bar_font
261 .It Cm $bar_font_color
262 .It Cm $color_focus
263 .It Cm $color_unfocus
264 .El
265 .Pp
266 Example:
267 .Bd -literal -offset indent
268 program[ff] = /usr/local/bin/firefox http://scrotwm.org/
269 bind[ff] = Mod+f # Now Mod+F launched firefox
270 .Ed
271 .Pp
272 To undo the previous:
273 .Bd -literal -offset indent
274 bind[] = Mod+f
275 program[ff] =
276 .Ed
277 .Pp
278 .Sh BINDINGS
279 .Nm
280 provides many functions (or actions) accessed via key or mouse bindings.
281 .Pp
282 The current mouse bindings are described below:
283 .Pp
284 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
285 .It Cm M1
286 Focus window
287 .It Cm M-M1
288 Move window
289 .It Cm M-M3
290 Resize window
291 .It Cm M-S-M3
292 Resize window while maintaining it centered
293 .El
294 .Pp
295 The default key bindings are described below:
296 .Pp
297 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
298 .It Cm M-S- Ns Aq Cm Return
299 term
300 .It Cm M-p
301 menu
302 .It Cm M-S-q
303 quit
304 .It Cm M-q
305 restart
306 .Nm
307 .It Cm M- Ns Aq Cm Space
308 cycle_layout
309 .It Cm M-S- Ns Aq Cm Space
310 reset_layout
311 .It Cm M-h
312 master_shrink
313 .It Cm M-l
314 master_grow
315 .It Cm M-,
316 master_add
317 .It Cm M-.
318 master_del
319 .It Cm M-S-,
320 stack_inc
321 .It Cm M-S-.
322 stack_del
323 .It Cm M- Ns Aq Cm Return
324 swap_main
325 .It Xo
326 .Cm M-j ,
327 .Cm M- Ns Aq Cm TAB
328 .Xc
329 focus_next
330 .It Xo
331 .Cm M-k ,
332 .Cm M-S- Ns Aq Cm TAB
333 .Xc
334 focus_prev
335 .It Cm M-m
336 focus_main
337 .It Cm M-S-j
338 swap_next
339 .It Cm M-S-k
340 swap_prev
341 .It Cm M-b
342 bar_toggle
343 .It Cm M-x
344 wind_del
345 .It Cm M-S-x
346 wind_kill
347 .It Cm M- Ns Aq Ar n
348 .Ns ws_ Ns Ar n
349 .It Cm M-S- Ns Aq Ar n
350 .Ns mvws_ Ns Ar n
351 .It Cm M- Ns Aq Cm Right
352 ws_next
353 .It Cm M- Ns Aq Cm Left
354 ws_prev
355 .It Cm M-a
356 ws_prior
357 .It Cm M-S- Ns Aq Cm Right
358 screen_next
359 .It Cm M-S- Ns Aq Cm Left
360 screen_prev
361 .It Cm M-s
362 screenshot_all
363 .It Cm M-S-s
364 screenshot_wind
365 .It Cm M-S-v
366 version
367 .It Cm M-t
368 float_toggle
369 .It Cm M-S- Ns Aq Cm Delete
370 lock
371 .It Cm M-S-i
372 initscr
373 .It Cm M-w
374 iconify
375 .It Cm M-S-w
376 uniconify
377 .El
378 .Pp
379 The action names and descriptions are listed below:
380 .Pp
381 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
382 .It Cm term
383 Spawn a new terminal
384 (see
385 .Sx PROGRAMS
386 above)
387 .It Cm menu
388 Menu
389 (see
390 .Sx PROGRAMS
391 above)
392 .It Cm quit
393 Quit
394 .Nm
395 .It Cm restart
396 Restart
397 .Nm
398 .It Cm cycle_layout
399 Cycle layout
400 .It Cm reset_layout
401 Reset layout
402 .It Cm master_shrink
403 Shrink master area
404 .It Cm master_grow
405 Grow master area
406 .It Cm master_add
407 Add windows to master area
408 .It Cm master_del
409 Remove windows from master area
410 .It Cm stack_inc
411 Add columns/rows to stacking area
412 .It Cm stack_del
413 Remove columns/rows from stacking area
414 .It Cm swap_main
415 Move current window to master area
416 .It Cm focus_next
417 Focus next window in workspace
418 .It Cm focus_prev
419 Focus previous window in workspace
420 .It Cm focus_main
421 Focus on main window in workspace
422 .It Cm swap_next
423 Swap with next window in workspace
424 .It Cm swap_prev
425 Swap with previous window in workspace
426 .It Cm bar_toggle
427 Toggle status bar in all workspaces
428 .It Cm wind_del
429 Delete current window in workspace
430 .It Cm wind_kill
431 Destroy current window in workspace
432 .It Cm ws_ Ns Ar n
433 Switch to workspace
434 .Ar n ,
435 where
436 .Ar n
437 is 1 through 10
438 .It Cm mvws_ Ns Ar n
439 Move current window to workspace
440 .Ar n ,
441 where
442 .Ar n
443 is 1 through 10
444 .It Cm ws_next
445 Switch to next workspace with a window in it
446 .It Cm ws_prev
447 Switch to previous workspace with a window in it
448 .It Cm ws_prior
449 Switch to last visited workspace
450 .It Cm screen_next
451 Move pointer to next region
452 .It Cm screen_prev
453 Move pointer to previous region
454 .It Cm screenshot_all
455 Take screenshot of entire screen (if enabled)
456 (see
457 .Sx PROGRAMS
458 above)
459 .It Cm screenshot_wind
460 Take screenshot of selected window (if enabled)
461 (see
462 .Sx PROGRAMS
463 above)
464 .It Cm version
465 Toggle version in status bar
466 .It Cm float_toggle
467 Toggle focused window between tiled and floating
468 .It Cm lock
469 Lock screen
470 (see
471 .Sx PROGRAMS
472 above)
473 .It Cm initscr
474 Reinitialize physical screens
475 (see
476 .Sx PROGRAMS
477 above)
478 .It Cm iconify
479 Minimize (unmap) currently focused window.
480 .It Cm uniconify
481 Maximize (map) window returned by dmenu selection.
482 .El
483 .Pp
484 Custom bindings in the configuration file are specified as follows:
485 .Pp
486 .Dl bind[<action>] = <keys>
487 .Pp
488 .Aq action
489 is one of the actions listed above (or empty) and
490 .Aq keys
491 is in the form of zero or more modifier keys
492 (MOD, Mod1, Shift, etc.) and one or more normal keys
493 (b, space, etc.), separated by "+".
494 For example:
495 .Bd -literal -offset indent
496 bind[reset] = Mod4+q # bind Windows-key + q to reset
497 bind[] = Mod1+q # unbind Alt + q
498 .Ed
499 .Pp
500 Multiple key combinations may be bound to the same action.
501 .Sh QUIRKS
502 .Nm
503 provides "quirks" which handle windows that must be treated specially
504 in a tiling window manager, such as some dialogs and fullscreen apps.
505 .Pp
506 The default quirks are described below:
507 .Pp
508 .Bl -tag -width "OpenOffice.org N.M:VCLSalFrame<TAB>XXX" -offset indent -compact
509 .It Firefox\-bin:firefox\-bin
510 TRANSSZ
511 .It Firefox:Dialog
512 FLOAT
513 .It Gimp:gimp
514 FLOAT + ANYWHERE
515 .It MPlayer:xv
516 FLOAT + FULLSCREEN + FOCUSPREV
517 .It OpenOffice.org 2.4:VCLSalFrame
518 FLOAT
519 .It OpenOffice.org 3.1:VCLSalFrame
520 FLOAT
521 .It pcb:pcb
522 FLOAT
523 .It xine:Xine Window
524 FLOAT + ANYWHERE
525 .It xine:xine Panel
526 FLOAT + ANYWHERE
527 .It xine:xine Video Fullscreen Window
528 FULLSCREEN + FLOAT
529 .It Xitk:Xitk Combo
530 FLOAT + ANYWHERE
531 .It Xitk:Xine Window
532 FLOAT + ANYWHERE
533 .It XTerm:xterm
534 XTERM_FONTADJ
535 .El
536 .Pp
537 The quirks themselves are described below:
538 .Pp
539 .Bl -tag -width "XTERM_FONTADJ<TAB>XXX" -offset indent -compact
540 .It FLOAT
541 This window should not be tiled, but allowed to float freely.
542 .It TRANSSZ
543 Adjusts size on transient windows that are too small using dialog_ratio
544 (see
545 .Sx CONFIGURATION FILES ) .
546 .It ANYWHERE
547 Allow window to position itself, uncentered.
548 .It XTERM_FONTADJ
549 Adjust xterm fonts when resizing.
550 .It FULLSCREEN
551 Remove border to allow window to use full screen size.
552 .It FOCUSPREV
553 On exit force focus on previously focused application not previous application
554 in the stack.
555 .El
556 .Pp
557 Custom quirks in the configuration file are specified as follows:
558 .Pp
559 .Dl quirk[<class>:<name>] = <quirk> [ + <quirk> ... ]
560 .Pp
561 .Aq class
562 and
563 .Aq name
564 specify the window to which the quirk(s) apply, and
565 .Aq quirk
566 is one of the quirks from the list above.
567 For example:
568 .Bd -literal -offset indent
569 quirk[MPlayer:xv] = FLOAT + FULLSCREEN + FOCUSPREV
570 quirk[pcb:pcb] = NONE # remove existing quirk
571 .Ed
572 .Pp
573 You can obtain
574 .Aq class
575 and
576 .Aq name
577 by running xprop(1) and then clicking on the desired window.
578 In the following example the main window of Firefox was clicked:
579 .Bd -literal -offset indent
580 $ xprop | grep WM_CLASS
581 WM_CLASS(STRING) = "Navigator", "Firefox"
582 .Ed
583 .Pp
584 Note that grepping for WM_CLASS flips class and name.
585 In the example above the quirk entry would be:
586 .Bd -literal -offset indent
587 quirk[Firefox:Navigator] = FLOAT
588 .Ed
589 .Sh SIGNALS
590 Sending
591 .Nm
592 a HUP signal will retstart it.
593 .Sh FILES
594 .Bl -tag -width "/etc/scrotwm.confXXX" -compact
595 .It Pa ~/.scrotwm.conf
596 .Nm
597 user specific settings.
598 .It Pa /etc/scrotwm.conf
599 .Nm
600 global settings.
601 .El
602 .Sh HISTORY
603 .Nm
604 was inspired by xmonad & dwm.
605 .Sh AUTHORS
606 .An -nosplit
607 .Pp
608 .Nm
609 was written by
610 .An Marco Peereboom Aq marco@peereboom.us ,
611 .An Ryan Thomas McBride Aq mcbride@countersiege.com
612 and
613 .An Darrin Chandler Aq dwchandler@stilyagin.com .
614 .Sh BUGS
615 Currently the menu, invoked with
616 .Cm M-p ,
617 depends on dmenu.