JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
new keyboard_mapping option to load pre-defined key bindings for
[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$
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 .Pp
320 .Sh BINDINGS
321 .Nm
322 provides many functions (or actions) accessed via key or mouse bindings.
323 .Pp
324 The current mouse bindings are described below:
325 .Pp
326 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
327 .It Cm M1
328 Focus window
329 .It Cm M-M1
330 Move window
331 .It Cm M-M3
332 Resize window
333 .It Cm M-S-M3
334 Resize window while maintaining it centered
335 .El
336 .Pp
337 The default key bindings are described below:
338 .Pp
339 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
340 .It Cm M-S- Ns Aq Cm Return
341 term
342 .It Cm M-p
343 menu
344 .It Cm M-S-q
345 quit
346 .It Cm M-q
347 restart
348 .It Cm M- Ns Aq Cm Space
349 cycle_layout
350 .It Cm M-S- Ns Aq Cm Space
351 reset_layout
352 .It Cm M-h
353 master_shrink
354 .It Cm M-l
355 master_grow
356 .It Cm M-,
357 master_add
358 .It Cm M-.
359 master_del
360 .It Cm M-S-,
361 stack_inc
362 .It Cm M-S-.
363 stack_del
364 .It Cm M- Ns Aq Cm Return
365 swap_main
366 .It Xo
367 .Cm M-j ,
368 .Cm M- Ns Aq Cm TAB
369 .Xc
370 focus_next
371 .It Xo
372 .Cm M-k ,
373 .Cm M-S- Ns Aq Cm TAB
374 .Xc
375 focus_prev
376 .It Cm M-m
377 focus_main
378 .It Cm M-S-j
379 swap_next
380 .It Cm M-S-k
381 swap_prev
382 .It Cm M-b
383 bar_toggle
384 .It Cm M-x
385 wind_del
386 .It Cm M-S-x
387 wind_kill
388 .It Cm M- Ns Aq Ar n
389 .Ns ws_ Ns Ar n
390 .It Cm M-S- Ns Aq Ar n
391 .Ns mvws_ Ns Ar n
392 .It Cm M- Ns Aq Cm Right
393 ws_next
394 .It Cm M- Ns Aq Cm Left
395 ws_prev
396 .It Cm M-a
397 ws_prior
398 .It Cm M-S- Ns Aq Cm Right
399 screen_next
400 .It Cm M-S- Ns Aq Cm Left
401 screen_prev
402 .It Cm M-s
403 screenshot_all
404 .It Cm M-S-s
405 screenshot_wind
406 .It Cm M-S-v
407 version
408 .It Cm M-t
409 float_toggle
410 .It Cm M-S- Ns Aq Cm Delete
411 lock
412 .It Cm M-S-i
413 initscr
414 .It Cm M-w
415 iconify
416 .It Cm M-S-w
417 uniconify
418 .It Cm M-S-r
419 always_raise
420 .It Cm M-v
421 button2
422 .It Cm M--
423 width_shrink
424 .It Cm M-=
425 width_grow
426 .It Cm M-S-
427 height_shrink
428 .It Cm M-S-=
429 height_grow
430 .It Cm M-[
431 move_left
432 .It Cm M-]
433 move_right
434 .It Cm M-S-[
435 move_up
436 .It Cm M-S-]
437 move_down
438 .El
439 .Pp
440 The action names and descriptions are listed below:
441 .Pp
442 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
443 .It Cm term
444 Spawn a new terminal
445 (see
446 .Sx PROGRAMS
447 above).
448 .It Cm menu
449 Menu
450 (see
451 .Sx PROGRAMS
452 above).
453 .It Cm quit
454 Quit
455 .Nm .
456 .It Cm restart
457 Restart
458 .Nm .
459 .It Cm cycle_layout
460 Cycle layout.
461 .It Cm reset_layout
462 Reset layout.
463 .It Cm master_shrink
464 Shrink master area.
465 .It Cm master_grow
466 Grow master area.
467 .It Cm master_add
468 Add windows to master area.
469 .It Cm master_del
470 Remove windows from master area.
471 .It Cm stack_inc
472 Add columns/rows to stacking area.
473 .It Cm stack_del
474 Remove columns/rows from stacking area.
475 .It Cm swap_main
476 Move current window to master area.
477 .It Cm focus_next
478 Focus next window in workspace.
479 .It Cm focus_prev
480 Focus previous window in workspace.
481 .It Cm focus_main
482 Focus on main window in workspace.
483 .It Cm swap_next
484 Swap with next window in workspace.
485 .It Cm swap_prev
486 Swap with previous window in workspace.
487 .It Cm bar_toggle
488 Toggle status bar in all workspaces.
489 .It Cm wind_del
490 Delete current window in workspace.
491 .It Cm wind_kill
492 Destroy current window in workspace.
493 .It Cm ws_ Ns Ar n
494 Switch to workspace
495 .Ar n ,
496 where
497 .Ar n
498 is 1 through 10.
499 .It Cm mvws_ Ns Ar n
500 Move current window to workspace
501 .Ar n ,
502 where
503 .Ar n
504 is 1 through 10.
505 .It Cm ws_next
506 Switch to next workspace with a window in it.
507 .It Cm ws_prev
508 Switch to previous workspace with a window in it.
509 .It Cm ws_prior
510 Switch to last visited workspace.
511 .It Cm screen_next
512 Move pointer to next region.
513 .It Cm screen_prev
514 Move pointer to previous region.
515 .It Cm screenshot_all
516 Take screenshot of entire screen (if enabled)
517 (see
518 .Sx PROGRAMS
519 above).
520 .It Cm screenshot_wind
521 Take screenshot of selected window (if enabled)
522 (see
523 .Sx PROGRAMS
524 above).
525 .It Cm version
526 Toggle version in status bar.
527 .It Cm float_toggle
528 Toggle focused window between tiled and floating.
529 .It Cm lock
530 Lock screen
531 (see
532 .Sx PROGRAMS
533 above).
534 .It Cm initscr
535 Reinitialize physical screens
536 (see
537 .Sx PROGRAMS
538 above).
539 .It Cm iconify
540 Minimize (unmap) currently focused window.
541 .It Cm uniconify
542 Maximize (map) window returned by dmenu selection.
543 .It Cm always_raise
544 When set tiled windows are allowed to obscure floating windows.
545 .It Cm button2
546 Fake a middle mouse button click (mouse button 2).
547 .It Cm width_shrink
548 Shrink the width of a floating window.
549 .It Cm width_grow
550 Grow the width of a floating window.
551 .It Cm height_shrink
552 Shrink the height of a floating window.
553 .It Cm height_grow
554 Grow the height of a floating window.
555 .It Cm move_left
556 Move a floating window a step to the left.
557 .It Cm move_right
558 Move a floating window a step to the right.
559 .It Cm move_up
560 Move a floating window a step upwards.
561 .It Cm move_down
562 Move a floating window a step downwards.
563 .El
564 .Pp
565 Custom bindings in the configuration file are specified as follows:
566 .Pp
567 .Dl bind[<action>] = <keys>
568 .Pp
569 .Aq action
570 is one of the actions listed above (or empty) and
571 .Aq keys
572 is in the form of zero or more modifier keys
573 (MOD, Mod1, Shift, etc.) and one or more normal keys
574 (b, space, etc.), separated by "+".
575 For example:
576 .Bd -literal -offset indent
577 bind[reset] = Mod4+q # bind Windows-key + q to reset
578 bind[] = Mod1+q # unbind Alt + q
579 .Ed
580 .Pp
581 Multiple key combinations may be bound to the same action.
582 .Sh QUIRKS
583 .Nm
584 provides "quirks" which handle windows that must be treated specially
585 in a tiling window manager, such as some dialogs and fullscreen apps.
586 .Pp
587 The default quirks are described below:
588 .Pp
589 .Bl -tag -width "OpenOffice.org N.M:VCLSalFrame<TAB>XXX" -offset indent -compact
590 .It Firefox\-bin:firefox\-bin
591 TRANSSZ
592 .It Firefox:Dialog
593 FLOAT
594 .It Gimp:gimp
595 FLOAT + ANYWHERE
596 .It MPlayer:xv
597 FLOAT + FULLSCREEN + FOCUSPREV
598 .It OpenOffice.org 2.4:VCLSalFrame
599 FLOAT
600 .It OpenOffice.org 3.1:VCLSalFrame
601 FLOAT
602 .It pcb:pcb
603 FLOAT
604 .It xine:Xine Window
605 FLOAT + ANYWHERE
606 .It xine:xine Panel
607 FLOAT + ANYWHERE
608 .It xine:xine Video Fullscreen Window
609 FULLSCREEN + FLOAT
610 .It Xitk:Xitk Combo
611 FLOAT + ANYWHERE
612 .It Xitk:Xine Window
613 FLOAT + ANYWHERE
614 .It XTerm:xterm
615 XTERM_FONTADJ
616 .El
617 .Pp
618 The quirks themselves are described below:
619 .Pp
620 .Bl -tag -width "XTERM_FONTADJ<TAB>XXX" -offset indent -compact
621 .It FLOAT
622 This window should not be tiled, but allowed to float freely.
623 .It TRANSSZ
624 Adjusts size on transient windows that are too small using dialog_ratio
625 (see
626 .Sx CONFIGURATION FILES ) .
627 .It ANYWHERE
628 Allow window to position itself, uncentered.
629 .It XTERM_FONTADJ
630 Adjust xterm fonts when resizing.
631 .It FULLSCREEN
632 Remove border to allow window to use full screen size.
633 .It FOCUSPREV
634 On exit force focus on previously focused application not previous application
635 in the stack.
636 .El
637 .Pp
638 Custom quirks in the configuration file are specified as follows:
639 .Pp
640 .Dl quirk[<class>:<name>] = <quirk> [ + <quirk> ... ]
641 .Pp
642 .Aq class
643 and
644 .Aq name
645 specify the window to which the quirk(s) apply, and
646 .Aq quirk
647 is one of the quirks from the list above.
648 For example:
649 .Bd -literal -offset indent
650 quirk[MPlayer:xv] = FLOAT + FULLSCREEN + FOCUSPREV
651 quirk[pcb:pcb] = NONE  # remove existing quirk
652 .Ed
653 .Pp
654 You can obtain
655 .Aq class
656 and
657 .Aq name
658 by running xprop(1) and then clicking on the desired window.
659 In the following example the main window of Firefox was clicked:
660 .Bd -literal -offset indent
661 $ xprop | grep WM_CLASS
662 WM_CLASS(STRING) = "Navigator", "Firefox"
663 .Ed
664 .Pp
665 Note that grepping for WM_CLASS flips class and name.
666 In the example above the quirk entry would be:
667 .Bd -literal -offset indent
668 quirk[Firefox:Navigator] = FLOAT
669 .Ed
670 .Pp
671 .Nm
672 also automatically assigns quirks to windows based on the value 
673 of the window's _NET_WM_WINDOW_TYPE property as follows:
674 .Pp
675 .Bl -tag -width "_NET_WM_WINDOW_TYPE_TOOLBAR<TAB>XXX" -offset indent -compact
676 .It _NET_WM_WINDOW_TYPE_DOCK
677 FLOAT + ANYWHERE
678 .It _NET_WM_WINDOW_TYPE_TOOLBAR
679 FLOAT + ANYWHERE
680 .It _NET_WM_WINDOW_TYPE_UTILITY
681 FLOAT + ANYWHERE
682 .It _NET_WM_WINDOW_TYPE_SPLASH
683 FLOAT
684 .It _NET_WM_WINDOW_TYPE_DIALOG
685 FLOAT
686 .El
687 .Pp
688 In all other cases, no automatic quirks are assigned to the window. 
689 Quirks specified in the configuration file override the automatic quirks.
690 .Sh EWMH
691 .Nm
692 partially implements the Extended Window Manager Hints (EWMH) specification. 
693 This enables controlling windows as well as
694 .Nm
695 itself from external scripts and programs. This is achieved by 
696 .Nm
697 responding to certain ClientMessage events. From the terminal these events 
698 can be conveniently sent using tools such as
699 .Xr wmctrl 1
700 and
701 .Xr xdotool 1 .
702 For the
703 actual format of these ClientMessage events, see the EWMH specification.
704 .Pp
705 The id of the currently focused window is stored in the _NET_ACTIVE_WINDOW 
706 property of the root window. This can be used for example to retrieve the 
707 title of the currently active window with
708 .Xr xprop 1
709 and
710 .Xr grep 1 :
711 .Bd -literal -offset indent
712 $ WINDOWID=`xprop \-root _NET_ACTIVE_WINDOW | grep \-o "0x.*"`
713 $ xprop \-id $WINDOWID WM_NAME | grep \-o "\\".*\\""
714 .Ed
715 .Pp
716 A window can be focused by sending a _NET_ACTIVE_WINDOW client message 
717 to the root window. For example, using
718 .Xr wmctrl 1
719 to send the message
720 (assuming 0x4a0000b is the id of the window to be focused):
721 .Bd -literal -offset indent
722 $ wmctrl \-i \-a 0x4a0000b
723 .Ed
724 .Pp
725 Windows can be closed by sending a _NET_CLOSE_WINDOW client message 
726 to the root window. For example, using
727 .Xr wmctrl 1
728 to send the message
729 (assuming 0x4a0000b is the id of the window to be closed):
730 .Bd -literal -offset indent
731 $ wmctrl \-i \-c 0x4a0000b
732 .Ed
733 .Pp
734 Windows can be floated and un-floated by adding or removing the 
735 _NET_WM_STATE_ABOVE atom from the _NET_WM_STATE property of the window. 
736 This can be achieved by sending a _NET_WM_STATE client message to the 
737 root window. For example, the following toggles the floating state of 
738 a window using
739 .Xr wmctrl 1
740 to send the message (assuming 0x4a0000b is the  id of the window floated
741 or un-floated):
742 .Bd -literal -offset indent
743 $ wmctrl \-i \-r 0x4a0000b \-b toggle,_NET_WM_STATE_ABOVE
744 .Ed
745 .Pp
746 Floating windows can also be resized and moved by sending a 
747 _NET_MOVERESIZE_WINDOW client message to the root window. For example, 
748 using
749 .Xr wmctrl 1
750 to send the message (assuming 0x4a0000b is the id of
751 the window to be resize/moved):
752 .Bd -literal -offset indent
753 $ wmctrl \-i \-r 0x4a0000b \-e 0,100,50,640,480
754 .Ed
755 .Pp
756 This moves the window to (100,50) and resizes it to 640x480.
757 .Pp
758 Any _NET_MOVERESIZE_WINDOW events received for stacked windows are ignored.
759 .Pp
760 .Sh SIGNALS
761 Sending
762 .Nm
763 a HUP signal will restart it.
764 .Sh FILES
765 .Bl -tag -width "/etc/scrotwm.confXXX" -compact
766 .It Pa ~/.scrotwm.conf
767 .Nm
768 user specific settings.
769 .It Pa /etc/scrotwm.conf
770 .Nm
771 global settings.
772 .El
773 .Sh HISTORY
774 .Nm
775 was inspired by xmonad & dwm.
776 .Sh AUTHORS
777 .An -nosplit
778 .Nm
779 was written by:
780 .Pp
781 .Bl -tag -width "Ryan Thomas McBride Aq mcbride@countersiege.com " -offset indent -compact
782 .It Cm Marco Peereboom Aq marco@peereboom.us
783 .It Cm Ryan Thomas McBride Aq mcbride@countersiege.com
784 .It Cm Darrin Chandler Aq dwchandler@stilyagin.com
785 .It Cm Pierre-Yves Ritschard Aq pyr@spootnik.org
786 .It Cm Tuukka Kataja Aq stuge@xor.fi
787 .It Cm Jason L. Wright Aq jason@thought.net
788 .El
789 .Sh BUGS
790 Currently the menu, invoked with
791 .Cm M-p ,
792 depends on dmenu.