JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix mandoc -Tlint warnings
[spectrwm.git] / scrotwm.1
1 .\" Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
2 .\" Copyright (c) 2009 Darrin Chandler <dwchandler@stilyagin.com>
3 .\"
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\"
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .Dd $Mdocdate: October 27 2011 $
17 .Dt SCROTWM 1
18 .Os
19 .Sh NAME
20 .Nm scrotwm
21 .Nd window manager for X11
22 .Sh SYNOPSIS
23 .Nm scrotwm
24 .Sh DESCRIPTION
25 .Nm
26 is a minimalistic window manager that tries to stay out of the way so that
27 valuable screen real estate can be used for much more important stuff.
28 It has sane defaults and does not require one to learn a language to do any
29 configuration.
30 It was written by hackers for hackers and it strives to be small, compact and
31 fast.
32 .Pp
33 When
34 .Nm
35 starts up, it reads settings from its configuration file,
36 .Pa scrotwm.conf .
37 See the
38 .Sx CONFIGURATION FILES
39 section below.
40 .Pp
41 The following notation is used throughout this page:
42 .Pp
43 .Bl -tag -width Ds -offset indent -compact
44 .It Cm M
45 Meta
46 .It Cm S
47 Shift
48 .It Aq Cm Name
49 Named key
50 .It Cm M1
51 Mouse button 1
52 .It Cm M3
53 Mouse button 3
54 .El
55 .Pp
56 .Nm
57 is very simple in its use.
58 Most of the actions are initiated via key or mouse bindings.
59 See the
60 .Sx BINDINGS
61 section below for defaults and customizations.
62 .Sh CONFIGURATION FILES
63 .Nm
64 first tries to open the user specific file,
65 .Pa ~/.scrotwm.conf .
66 If that file is unavailable,
67 it then tries to open the global configuration file
68 .Pa /etc/scrotwm.conf .
69 .Pp
70 The format of the file is \*(Ltkeyword\*(Gt = \*(Ltsetting\*(Gt.
71 For example:
72 .Pp
73 .Dl color_focus = red
74 .Pp
75 Enabling or disabling an option is done by using 1 or 0 respectively.
76 .Pp
77 The file supports the following keywords:
78 .Pp
79 .Bl -tag -width "title_class_enabledXXX" -offset indent -compact
80 .It Cm autorun
81 Launch an application in a specified workspace at start-of-day.
82 Defined in the format ws[<idx>]:application, e.g. ws[2]:xterm launches an
83 xterm in workspace 2.
84 .It Cm color_focus
85 Border color of the currently focussed window.
86 .It Cm color_unfocus
87 Border color of unfocussed windows.
88 .It Cm bar_enabled
89 Enable or disable status bar.
90 .It Cm bar_border Ns Bq Ar x
91 Color of the status bar border in screen
92 .Ar x .
93 .It Cm bar_border_width
94 Set status bar border thickness in pixels.
95 Disable border by setting to 0.
96 .It Cm bar_color Ns Bq Ar x
97 Color of the status bar window in screen
98 .Ar x .
99 .It Cm bar_font_color Ns Bq Ar x
100 Color of the font in status bar in screen
101 .Ar x .
102 .It Cm bar_font
103 Status bar font.
104 .It Cm bar_action
105 External script that populates additional information in the status bar,
106 such as battery life.
107 .It Cm bar_delay
108 Update frequency, in seconds, of external script that populates the status bar.
109 .It Cm bar_at_bottom
110 Place the statusbar at the bottom of each region instead of the top.
111 .It Cm stack_enabled
112 Enable or disable displaying the current stacking algorithm in the status bar.
113 .It Cm clock_enabled
114 Enable or disable displaying the clock in the status bar.
115 Disable by setting to 0
116 so a custom clock could be used in the
117 .Pa bar_action
118 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 keyboard_mapping
124 Clear all key bindings and load new key bindings from the specified file.
125 This allows you to load pre-defined key bindings for your keyboard layout.
126 At present, keyboard mapping files for the US and Spanish keyboards are
127 provided in scrotwm_us.conf and scrotwm_es.conf respectively.
128 .It Cm layout
129 Select layout to use at start-of-day.
130 Defined in the format
131 ws[idx]:master_grow:master_add:stack_inc:layout:always_raise:stack_mode, e.g.
132 ws[2]:-4:0:1:0:horizontal sets worskspace 2 to the horizontal stack mode and
133 shrinks the master area by 4 ticks and adds one window to the stack, while
134 maintaining default floating window behavior.
135 Possible stack_mode values are
136 .Pa vertical ,
137 .Pa horizontal
138 and
139 .Pa fullscreen .
140 .Pp
141 See
142 .Pa master_grow ,
143 .Pa master_shrink ,
144 .Pa master_add ,
145 .Pa master_del ,
146 .Pa stack_inc ,
147 .Pa stack_del ,
148 and
149 .Pa always_raise
150 for more information.
151 Note that the stacking options are complicated and have side-effects.
152 One should familiarize oneself with these commands before experimenting with the
153 .Pa layout
154 option.
155 .Pp
156 This setting is not retained at restart.
157 .It Cm region
158 Allocates a custom region, removing any autodetected regions which occupy the same
159 space on the screen.
160 Defined in the format screen[<idx>]:WIDTHxHEIGHT+X+Y,
161 e.g.\& screen[1]:800x1200+0+0.
162 .Pp
163 To make a screen span multiple monitors, create a region big enough to cover
164 them all, e.g. screen[1]:2048x768+0+0 makes the screen span two monitors with
165 1024x768 resolution sitting one next to the other.
166 .It Cm term_width
167 Set a preferred minimum width for the terminal.
168 If this value is greater than 0,
169 .Nm
170 will attempt to adjust the font sizes in the terminal to keep the terminal
171 width above this number as the window is resized.
172 Only
173 .Xr xterm 1
174 is currently supported.
175 The
176 .Xr xterm 1
177 binary must not be setuid or setgid, which it is by default on most systems.
178 Users may need to set program[term] (see the
179 .Sx PROGRAMS
180 section) to use an alternate copy of the
181 .Xr xterm 1
182 binary without the setgid bit set.
183 .It Cm title_class_enabled
184 Enable or disable displaying the window class in the status bar.
185 Enable by setting to 1.
186 .It Cm title_name_enabled
187 Enable or disable displaying the window title in the status bar.
188 Enable by setting to 1.
189 .It Cm urgent_enabled
190 Enable or disable the urgency hint.
191 Note that many terminal emulators require this to be enabled for it to
192 propagate.  In xterm, for example, one needs to add the following line
193 .Pa xterm.urgentOnBell: true
194 to
195 .Pa .Xdefaults .
196 .It Cm window_name_enabled
197 Enable or disable displaying the window name in the status bar.
198 Enable by setting to 1.
199 .It Cm verbose_layout
200 Enable or disable displaying the current master and stack values in the status
201 bar.
202 Enable by setting to 1.
203 .It Cm modkey
204 Change mod key.
205 Mod1 is generally the ALT key and Mod4 is the windows key on a PC.
206 .It Cm focus_mode
207 Using a value of
208 .Pa follow_cursor
209 will make the window manager focus the window
210 under the mouse when switching workspaces and creating windows.
211 .It Cm disable_border
212 Remove border when bar is disabled and there is only one window on the screen.
213 .It Cm border_width
214 Set window border thickness in pixels.
215 Disable all borders by setting to 0.
216 .It Cm program Ns Bq Ar p
217 Define new action to spawn a program
218 .Ar p .
219 See the
220 .Sx PROGRAMS
221 section below.
222 .It Cm bind Ns Bq Ar x
223 Bind key combo to action
224 .Ar x .
225 See the
226 .Sx BINDINGS
227 section below.
228 .It Cm quirk Ns Bq Ar c:n
229 Add "quirk" for windows with class
230 .Ar c
231 and name
232 .Ar n .
233 See the
234 .Sx QUIRKS
235 section below.
236 .El
237 .Pp
238 Colors need to be specified per the
239 .Xr XQueryColor 3
240 specification and fonts need to be specified per the
241 .Xr XQueryFont 3
242 specification.
243 .Pp
244 To list the available fonts in your system see
245 .Xr fc-list 1
246 or
247 .Xr xlsfonts 1
248 manpages.
249 The
250 .Xr xfontsel 1
251 application can help you to show the X Logical Font Description ("XLFD") used
252 as setting in the keyword
253 .Pa bar_font .
254 .Sh PROGRAMS
255 .Nm
256 allows you to define custom actions to launch programs of your choice and then
257 bind them the same as with built-in actions.
258 See the
259 .Sx BINDINGS
260 section below.
261 .Pp
262 The default programs are described below:
263 .Pp
264 .Bl -tag -width "screenshot_wind" -offset indent -compact
265 .It Cm term
266 xterm
267 .It Cm screenshot_all
268 screenshot.sh full
269 .It Cm screenshot_wind
270 screenshot.sh window
271 .It Cm lock
272 xlock
273 .It Cm initscr
274 initscreen.sh
275 .It Cm menu
276 dmenu_run \-fn $bar_font \-nb $bar_color \-nf $bar_font_color \-sb $bar_border \-sf $bar_color
277 .El
278 .Pp
279 Custom programs in the configuration file are specified as follows:
280 .Pp
281 .Dl program[<name>] = <progpath> [<arg> [... <arg>]]
282 .Pp
283 .Aq name
284 is any identifier that does not conflict with a built-in action or keyword,
285 .Aq progpath
286 is the desired program, and
287 .Aq arg
288 is zero or more arguments to the program.
289 .Pp
290 The following variables represent settable values in
291 .Nm
292 (see the
293 .Sx CONFIGURATION FILES
294 section above),
295 and may be used in the
296 .Aq arg
297 fields and will be substituted for values at the time the program is spawned:
298 .Pp
299 .Bl -tag -width "$bar_font_color" -offset indent -compact
300 .It Cm $bar_border
301 .It Cm $bar_color
302 .It Cm $bar_font
303 .It Cm $bar_font_color
304 .It Cm $color_focus
305 .It Cm $color_unfocus
306 .El
307 .Pp
308 Example:
309 .Bd -literal -offset indent
310 program[ff] = /usr/local/bin/firefox http://scrotwm.org/
311 bind[ff] = Mod+f # Now Mod+F launched firefox
312 .Ed
313 .Pp
314 To undo the previous:
315 .Bd -literal -offset indent
316 bind[] = Mod+f
317 program[ff] =
318 .Ed
319 .Sh BINDINGS
320 .Nm
321 provides many functions (or actions) accessed via key or mouse bindings.
322 .Pp
323 The current mouse bindings are described below:
324 .Pp
325 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
326 .It Cm M1
327 Focus window
328 .It Cm M-M1
329 Move window
330 .It Cm M-M3
331 Resize window
332 .It Cm M-S-M3
333 Resize window while maintaining it centered
334 .El
335 .Pp
336 The default key bindings are described below:
337 .Pp
338 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
339 .It Cm M-S- Ns Aq Cm Return
340 term
341 .It Cm M-p
342 menu
343 .It Cm M-S-q
344 quit
345 .It Cm M-q
346 restart
347 .It Cm M- Ns Aq Cm Space
348 cycle_layout
349 .It Cm M-S- Ns Aq Cm Space
350 reset_layout
351 .It Cm M-h
352 master_shrink
353 .It Cm M-l
354 master_grow
355 .It Cm M-,
356 master_add
357 .It Cm M-.
358 master_del
359 .It Cm M-S-,
360 stack_inc
361 .It Cm M-S-.
362 stack_del
363 .It Cm M- Ns Aq Cm Return
364 swap_main
365 .It Xo
366 .Cm M-j ,
367 .Cm M- Ns Aq Cm TAB
368 .Xc
369 focus_next
370 .It Xo
371 .Cm M-k ,
372 .Cm M-S- Ns Aq Cm TAB
373 .Xc
374 focus_prev
375 .It Cm M-m
376 focus_main
377 .It Cm M-S-j
378 swap_next
379 .It Cm M-S-k
380 swap_prev
381 .It Cm M-b
382 bar_toggle
383 .It Cm M-x
384 wind_del
385 .It Cm M-S-x
386 wind_kill
387 .It Cm M- Ns Aq Ar n
388 ws_ Ns Ar n
389 .It Cm M-S- Ns Aq Ar n
390 mvws_ Ns Ar n
391 .It Cm M- Ns Aq Cm Right
392 ws_next
393 .It Cm M- Ns Aq Cm Left
394 ws_prev
395 .It Cm M-a
396 ws_prior
397 .It Cm M-S- Ns Aq Cm Right
398 screen_next
399 .It Cm M-S- Ns Aq Cm Left
400 screen_prev
401 .It Cm M-s
402 screenshot_all
403 .It Cm M-S-s
404 screenshot_wind
405 .It Cm M-S-v
406 version
407 .It Cm M-t
408 float_toggle
409 .It Cm M-S- Ns Aq Cm Delete
410 lock
411 .It Cm M-S-i
412 initscr
413 .It Cm M-w
414 iconify
415 .It Cm M-S-w
416 uniconify
417 .It Cm M-S-r
418 always_raise
419 .It Cm M-v
420 button2
421 .It Cm M--
422 width_shrink
423 .It Cm M-=
424 width_grow
425 .It Cm M-S-
426 height_shrink
427 .It Cm M-S-=
428 height_grow
429 .It Cm M-[
430 move_left
431 .It Cm M-]
432 move_right
433 .It Cm M-S-[
434 move_up
435 .It Cm M-S-]
436 move_down
437 .El
438 .Pp
439 The action names and descriptions are listed below:
440 .Pp
441 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
442 .It Cm term
443 Spawn a new terminal
444 (see
445 .Sx PROGRAMS
446 above).
447 .It Cm menu
448 Menu
449 (see
450 .Sx PROGRAMS
451 above).
452 .It Cm quit
453 Quit
454 .Nm .
455 .It Cm restart
456 Restart
457 .Nm .
458 .It Cm cycle_layout
459 Cycle layout.
460 .It Cm reset_layout
461 Reset layout.
462 .It Cm master_shrink
463 Shrink master area.
464 .It Cm master_grow
465 Grow master area.
466 .It Cm master_add
467 Add windows to master area.
468 .It Cm master_del
469 Remove windows from master area.
470 .It Cm stack_inc
471 Add columns/rows to stacking area.
472 .It Cm stack_del
473 Remove columns/rows from stacking area.
474 .It Cm swap_main
475 Move current window to master area.
476 .It Cm focus_next
477 Focus next window in workspace.
478 .It Cm focus_prev
479 Focus previous window in workspace.
480 .It Cm focus_main
481 Focus on main window in workspace.
482 .It Cm swap_next
483 Swap with next window in workspace.
484 .It Cm swap_prev
485 Swap with previous window in workspace.
486 .It Cm bar_toggle
487 Toggle status bar in all workspaces.
488 .It Cm wind_del
489 Delete current window in workspace.
490 .It Cm wind_kill
491 Destroy current window in workspace.
492 .It Cm ws_ Ns Ar n
493 Switch to workspace
494 .Ar n ,
495 where
496 .Ar n
497 is 1 through 10.
498 .It Cm mvws_ Ns Ar n
499 Move current window to workspace
500 .Ar n ,
501 where
502 .Ar n
503 is 1 through 10.
504 .It Cm ws_next
505 Switch to next workspace with a window in it.
506 .It Cm ws_prev
507 Switch to previous workspace with a window in it.
508 .It Cm ws_prior
509 Switch to last visited workspace.
510 .It Cm screen_next
511 Move pointer to next region.
512 .It Cm screen_prev
513 Move pointer to previous region.
514 .It Cm screenshot_all
515 Take screenshot of entire screen (if enabled)
516 (see
517 .Sx PROGRAMS
518 above).
519 .It Cm screenshot_wind
520 Take screenshot of selected window (if enabled)
521 (see
522 .Sx PROGRAMS
523 above).
524 .It Cm version
525 Toggle version in status bar.
526 .It Cm float_toggle
527 Toggle focused window between tiled and floating.
528 .It Cm lock
529 Lock screen
530 (see
531 .Sx PROGRAMS
532 above).
533 .It Cm initscr
534 Reinitialize physical screens
535 (see
536 .Sx PROGRAMS
537 above).
538 .It Cm iconify
539 Minimize (unmap) currently focused window.
540 .It Cm uniconify
541 Maximize (map) window returned by dmenu selection.
542 .It Cm always_raise
543 When set tiled windows are allowed to obscure floating windows.
544 .It Cm button2
545 Fake a middle mouse button click (mouse button 2).
546 .It Cm width_shrink
547 Shrink the width of a floating window.
548 .It Cm width_grow
549 Grow the width of a floating window.
550 .It Cm height_shrink
551 Shrink the height of a floating window.
552 .It Cm height_grow
553 Grow the height of a floating window.
554 .It Cm move_left
555 Move a floating window a step to the left.
556 .It Cm move_right
557 Move a floating window a step to the right.
558 .It Cm move_up
559 Move a floating window a step upwards.
560 .It Cm move_down
561 Move a floating window a step downwards.
562 .El
563 .Pp
564 Custom bindings in the configuration file are specified as follows:
565 .Pp
566 .Dl bind[<action>] = <keys>
567 .Pp
568 .Aq action
569 is one of the actions listed above (or empty) and
570 .Aq keys
571 is in the form of zero or more modifier keys
572 (MOD, Mod1, Shift, etc.) and one or more normal keys
573 (b, space, etc.), separated by "+".
574 For example:
575 .Bd -literal -offset indent
576 bind[reset] = Mod4+q # bind Windows-key + q to reset
577 bind[] = Mod1+q # unbind Alt + q
578 .Ed
579 .Pp
580 Multiple key combinations may be bound to the same action.
581 .Sh QUIRKS
582 .Nm
583 provides "quirks" which handle windows that must be treated specially
584 in a tiling window manager, such as some dialogs and fullscreen apps.
585 .Pp
586 The default quirks are described below:
587 .Pp
588 .Bl -tag -width "OpenOffice.org N.M:VCLSalFrame<TAB>XXX" -offset indent -compact
589 .It Firefox\-bin:firefox\-bin
590 TRANSSZ
591 .It Firefox:Dialog
592 FLOAT
593 .It Gimp:gimp
594 FLOAT + ANYWHERE
595 .It MPlayer:xv
596 FLOAT + FULLSCREEN + FOCUSPREV
597 .It OpenOffice.org 2.4:VCLSalFrame
598 FLOAT
599 .It OpenOffice.org 3.1:VCLSalFrame
600 FLOAT
601 .It pcb:pcb
602 FLOAT
603 .It xine:Xine Window
604 FLOAT + ANYWHERE
605 .It xine:xine Panel
606 FLOAT + ANYWHERE
607 .It xine:xine Video Fullscreen Window
608 FULLSCREEN + FLOAT
609 .It Xitk:Xitk Combo
610 FLOAT + ANYWHERE
611 .It Xitk:Xine Window
612 FLOAT + ANYWHERE
613 .It XTerm:xterm
614 XTERM_FONTADJ
615 .El
616 .Pp
617 The quirks themselves are described below:
618 .Pp
619 .Bl -tag -width "XTERM_FONTADJ<TAB>XXX" -offset indent -compact
620 .It FLOAT
621 This window should not be tiled, but allowed to float freely.
622 .It TRANSSZ
623 Adjusts size on transient windows that are too small using dialog_ratio
624 (see
625 .Sx CONFIGURATION FILES ) .
626 .It ANYWHERE
627 Allow window to position itself, uncentered.
628 .It XTERM_FONTADJ
629 Adjust xterm fonts when resizing.
630 .It FULLSCREEN
631 Remove border to allow window to use full screen size.
632 .It FOCUSPREV
633 On exit force focus on previously focused application not previous application
634 in the stack.
635 .El
636 .Pp
637 Custom quirks in the configuration file are specified as follows:
638 .Pp
639 .Dl quirk[<class>:<name>] = <quirk> [ + <quirk> ... ]
640 .Pp
641 .Aq class
642 and
643 .Aq name
644 specify the window to which the quirk(s) apply, and
645 .Aq quirk
646 is one of the quirks from the list above.
647 For example:
648 .Bd -literal -offset indent
649 quirk[MPlayer:xv] = FLOAT + FULLSCREEN + FOCUSPREV
650 quirk[pcb:pcb] = NONE  # remove existing quirk
651 .Ed
652 .Pp
653 You can obtain
654 .Aq class
655 and
656 .Aq name
657 by running xprop(1) and then clicking on the desired window.
658 In the following example the main window of Firefox was clicked:
659 .Bd -literal -offset indent
660 $ xprop | grep WM_CLASS
661 WM_CLASS(STRING) = "Navigator", "Firefox"
662 .Ed
663 .Pp
664 Note that grepping for WM_CLASS flips class and name.
665 In the example above the quirk entry would be:
666 .Bd -literal -offset indent
667 quirk[Firefox:Navigator] = FLOAT
668 .Ed
669 .Pp
670 .Nm
671 also automatically assigns quirks to windows based on the value
672 of the window's _NET_WM_WINDOW_TYPE property as follows:
673 .Pp
674 .Bl -tag -width "_NET_WM_WINDOW_TYPE_TOOLBAR<TAB>XXX" -offset indent -compact
675 .It _NET_WM_WINDOW_TYPE_DOCK
676 FLOAT + ANYWHERE
677 .It _NET_WM_WINDOW_TYPE_TOOLBAR
678 FLOAT + ANYWHERE
679 .It _NET_WM_WINDOW_TYPE_UTILITY
680 FLOAT + ANYWHERE
681 .It _NET_WM_WINDOW_TYPE_SPLASH
682 FLOAT
683 .It _NET_WM_WINDOW_TYPE_DIALOG
684 FLOAT
685 .El
686 .Pp
687 In all other cases, no automatic quirks are assigned to the window.
688 Quirks specified in the configuration file override the automatic quirks.
689 .Sh EWMH
690 .Nm
691 partially implements the Extended Window Manager Hints (EWMH) specification.
692 This enables controlling windows as well as
693 .Nm
694 itself from external scripts and programs. This is achieved by
695 .Nm
696 responding to certain ClientMessage events. From the terminal these events
697 can be conveniently sent using tools such as
698 .Xr wmctrl 1
699 and
700 .Xr xdotool 1 .
701 For the
702 actual format of these ClientMessage events, see the EWMH specification.
703 .Pp
704 The id of the currently focused window is stored in the _NET_ACTIVE_WINDOW
705 property of the root window. This can be used for example to retrieve the
706 title of the currently active window with
707 .Xr xprop 1
708 and
709 .Xr grep 1 :
710 .Bd -literal -offset indent
711 $ WINDOWID=`xprop \-root _NET_ACTIVE_WINDOW | grep \-o "0x.*"`
712 $ xprop \-id $WINDOWID WM_NAME | grep \-o "\\".*\\""
713 .Ed
714 .Pp
715 A window can be focused by sending a _NET_ACTIVE_WINDOW client message
716 to the root window. For example, using
717 .Xr wmctrl 1
718 to send the message
719 (assuming 0x4a0000b is the id of the window to be focused):
720 .Bd -literal -offset indent
721 $ wmctrl \-i \-a 0x4a0000b
722 .Ed
723 .Pp
724 Windows can be closed by sending a _NET_CLOSE_WINDOW client message
725 to the root window. For example, using
726 .Xr wmctrl 1
727 to send the message
728 (assuming 0x4a0000b is the id of the window to be closed):
729 .Bd -literal -offset indent
730 $ wmctrl \-i \-c 0x4a0000b
731 .Ed
732 .Pp
733 Windows can be floated and un-floated by adding or removing the
734 _NET_WM_STATE_ABOVE atom from the _NET_WM_STATE property of the window.
735 This can be achieved by sending a _NET_WM_STATE client message to the
736 root window. For example, the following toggles the floating state of
737 a window using
738 .Xr wmctrl 1
739 to send the message (assuming 0x4a0000b is the  id of the window floated
740 or un-floated):
741 .Bd -literal -offset indent
742 $ wmctrl \-i \-r 0x4a0000b \-b toggle,_NET_WM_STATE_ABOVE
743 .Ed
744 .Pp
745 Floating windows can also be resized and moved by sending a
746 _NET_MOVERESIZE_WINDOW client message to the root window. For example,
747 using
748 .Xr wmctrl 1
749 to send the message (assuming 0x4a0000b is the id of
750 the window to be resize/moved):
751 .Bd -literal -offset indent
752 $ wmctrl \-i \-r 0x4a0000b \-e 0,100,50,640,480
753 .Ed
754 .Pp
755 This moves the window to (100,50) and resizes it to 640x480.
756 .Pp
757 Any _NET_MOVERESIZE_WINDOW events received for stacked windows are ignored.
758 .Sh SIGNALS
759 Sending
760 .Nm
761 a HUP signal will restart it.
762 .Sh FILES
763 .Bl -tag -width "/etc/scrotwm.confXXX" -compact
764 .It Pa ~/.scrotwm.conf
765 .Nm
766 user specific settings.
767 .It Pa /etc/scrotwm.conf
768 .Nm
769 global settings.
770 .El
771 .Sh HISTORY
772 .Nm
773 was inspired by xmonad & dwm.
774 .Sh AUTHORS
775 .An -nosplit
776 .Nm
777 was written by:
778 .Pp
779 .Bl -tag -width "Ryan Thomas McBride Aq mcbride@countersiege.com " -offset indent -compact
780 .It Cm Marco Peereboom Aq marco@peereboom.us
781 .It Cm Ryan Thomas McBride Aq mcbride@countersiege.com
782 .It Cm Darrin Chandler Aq dwchandler@stilyagin.com
783 .It Cm Pierre-Yves Ritschard Aq pyr@spootnik.org
784 .It Cm Tuukka Kataja Aq stuge@xor.fi
785 .It Cm Jason L. Wright Aq jason@thought.net
786 .El
787 .Sh BUGS
788 Currently the menu, invoked with
789 .Cm M-p ,
790 depends on dmenu.