]> code.delx.au - spectrwm/blob - scrotwm.1
remove args constraint and add an example of args in conf file
[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 region
124 Allocates a custom region, removing any autodetected regions which occupy the same
125 space on the screen.
126 Defined in the format screen[<idx>]:WIDTHxHEIGHT+X+Y,
127 e.g.\& screen[1]:800x1200+0+0.
128 .It Cm term_width
129 Set a preferred minimum width for the terminal
130 If this value is greater than 0,
131 .Nm
132 will attempt to adjust the font sizes in the terminal to keep the terminal
133 width above this number as the window is resized.
134 Only
135 .Xr xterm 1
136 is currently supported.
137 The
138 .Xr xterm 1
139 binary must not be setuid or setgid, which it is by default on most systems.
140 Users may need to set program[term] (see the
141 .Sx PROGRAMS
142 section) to use an alternate copy of the
143 .Xr xterm 1
144 binary without the setgid bit set.
145 .It Cm title_class_enabled
146 Enable or disable displaying the window class in the status bar.
147 Enable by setting to 1
148 .It Cm title_name_enabled
149 Enable or disable displaying the window title in the status bar.
150 Enable by setting to 1
151 .It Cm window_name_enabled
152 Enable or disable displaying the window name in the status bar.
153 Enable by setting to 1
154 .It Cm modkey
155 Change mod key.
156 Mod1 is generally the ALT key and Mod4 is the windows key on a PC.
157 .It Cm focus_mode
158 Using a value of follow_cursor will make the window manager focus the window
159 under the mouse when switching workspaces and creating windows.
160 .It Cm disable_border
161 Remove border when bar is disabled and there is only one window on the screen.
162 .It Cm border_width
163 Set window border thickness in pixels.
164 Disable all borders by setting to 0
165 .It Cm program Ns Bq Ar p
166 Define new action to spawn a program
167 .Ar p .
168 See the
169 .Sx PROGRAMS
170 section below.
171 .It Cm bind Ns Bq Ar x
172 Bind key combo to action
173 .Ar x .
174 See the
175 .Sx BINDINGS
176 section below.
177 .It Cm quirk Ns Bq Ar c:n
178 Add "quirk" for windows with class
179 .Ar c
180 and name
181 .Ar n .
182 See the
183 .Sx QUIRKS
184 section below.
185 .El
186 .Pp
187 Colors need to be specified per the
188 .Xr XQueryColor 3
189 specification and fonts need to be specified per the
190 .Xr XQueryFont 3
191 specification.
192 .Pp
193 To list the available fonts in your system see
194 .Xr fc-list 1
195 or
196 .Xr xlsfonts 1
197 manpages.
198 The
199 .Xr xfontsel 1
200 application can help you to show the X Logical Font Description ("XLFD") used
201 as setting in the keyword bar_font.
202 .Sh PROGRAMS
203 .Nm
204 allows you to define custom actions to launch programs of your choice and then
205 bind them the same as with built-in actions.
206 See the
207 .Sx BINDINGS
208 section below.
209 .Pp
210 The default programs are described below:
211 .Pp
212 .Bl -tag -width "screenshot_wind" -offset indent -compact
213 .It Cm term
214 xterm
215 .It Cm screenshot_all
216 screenshot.sh full
217 .It Cm screenshot_wind
218 screenshot.sh window
219 .It Cm lock
220 xlock
221 .It Cm initscr
222 initscreen.sh
223 .It Cm menu
224 dmenu_run \-fn $bar_font \-nb $bar_color \-nf $bar_font_color \-sb $bar_border \-sf $bar_color
225 .El
226 .Pp
227 Custom programs in the configuration file are specified as follows:
228 .Pp
229 .Dl program[<name>] = <progpath> [<arg> [... <arg>]]
230 .Pp
231 .Aq name
232 is any identifier that does not conflict with a built-in action or keyword,
233 .Aq progpath
234 is the desired program, and
235 .Aq arg
236 is zero or more arguments to the program.
237 .Pp
238 The following variables represent settable values in
239 .Nm
240 (see the
241 .Sx CONFIGURATION FILES
242 section above),
243 and may be used in the
244 .Aq arg
245 fields and will be substituted for values at the time the program is spawned:
246 .Pp
247 .Bl -tag -width "$bar_font_color" -offset indent -compact
248 .It Cm $bar_border
249 .It Cm $bar_color
250 .It Cm $bar_font
251 .It Cm $bar_font_color
252 .It Cm $color_focus
253 .It Cm $color_unfocus
254 .El
255 .Pp
256 Example:
257 .Bd -literal -offset indent
258 program[ff] = /usr/local/bin/firefox http://scrotwm.org/
259 bind[ff] = Mod+f # Now Mod+F launched firefox
260 .Ed
261 .Pp
262 To undo the previous:
263 .Bd -literal -offset indent
264 bind[] = Mod+f
265 program[ff] =
266 .Ed
267 .Pp
268 .Sh BINDINGS
269 .Nm
270 provides many functions (or actions) accessed via key or mouse bindings.
271 .Pp
272 The current mouse bindings are described below:
273 .Pp
274 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
275 .It Cm M1
276 Focus window
277 .It Cm M-M1
278 Move window
279 .It Cm M-M3
280 Resize window
281 .It Cm M-S-M3
282 Resize window while maintaining it centered
283 .El
284 .Pp
285 The default key bindings are described below:
286 .Pp
287 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
288 .It Cm M-S- Ns Aq Cm Return
289 term
290 .It Cm M-p
291 menu
292 .It Cm M-S-q
293 quit
294 .It Cm M-q
295 restart
296 .Nm
297 .It Cm M- Ns Aq Cm Space
298 cycle_layout
299 .It Cm M-S- Ns Aq Cm Space
300 reset_layout
301 .It Cm M-h
302 master_shrink
303 .It Cm M-l
304 master_grow
305 .It Cm M-,
306 master_add
307 .It Cm M-.
308 master_del
309 .It Cm M-S-,
310 stack_inc
311 .It Cm M-S-.
312 stack_del
313 .It Cm M- Ns Aq Cm Return
314 swap_main
315 .It Xo
316 .Cm M-j ,
317 .Cm M- Ns Aq Cm TAB
318 .Xc
319 focus_next
320 .It Xo
321 .Cm M-k ,
322 .Cm M-S- Ns Aq Cm TAB
323 .Xc
324 focus_prev
325 .It Cm M-m
326 focus_main
327 .It Cm M-S-j
328 swap_next
329 .It Cm M-S-k
330 swap_prev
331 .It Cm M-b
332 bar_toggle
333 .It Cm M-x
334 wind_del
335 .It Cm M-S-x
336 wind_kill
337 .It Cm M- Ns Aq Ar n
338 .Ns ws_ Ns Ar n
339 .It Cm M-S- Ns Aq Ar n
340 .Ns mvws_ Ns Ar n
341 .It Cm M- Ns Aq Cm Right
342 ws_next
343 .It Cm M- Ns Aq Cm Left
344 ws_prev
345 .It Cm M-a
346 ws_prior
347 .It Cm M-S- Ns Aq Cm Right
348 screen_next
349 .It Cm M-S- Ns Aq Cm Left
350 screen_prev
351 .It Cm M-s
352 screenshot_all
353 .It Cm M-S-s
354 screenshot_wind
355 .It Cm M-S-v
356 version
357 .It Cm M-t
358 float_toggle
359 .It Cm M-S- Ns Aq Cm Delete
360 lock
361 .It Cm M-S-i
362 initscr
363 .It Cm M-w
364 iconify
365 .It Cm M-S-w
366 uniconify
367 .El
368 .Pp
369 The action names and descriptions are listed below:
370 .Pp
371 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
372 .It Cm term
373 Spawn a new terminal
374 (see
375 .Sx PROGRAMS
376 above)
377 .It Cm menu
378 Menu
379 (see
380 .Sx PROGRAMS
381 above)
382 .It Cm quit
383 Quit
384 .Nm
385 .It Cm restart
386 Restart
387 .Nm
388 .It Cm cycle_layout
389 Cycle layout
390 .It Cm reset_layout
391 Reset layout
392 .It Cm master_shrink
393 Shrink master area
394 .It Cm master_grow
395 Grow master area
396 .It Cm master_add
397 Add windows to master area
398 .It Cm master_del
399 Remove windows from master area
400 .It Cm stack_inc
401 Add columns/rows to stacking area
402 .It Cm stack_del
403 Remove columns/rows from stacking area
404 .It Cm swap_main
405 Move current window to master area
406 .It Cm focus_next
407 Focus next window in workspace
408 .It Cm focus_prev
409 Focus previous window in workspace
410 .It Cm focus_main
411 Focus on main window in workspace
412 .It Cm swap_next
413 Swap with next window in workspace
414 .It Cm swap_prev
415 Swap with previous window in workspace
416 .It Cm bar_toggle
417 Toggle status bar in all workspaces
418 .It Cm wind_del
419 Delete current window in workspace
420 .It Cm wind_kill
421 Destroy current window in workspace
422 .It Cm ws_ Ns Ar n
423 Switch to workspace
424 .Ar n ,
425 where
426 .Ar n
427 is 1 through 10
428 .It Cm mvws_ Ns Ar n
429 Move current window to workspace
430 .Ar n ,
431 where
432 .Ar n
433 is 1 through 10
434 .It Cm ws_next
435 Switch to next workspace with a window in it
436 .It Cm ws_prev
437 Switch to previous workspace with a window in it
438 .It Cm ws_prior
439 Switch to last visited workspace
440 .It Cm screen_next
441 Move pointer to next region
442 .It Cm screen_prev
443 Move pointer to previous region
444 .It Cm screenshot_all
445 Take screenshot of entire screen (if enabled)
446 (see
447 .Sx PROGRAMS
448 above)
449 .It Cm screenshot_wind
450 Take screenshot of selected window (if enabled)
451 (see
452 .Sx PROGRAMS
453 above)
454 .It Cm version
455 Toggle version in status bar
456 .It Cm float_toggle
457 Toggle focused window between tiled and floating
458 .It Cm lock
459 Lock screen
460 (see
461 .Sx PROGRAMS
462 above)
463 .It Cm initscr
464 Reinitialize physical screens
465 (see
466 .Sx PROGRAMS
467 above)
468 .It Cm iconify
469 Minimize (unmap) currently focused window.
470 .It Cm uniconify
471 Maximize (map) window returned by dmenu selection.
472 .El
473 .Pp
474 Custom bindings in the configuration file are specified as follows:
475 .Pp
476 .Dl bind[<action>] = <keys>
477 .Pp
478 .Aq action
479 is one of the actions listed above (or empty) and
480 .Aq keys
481 is in the form of zero or more modifier keys
482 (MOD, Mod1, Shift, etc.) and one or more normal keys
483 (b, space, etc.), separated by "+".
484 For example:
485 .Bd -literal -offset indent
486 bind[reset] = Mod4+q # bind Windows-key + q to reset
487 bind[] = Mod1+q # unbind Alt + q
488 .Ed
489 .Pp
490 Multiple key combinations may be bound to the same action.
491 .Sh QUIRKS
492 .Nm
493 provides "quirks" which handle windows that must be treated specially
494 in a tiling window manager, such as some dialogs and fullscreen apps.
495 .Pp
496 The default quirks are described below:
497 .Pp
498 .Bl -tag -width "OpenOffice.org N.M:VCLSalFrame<TAB>XXX" -offset indent -compact
499 .It Firefox\-bin:firefox\-bin
500 TRANSSZ
501 .It Firefox:Dialog
502 FLOAT
503 .It Gimp:gimp
504 FLOAT + ANYWHERE
505 .It MPlayer:xv
506 FLOAT + FULLSCREEN + FOCUSPREV
507 .It OpenOffice.org 2.4:VCLSalFrame
508 FLOAT
509 .It OpenOffice.org 3.1:VCLSalFrame
510 FLOAT
511 .It pcb:pcb
512 FLOAT
513 .It xine:Xine Window
514 FLOAT + ANYWHERE
515 .It xine:xine Panel
516 FLOAT + ANYWHERE
517 .It xine:xine Video Fullscreen Window
518 FULLSCREEN + FLOAT
519 .It Xitk:Xitk Combo
520 FLOAT + ANYWHERE
521 .It Xitk:Xine Window
522 FLOAT + ANYWHERE
523 .It XTerm:xterm
524 XTERM_FONTADJ
525 .El
526 .Pp
527 The quirks themselves are described below:
528 .Pp
529 .Bl -tag -width "XTERM_FONTADJ<TAB>XXX" -offset indent -compact
530 .It FLOAT
531 This window should not be tiled, but allowed to float freely.
532 .It TRANSSZ
533 Adjusts size on transient windows that are too small using dialog_ratio
534 (see
535 .Sx CONFIGURATION FILES ) .
536 .It ANYWHERE
537 Allow window to position itself, uncentered.
538 .It XTERM_FONTADJ
539 Adjust xterm fonts when resizing.
540 .It FULLSCREEN
541 Remove border to allow window to use full screen size.
542 .It FOCUSPREV
543 On exit force focus on previously focused application not previous application
544 in the stack.
545 .El
546 .Pp
547 Custom quirks in the configuration file are specified as follows:
548 .Pp
549 .Dl quirk[<class>:<name>] = <quirk> [ + <quirk> ... ]
550 .Pp
551 .Aq class
552 and
553 .Aq name
554 specify the window to which the quirk(s) apply, and
555 .Aq quirk
556 is one of the quirks from the list above.
557 For example:
558 .Bd -literal -offset indent
559 quirk[MPlayer:xv] = FLOAT + FULLSCREEN + FOCUSPREV
560 quirk[pcb:pcb] = NONE # remove existing quirk
561 .Ed
562 .Pp
563 You can obtain
564 .Aq class
565 and
566 .Aq name
567 by running xprop(1) and then clicking on the desired window.
568 In the following example the main window of Firefox was clicked:
569 .Bd -literal -offset indent
570 $ xprop | grep WM_CLASS
571 WM_CLASS(STRING) = "Navigator", "Firefox"
572 .Ed
573 .Pp
574 Note that grepping for WM_CLASS flips class and name.
575 In the example above the quirk entry would be:
576 .Bd -literal -offset indent
577 quirk[Firefox:Navigator] = FLOAT
578 .Ed
579 .Sh SIGNALS
580 Sending
581 .Nm
582 a HUP signal will retstart it.
583 .Sh FILES
584 .Bl -tag -width "/etc/scrotwm.confXXX" -compact
585 .It Pa ~/.scrotwm.conf
586 .Nm
587 user specific settings.
588 .It Pa /etc/scrotwm.conf
589 .Nm
590 global settings.
591 .El
592 .Sh HISTORY
593 .Nm
594 was inspired by xmonad & dwm.
595 .Sh AUTHORS
596 .An -nosplit
597 .Pp
598 .Nm
599 was written by
600 .An Marco Peereboom Aq marco@peereboom.us ,
601 .An Ryan Thomas McBride Aq mcbride@countersiege.com
602 and
603 .An Darrin Chandler Aq dwchandler@stilyagin.com .
604 .Sh BUGS
605 Currently the menu, invoked with
606 .Cm M-p ,
607 depends on dmenu.