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