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