JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
merge upstream jason
authorJason Woofenden <jason@jasonwoof.com>
Sun, 19 Oct 2014 18:49:50 +0000 (14:49 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Sun, 19 Oct 2014 18:49:50 +0000 (14:49 -0400)
baraction.sh
linux/Makefile
spectrwm.1
spectrwm.c
spectrwm.conf
spectrwm_it.1
version.h

index e87b93d..77c7454 100644 (file)
@@ -92,7 +92,7 @@ while :; do
                if [ $(( ${I} % 1 )) -eq 0 ]; then
                        APM_DATA=`/usr/sbin/apm -alb`
                fi
-               if [ $I -gt 2 ]; then
+               if [ $I -ge 2 ]; then
                        # print_date
                        print_mem $MEM
                        print_cpu $REPLY
@@ -100,6 +100,6 @@ while :; do
                        print_apm $APM_DATA
                        echo ""
                fi
-               I=$(( ${I} + 1 ));
+               I=$(( ( ${I} + 1 ) % 22 ));
        done
 done
index f48a32f..e219936 100644 (file)
@@ -1,55 +1,74 @@
-PREFIX?= /usr/local
-BINDIR?= $(PREFIX)/bin
-LIBDIR?= $(PREFIX)/lib
-MANDIR?= $(PREFIX)/share/man
+PREFIX       ?= /usr/local
+BINDIR       ?= $(PREFIX)/bin
+LIBDIR       ?= $(PREFIX)/lib
+DATAROOTDIR  ?= $(PREFIX)/share
+MANDIR       ?= $(DATAROOTDIR)/man
+XSESSIONSDIR ?= $(DATAROOTDIR)/xsessions
 
-LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor)
+BUILDVERSION    = $(shell sh $(CURDIR)/../buildver.sh)
+LIBVERSION      = $(shell .  $(CURDIR)/../lib/shlib_version; echo $$major.$$minor)
+LIBMAJORVERSION = $(shell .  $(CURDIR)/../lib/shlib_version; echo $$major)
 
-CFLAGS+= -std=c99 -Wmissing-prototypes -Wall -Wextra -Wshadow -Wno-uninitialized -g
-CFLAGS+= -D_GNU_SOURCE -I. -I/usr/include/freetype2 -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\"
-LDADD+= -lX11 -lX11-xcb -lxcb -lxcb-icccm -lxcb-randr -lxcb-keysyms -lxcb-util -lxcb-xtest -lXft -lXcursor
+MAINT_CFLAGS   = -std=c99 -Wmissing-prototypes -Wall -Wextra -Wshadow -Wno-uninitialized -g
+MAINT_CPPFLAGS = -D_GNU_SOURCE -I. -I/usr/include/freetype2 -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LIBVERSION)\"
+MAINT_LDLIBS   = -lX11 -lX11-xcb -lxcb -lxcb-icccm -lxcb-randr -lxcb-keysyms -lxcb-util -lxcb-xtest -lXft -lXcursor
 
-CC?= cc
-
-BUILDVERSION= $(shell sh $(CURDIR)/../buildver.sh)
 ifneq ("${BUILDVERSION}", "")
-CFLAGS+= -DSPECTRWM_BUILDSTR=\"$(BUILDVERSION)\"
+MAINT_CPPFLAGS += -DSPECTRWM_BUILDSTR=\"$(BUILDVERSION)\"
 endif
 
-all: spectrwm libswmhack.so.$(LVERS)
+all: spectrwm libswmhack.so.$(LIBVERSION)
 
-spectrwm.c:
-       ln -sf ../spectrwm.c
-       ln -sf ../version.h
+spectrwm: spectrwm.o linux.o
+       $(CC) $(MAINT_LDFLAGS) $(LDFLAGS) -o $@ $+ $(MAINT_LDLIBS) $(LDLIBS)
 
-swm_hack.c:
-       ln -sf ../lib/swm_hack.c
+spectrwm.o: ../spectrwm.c ../version.h tree.h util.h
+       $(CC) $(MAINT_CFLAGS) $(CFLAGS) $(MAINT_CPPFLAGS) $(CPPFLAGS) -c -o $@ $<
 
-spectrwm: spectrwm.o linux.o
-       $(CC) $(LDFLAGS) -o $@ $+ $(LDADD)
+linux.o: linux.c util.h
+       $(CC) $(MAINT_CFLAGS) $(CFLAGS) $(MAINT_CPPFLAGS) $(CPPFLAGS) -c -o $@ $<
 
-%.so: %.c
-       $(CC) $(CFLAGS) -c -fpic -DPIC $+ -o $@
+libswmhack.so.$(LIBVERSION): swm_hack.so
+       $(CC) $(MAINT_LDFLAGS) $(LDFLAGS) -Wl,-soname,$@ -shared -fpic -o $@ $+ $(MAINT_LDLIBS) $(LDLIBS)
 
-libswmhack.so.$(LVERS): swm_hack.so
-       $(CC) $(LDFLAGS) -Wl,-soname,$@ -shared -fpic -o libswmhack.so.$(LVERS) swm_hack.so $(LDADD)
+swm_hack.so: ../lib/swm_hack.c
+       $(CC) $(MAINT_CFLAGS) $(CFLAGS) $(MAINT_CPPFLAGS) $(CPPFLAGS) -fpic -DPIC -c -o $@ $<
+
+clean:
+       rm -f spectrwm *.o libswmhack.so.* *.so
 
 install: all
        install -m 755 -d $(DESTDIR)$(BINDIR)
        install -m 755 -d $(DESTDIR)$(LIBDIR)
        install -m 755 -d $(DESTDIR)$(MANDIR)/man1
-       install -m 755 spectrwm $(DESTDIR)$(BINDIR)
-       install -m 755 libswmhack.so.$(LVERS) $(DESTDIR)$(LIBDIR)
-       install -m 644 ../spectrwm.1 $(DESTDIR)$(MANDIR)/man1/spectrwm.1
-       install -m 644 ../spectrwm_es.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_es.1
-       install -m 644 ../spectrwm_it.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_it.1
-       install -m 644 ../spectrwm_pt.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_pt.1
-       install -m 644 ../spectrwm_ru.1 $(DESTDIR)$(MANDIR)/man1/spectrwm_ru.1
-       ln -sf spectrwm $(DESTDIR)$(BINDIR)/scrotwm
-       ln -sf libswmhack.so.0.0 $(DESTDIR)$(LIBDIR)/libswmhack.so.0
-       ln -sf libswmhack.so.0.0 $(DESTDIR)$(LIBDIR)/libswmhack.so
+       install -m 755 -d $(DESTDIR)$(MANDIR)/es/man1
+       install -m 755 -d $(DESTDIR)$(MANDIR)/it/man1
+       install -m 755 -d $(DESTDIR)$(MANDIR)/pt/man1
+       install -m 755 -d $(DESTDIR)$(MANDIR)/ru/man1
+       install -m 755 -d $(DESTDIR)$(XSESSIONSDIR)
+       install -m 755 spectrwm                    $(DESTDIR)$(BINDIR)
+       ln -sf spectrwm                            $(DESTDIR)$(BINDIR)/scrotwm
+       install -m 644 libswmhack.so.$(LIBVERSION) $(DESTDIR)$(LIBDIR)
+       ln -sf libswmhack.so.$(LIBVERSION)         $(DESTDIR)$(LIBDIR)/libswmhack.so.$(LIBMAJORVERSION)
+       ln -sf libswmhack.so.$(LIBVERSION)         $(DESTDIR)$(LIBDIR)/libswmhack.so
+       install -m 644 ../spectrwm.1               $(DESTDIR)$(MANDIR)/man1/spectrwm.1
+       install -m 644 ../spectrwm_es.1            $(DESTDIR)$(MANDIR)/es/man1/spectrwm.1
+       install -m 644 ../spectrwm_it.1            $(DESTDIR)$(MANDIR)/it/man1/spectrwm.1
+       install -m 644 ../spectrwm_pt.1            $(DESTDIR)$(MANDIR)/pt/man1/spectrwm.1
+       install -m 644 ../spectrwm_ru.1            $(DESTDIR)$(MANDIR)/ru/man1/spectrwm.1
+       install -m 644 spectrwm.desktop            $(DESTDIR)$(XSESSIONSDIR)
 
-clean:
-       rm -f spectrwm *.o *.so libswmhack.so.* spectrwm.c swm_hack.c version.h
+uninstall:
+       rm -f $(DESTDIR)$(BINDIR)/spectrwm
+       rm -f $(DESTDIR)$(BINDIR)/scrotwm
+       rm -f $(DESTDIR)$(LIBDIR)/libswmhack.so.$(LIBVERSION)
+       rm -f $(DESTDIR)$(LIBDIR)/libswmhack.so.$(LIBMAJORVERSION)
+       rm -f $(DESTDIR)$(LIBDIR)/libswmhack.so
+       rm -f $(DESTDIR)$(MANDIR)/man1/spectrwm.1
+       rm -f $(DESTDIR)$(MANDIR)/es/man1/spectrwm.1
+       rm -f $(DESTDIR)$(MANDIR)/it/man1/spectrwm.1
+       rm -f $(DESTDIR)$(MANDIR)/pt/man1/spectrwm.1
+       rm -f $(DESTDIR)$(MANDIR)/ru/man1/spectrwm.1
+       rm -f $(DESTDIR)$(XSESSIONSDIR)/spectrwm.desktop
 
-.PHONY: all install clean
+.PHONY: all clean install uninstall
index bc2ed7f..1e86e00 100644 (file)
@@ -71,7 +71,10 @@ If that file is unavailable,
 it then tries to open the global configuration file
 .Pa /etc/spectrwm.conf .
 .Pp
-The format of the file is \*(Ltkeyword\*(Gt = \*(Ltsetting\*(Gt.
+The format of the file is
+.Pp
+.Dl Ar keyword Li = Ar setting
+.Pp
 For example:
 .Pp
 .Dl color_focus = red
@@ -82,15 +85,41 @@ Colors need to be specified per the
 .Xr XQueryColor 3
 specification.
 .Pp
-Comments begin with a #.  When a literal '#' is desired in an option, then it
-must be escaped with a backslash. i.e. \e#
+Comments begin with a #.
+When a literal
+.Ql #
+is desired in an option, then it must be escaped with a backslash, i.e. \e#
 .Pp
 The file supports the following keywords:
 .Bl -tag -width 2m
 .It Ic autorun
 Launch an application in a specified workspace at start-of-day.
-Defined in the format ws[<idx>]:application, e.g. ws[2]:xterm launches an
-xterm in workspace 2.
+Defined in the format
+.Li ws Ns Bo Ar idx Bc : Ns Ar application ,
+e.g. ws[2]:xterm launches an
+.Xr xterm 1
+in workspace 2.
+.Pp
+Note that workspace mapping is handled via
+.Pa libswmhack.so .
+When
+.Ic autorun
+spawns windows via a daemon, ensure the daemon is started
+with the correct
+.Pa LD_PRELOAD
+in its environment.
+.Pp
+For example, starting
+.Xr urxvtd 1
+via
+.Xr xinit 1 :
+.Bd -literal -offset indent
+LD_PRELOAD=/usr/lib/libswmhack.so.0.0 urxvtd -q -o -f
+.Ed
+.Pp
+Spawned programs automatically have
+.Pa LD_PRELOAD
+set when executed.
 .It Ic bar_action
 External script that populates additional information in the status bar,
 such as battery life.
@@ -110,22 +139,26 @@ Background color of the status bar(s) in screen
 .Ar x .
 .It Ic bar_enabled
 Set default
-.Ar bar_toggle
+.Ic bar_toggle
 state; default is 1.
 .It Ic bar_enabled_ws Ns Bq Ar x
 Set default
-.Ar bar_toggle_ws
+.Ic bar_toggle_ws
 state on workspace
 .Ar x ;
 default is 1.
 .It Ic bar_font
-Font used in the status bar. Either Xft or X Logical Font Description (XLFD)
-may be used to specify fonts. Fallback fonts may be specified by separating
-each font with a comma. If all entries are XLFD syntax, font set will be
-used. If at least one entry is Xft, Xft will be used. Note that if Xft is in
-use, only the first font that successfully loads will be used regardless of
-missing glyphs. The default is to use font set. Also note that dmenu does
-not support Xft fonts.
+Font used in the status bar.
+Either Xft or X Logical Font Description (XLFD) may be used to specify fonts.
+Fallback fonts may be specified by separating each font with a comma.
+If all entries are in XLFD syntax, font set will be used.
+If at least one entry is Xft, Xft will be used.
+Note that if Xft is in use, only the first font that successfully loads will
+be used regardless of missing glyphs.
+The default is to use font set.
+Also note that
+.Xr dmenu 1
+does not support Xft fonts.
 .Pp
 Xft examples:
 .Bd -literal -offset indent
@@ -156,7 +189,7 @@ application can help with the XLFD setting.
 Color of the font in status bar in screen
 .Ar x .
 .It Ic bar_format
-Set the bar_format string and overrides
+Set the bar format string, overriding
 .Ic clock_format
 and all of the
 .Ic enabled
@@ -185,19 +218,19 @@ It may contain the following character sequences:
 .El
 .Pp
 All character sequences may limit its output to a specific length, for
-example +64A. Any characters that don't match the specification are copied
-as-is.
+example +64A.
+Any characters that don't match the specification are copied as-is.
 .It Ic bar_justify
-Justify the status bar text. Possible values are
-.Pa left ,
-.Pa center ,
+Justify the status bar text.
+Possible values are
+.Ar left ,
+.Ar center ,
 and
-.Pa right .
+.Ar right .
 .Pp
-Note that if the output is not
-.Pa left
-justified, it may not be properly aligned in some circumstances, due to the
-white-spaces in the default static format.
+Note that if the output is not left justified, it may not be properly
+aligned in some circumstances, due to the white-spaces in the default
+static format.
 See the
 .Ic bar_format
 option for more details.
@@ -211,29 +244,33 @@ section below.
 Set window border thickness in pixels.
 Disable all borders by setting to 0.
 .It Ic boundary_width
-Set region containment boundary width in pixels.  This is how far a window
-must be dragged/resized beyond the region edge before it is allowed outside
-the region.  This has no effect when manipulating the window with key
-bindings.  Disable the window containment effect by setting to 0.
+Set region containment boundary width in pixels.
+This is how far a window must be dragged/resized beyond the region edge
+before it is allowed outside the region.
+This has no effect when manipulating the window with key bindings.
+Disable the window containment effect by setting to 0.
 .It Ic clock_enabled
 Enable or disable displaying the clock in the status bar.
 Disable by setting to 0
 so a custom clock could be used in the
-.Pa bar_action
+.Ic bar_action
 script.
 .It Ic iconic_enabled
 Display the number of iconic (minimized) windows in the status bar.
 Enable by setting to 1.
 .It Ic color_focus
-Border color of the currently focused window.  Default is red.
+Border color of the currently focused window.
+Default is red.
 .It Ic color_focus_maximized
-Border color of the currently focused, maximized window.  Defaults to the
-value of color_focus.
+Border color of the currently focused, maximized window.
+Defaults to the value of
+.Ic color_focus .
 .It Ic color_unfocus
 Border color of unfocused windows, default is rgb:88/88/88.
 .It Ic color_unfocus_maximized
-Border color of unfocused, maximized windows.  Defaults to the value of
-color_unfocus.
+Border color of unfocused, maximized windows.
+Defaults to the value of
+.Ic color_unfocus .
 .It Ic dialog_ratio
 Some applications have dialogue windows that are too small to be useful.
 This ratio is the screen size to what they will be resized.
@@ -244,40 +281,44 @@ region.
 .It Ic focus_close
 Window to put focus when the focused window is closed.
 Possible values are
-.Pa first ,
-.Pa next ,
-.Pa previous
+.Ar first ,
+.Ar next ,
+.Ar previous
 (default) and
-.Pa last .
-.Pa next
+.Ar last .
+.Ar next
 and
-.Pa previous
+.Ar previous
 are relative to the window that is closed.
 .It Ic focus_close_wrap
 Whether to allow the focus to jump to the last window when the first window
-is closed or vice versa. Disable by setting to 0.
+is closed or vice versa.
+Disable by setting to 0.
 .It Ic focus_default
-Window to put focus when no window has been focused. Possible values are
-.Pa first
+Window to put focus when no window has been focused.
+Possible values are
+.Ar first
 and
-.Pa last
+.Ar last
 (default).
 .It Ic focus_mode
-Window focus behavior with respect to the mouse cursor. Possible values:
+Window focus behavior with respect to the mouse cursor.
+Possible values:
 .Pp
 .Bl -tag -width "default" -offset indent -compact
-.It Cm default
+.It Ar default
 Set window focus on border crossings caused by cursor motion and
 window interaction.
-.It Cm follow
+.It Ar follow
 Set window focus on all cursor border crossings, including workspace switches
 and changes to layout.
-.It Cm manual
+.It Ar manual
 Set window focus on window interaction only.
 .El
 .It Ic java_workaround
 Workaround a Java GUI rendering issue on non-reparenting window managers by
-impersonating LG3D window manager, written by Sun. Default is 1.
+impersonating the LG3D window manager, written by Sun.
+Default is 1.
 .It Ic keyboard_mapping
 Clear all key bindings and load new key bindings from the specified file.
 This allows you to load pre-defined key bindings for your keyboard layout.
@@ -286,32 +327,36 @@ See the
 section below for a list of keyboard mapping files that have been provided
 for several keyboard layouts.
 .It Ic layout
-Select layout to use at start-of-day. Defined in the format
-ws[idx]:master_grow:master_add:stack_inc:always_raise:stack_mode, e.g.
-ws[2]:-4:0:1:0:horizontal sets worskspace 2 to the horizontal stack mode and
-shrinks the master area by 4 ticks and adds one window to the stack, while
-maintaining default floating window behavior.
-Possible stack_mode values are
-.Pa vertical ,
-.Pa vertical_flip ,
-.Pa horizontal ,
-.Pa horizontal_flip
+Select layout to use at start-of-day.
+Defined in the format
+.Li ws Ns Bo Ar idx Bc : Ns Ar master_grow : Ns Ar master_add : Ns Ar stack_inc : Ns Ar always_raise : Ns Ar stack_mode ,
+e.g. ws[2]:-4:0:1:0:horizontal sets worskspace 2 to the horizontal stack
+mode, shrinks the master area by 4 ticks and adds one window to the
+stack, while maintaining default floating window behavior.
+Possible
+.Ar stack_mode
+values are
+.Ar vertical ,
+.Ar vertical_flip ,
+.Ar horizontal ,
+.Ar horizontal_flip
 and
-.Pa fullscreen .
+.Ar fullscreen .
 .Pp
 See
-.Pa master_grow ,
-.Pa master_shrink ,
-.Pa master_add ,
-.Pa master_del ,
-.Pa stack_inc ,
-.Pa stack_dec ,
+.Ic master_grow ,
+.Ic master_shrink ,
+.Ic master_add ,
+.Ic master_del ,
+.Ic stack_inc ,
+.Ic stack_dec ,
 and
-.Pa always_raise
+.Ic always_raise
 for more information.
-Note that the stacking options are complicated and have side-effects. One
-should familiarize oneself with these commands before experimenting with the
-.Pa layout
+Note that the stacking options are complicated and have side-effects.
+One should familiarize oneself with these commands before experimenting
+with the
+.Ic layout
 option.
 .Pp
 This setting is not retained at restart.
@@ -320,8 +365,9 @@ Change mod key.
 Mod1 is generally the ALT key and Mod4 is the windows key on a PC.
 .It Ic name
 Set the name of a workspace at start-of-day.
-Defined in the format ws[<idx>]:<name>, e.g. ws[1]:Console sets the name of
-workspace 1 to
+Defined in the format
+.Li ws Ns Bo Ar idx Bc : Ns Ar name ,
+e.g. ws[1]:Console sets the name of workspace 1 to
 .Dq Console .
 .It Ic program Ns Bq Ar p
 Define new action to spawn a program
@@ -329,7 +375,7 @@ Define new action to spawn a program
 See the
 .Sx PROGRAMS
 section below.
-.It Ic quirk Ns Bq Ar c:i:n
+.It Ic quirk Ns Bq Ar c Ns Li : Ns Ar i Ns Li : Ns Ar n
 Add "quirk" for windows with class
 .Ar c ,
 instance
@@ -342,8 +388,9 @@ section below.
 .It Ic region
 Allocates a custom region, removing any autodetected regions which occupy the
 same space on the screen.
-Defined in the format screen[<idx>]:WIDTHxHEIGHT+X+Y,
-e.g.\& screen[1]:800x1200+0+0.
+Defined in the format
+.Li screen Ns Bo Ar idx Ns Bc : Ns Ar width Ns x Ns Ar height Ns + Ns Ar x Ns + Ns Ar y ,
+e.g. screen[1]:800x1200+0+0.
 .Pp
 To make a region span multiple monitors, create a region big enough to cover
 them all, e.g. screen[1]:2048x768+0+0 makes the region span two monitors with
@@ -354,15 +401,15 @@ Disable by setting to 0.
 .It Ic spawn_position
 Position in stack to place newly spawned windows.
 Possible values are
-.Pa first ,
-.Pa next ,
-.Pa previous
+.Ar first ,
+.Ar next ,
+.Ar previous
 and
-.Pa last
+.Ar last
 (default).
-.Pa next
+.Ar next
 and
-.Pa previous
+.Ar previous
 are relative to the focused window.
 .It Ic stack_enabled
 Enable or disable displaying the current stacking algorithm in the status
@@ -385,14 +432,23 @@ section) to use an alternate copy of the
 .Xr xterm 1
 binary without the setgid bit set.
 .It Ic tile_gap
-Pixel width of empty space between tiled windows.  Negative values cause overlap.
-Set this to the opposite of border_width to collapse the border between tiles.
+Pixel width of empty space between tiled windows.
+Negative values cause overlap.
+Set this to the opposite of
+.Ic border_width
+to collapse the border between tiles.
 Disable by setting to 0.
+.It Ic urgent_collapse
+Enables hiding of placeholders in the urgency hint indicator for workspaces that
+do not have any urgent windows.
+Enable by setting to 1.
 .It Ic urgent_enabled
 Enable or disable the urgency hint indicator in the status bar.
 Note that many terminal emulators require an explicit setting for the bell
-character to trigger urgency on the window.  In xterm, for example, one needs to
-add the following line to
+character to trigger urgency on the window.
+In
+.Xr xterm 1 ,
+for example, one needs to add the following line to
 .Pa .Xdefaults :
 .Bd -literal -offset indent
 xterm.bellIsUrgent: true
@@ -402,30 +458,37 @@ Enable or disable displaying the current master window count and stack column/ro
 count in the status bar.
 Enable by setting to 1.
 See
-.Pa master_add ,
-.Pa master_del ,
-.Pa stack_inc
+.Ar master_add ,
+.Ar master_del ,
+.Ar stack_inc
 and
-.Pa stack_dec
+.Ar stack_dec
 for more information.
 .It Ic window_class_enabled
 Enable or disable displaying the window class name (from WM_CLASS) in the
-status bar.  Enable by setting to 1.
+status bar.
+Enable by setting to 1.
 .It Ic window_instance_enabled
 Enable or disable displaying the window instance name (from WM_CLASS) in the
-status bar.  Enable by setting to 1.
+status bar.
+Enable by setting to 1.
 .It Ic window_name_enabled
 Enable or disable displaying the window display name (from _NET_WM_NAME/WM_NAME)
-in the status bar.  Enable by setting to 1.
+in the status bar.
+Enable by setting to 1.
 .Pp
 To prevent excessively large window names from pushing the remaining text off
 the bar, it's limited to 64 characters, by default.
 See the
 .Ic bar_format
 option for more details.
+.It Ic warp_pointer
+Centers the mouse pointer on the focused window when using key bindings to
+change focus, switch workspaces, change regions, etc.
+Enable by setting to 1.
 .It Ic workspace_limit
-Set the total number of workspaces available. Minimum is 1, maximum is 22,
-default is 10.
+Set the total number of workspaces available.
+Minimum is 1, maximum is 22, default is 10.
 .El
 .Sh PROGRAMS
 .Nm
@@ -437,17 +500,18 @@ section below.
 .Pp
 Custom programs in the configuration file are specified as follows:
 .Pp
-.Dl program[<action>] = <progpath> [<arg> [... <arg>]]
+.Dl program Ns Bo Ar action Bc = Ar progpath Op Ar arg Op Ar arg ...
 .Pp
-.Aq action
+.Ar action
 is any identifier that does not conflict with a built-in action or keyword,
-.Aq progpath
+.Ar progpath
 is the desired program, and
-.Aq arg
+.Ar arg
 is zero or more arguments to the program.
 .Pp
-Remember that when using # in your program call, it must be escaped with a
-backslash. i.e. \e#
+Remember that when using
+.Ql #
+in your program call, it must be escaped with a backslash, i.e. \e#
 .Pp
 The following argument variables will be substituted for values at the time the program
 is spawned:
@@ -460,7 +524,9 @@ is spawned:
 .It Cm $color_focus
 .It Cm $color_unfocus
 .It Cm $dmenu_bottom
--b if bar_at_bottom is enabled.
+\-b if
+.Ic bar_at_bottom
+is enabled.
 .It Cm $region_index
 .It Cm $workspace_index
 .El
@@ -468,12 +534,12 @@ is spawned:
 Example:
 .Bd -literal -offset indent
 program[ff] = /usr/local/bin/firefox http://spectrwm.org/
-bind[ff] = Mod+Shift+b # Now M-S-b launches firefox
+bind[ff] = MOD+Shift+b # Now M-S-b launches firefox
 .Ed
 .Pp
 To cancel the previous, unbind it:
 .Bd -literal -offset indent
-bind[] = Mod+Shift+b
+bind[] = MOD+Shift+b
 .Ed
 .Pp
 Default programs:
@@ -501,7 +567,7 @@ by freeing the respective key binding.
 For example, to override
 .Ic lock :
 .Bd -literal -offset indent
-program[lock] = xscreensaver-command --lock
+program[lock] = xscreensaver\-command \-lock
 .Ed
 .Pp
 To unbind
@@ -540,7 +606,7 @@ quit
 restart
 .It Cm M- Ns Aq Cm Space
 cycle_layout
-.It Cm M-S- Ns Aq Cm \e
+.It Cm M-S-\e
 flip_layout
 .It Cm M-S- Ns Aq Cm Space
 stack_reset
@@ -702,7 +768,8 @@ Focus previous window in workspace.
 .It Cm focus_main
 Focus on main window in workspace.
 .It Cm focus_urgent
-Focus on next window with the urgency hint flag set.  The workspace is switched if needed.
+Focus on next window with the urgency hint flag set.
+The workspace is switched if needed.
 .It Cm swap_next
 Swap with next window in workspace.
 .It Cm swap_prev
@@ -720,13 +787,15 @@ Switch to workspace
 .Ar n ,
 where
 .Ar n
-is 1 through workspace_limit.
+is 1 through
+.Ic workspace_limit .
 .It Cm mvws_ Ns Ar n
 Move current window to workspace
 .Ar n ,
 where
 .Ar n
-is 1 through workspace_limit.
+is 1 through
+.Ic workspace_limit .
 .It Cm rg_ Ns Ar n
 Focus on region
 .Ar n ,
@@ -784,7 +853,9 @@ above).
 .It Cm iconify
 Minimize (unmap) currently focused window.
 .It Cm uniconify
-Restore (map) window returned by dmenu selection.
+Restore (map) window returned by
+.Xr dmenu 1
+selection.
 .It Cm maximize_toggle
 Toggle maximization of focused window.
 .It Cm always_raise
@@ -817,14 +888,15 @@ Search the windows in the current workspace.
 .Pp
 Custom bindings in the configuration file are specified as follows:
 .Pp
-.Dl bind[<action>] = <keys>
+.Dl bind Ns Bo Ar action Bc = Ar keys
 .Pp
-.Aq action
+.Ar action
 is one of the actions listed above (or empty to unbind) and
-.Aq keys
+.Ar keys
 is in the form of zero or more modifier keys
 (MOD, Mod1, Shift, etc.) and one or more normal keys
-(b, space, etc.), separated by "+".
+(b, Space, etc.), separated by
+.Ql + .
 .Pp
 Example:
 .Bd -literal -offset indent
@@ -839,8 +911,11 @@ specify MOD as the modifier key.
 Multiple key combinations may be bound to the same action.
 .Pp
 To bind non-latin characters such as \[oa] or \[*p] you must enter the xkb
-character name instead of the character itself. Run xev, focus the window
-and press the specific key and in the terminal output read the symbol name.
+character name instead of the character itself.
+Run
+.Xr xev 1 ,
+focus the window and press the specific key and in the terminal output read
+the symbol name.
 In the following example for \[oa]:
 .Bd -literal -offset indent
 KeyPress event, serial 41, synthetic NO, window 0x2600001,
@@ -851,7 +926,10 @@ KeyPress event, serial 41, synthetic NO, window 0x2600001,
     XFilterEvent returns: False
 .Ed
 .Pp
-The xkb name is aring. In other words, in .spectrwm.conf add:
+The xkb name is aring.
+In other words, in
+.Pa spectrwm.conf
+add:
 .Bd -literal -offset indent
 bind[program] = MOD+aring
 .Ed
@@ -859,7 +937,7 @@ bind[program] = MOD+aring
 Keyboard mapping files for several keyboard layouts are listed
 below.
 These files can be used with the
-.Pa keyboard_mapping
+.Ic keyboard_mapping
 setting to load pre-defined key bindings for the specified
 keyboard layout.
 .Pp
@@ -920,13 +998,16 @@ The quirks themselves are described below:
 .It FLOAT
 This window should not be tiled, but allowed to float freely.
 .It TRANSSZ
-Adjusts size on transient windows that are too small using dialog_ratio
+Adjusts size on transient windows that are too small using
+.Ic dialog_ratio
 (see
 .Sx CONFIGURATION FILES ) .
 .It ANYWHERE
 Allow window to position itself, uncentered.
 .It XTERM_FONTADJ
-Adjust xterm fonts when resizing.
+Adjust
+.Xr xterm 1
+fonts when resizing.
 .It FULLSCREEN
 Remove border to allow window to use full region size.
 .It FOCUSPREV
@@ -936,13 +1017,16 @@ application in the stack.
 Don't change focus to the window when it first appears on the screen.
 Has no effect when
 .Ic focus_mode
-is set to follow.
+is set to
+.Ar follow .
 .It FOCUSONMAP_SINGLE
 When the window first appears on the screen, change focus to the window
 if there are no other windows on the workspace with the same WM_CLASS
-class/instance value.  Has no effect when
+class/instance value.
+Has no effect when
 .Ic focus_mode
-is set to follow.
+is set to
+.Ar follow .
 .It OBEYAPPFOCUSREQ
 When an application requests focus on the window via a _NET_ACTIVE_WINDOW
 client message (source indication of 1), comply with the request.
@@ -954,19 +1038,22 @@ Especially useful for terminal windows that share a process.
 .It IGNORESPAWNWS
 Ignore the spawn workspace when determining the initial workspace for a
 new window.
+.It WS Ns Bq Ar n
+Force a new window to appear on workspace
+.Ar n .
 .El
 .Pp
 Custom quirks in the configuration file are specified as follows:
 .Pp
-.Dl quirk[<class>[:<instance>[:<name>]]] = <quirk> [ + <quirk> ... ]
+.Dl quirk Ns Bo Ar class Ns Bo : Ns Ar instance Ns Bo : Ns Ar name Bc Bc Bc = Ar quirk Op + Ar quirk ...
 .Pp
-.Aq class ,
-.Aq instance
+.Ar class ,
+.Ar instance
 (optional) and
-.Aq name
+.Ar name
 (optional) are patterns used to determine which window(s) the quirk(s) apply
-and
-.Aq quirk
+to and
+.Ar quirk
 is one of the quirks from the list above.
 .Pp
 Note that patterns are interpreted as POSIX Extended Regular Expressions.
@@ -991,16 +1078,16 @@ quirk[pcb:pcb] = NONE # remove existing quirk
 .Ed
 .Pp
 You can obtain
-.Aq class ,
-.Aq instance
+.Ar class ,
+.Ar instance
 and
-.Aq name
+.Ar name
 by running
 .Xr xprop 1
 and then clicking on the desired window.
 In the following example the main window of Firefox was clicked:
 .Bd -literal -offset indent
-$ xprop | grep -E "^(WM_CLASS|_NET_WM_NAME|WM_NAME)"
+$ xprop | grep \-E "^(WM_CLASS|_NET_WM_NAME|WM_NAME)"
 WM_CLASS(STRING) = "Navigator", "Firefox"
 WM_NAME(STRING) = "spectrwm - ConformalOpenSource"
 _NET_WM_NAME(UTF8_STRING) = "spectrwm - ConformalOpenSource"
@@ -1012,6 +1099,7 @@ displays WM_CLASS as:
 .Bd -literal -offset indent
 WM_CLASS(STRING) = "<instance>", "<class>"
 .Ed
+.Pp
 In the example above the quirk entry would be:
 .Bd -literal -offset indent
 quirk[Firefox:Navigator] = FLOAT
@@ -1092,8 +1180,8 @@ root window.
 For example, the following toggles the floating state of
 a window using
 .Xr wmctrl 1
-to send the message (assuming 0x4a0000b is the  id of the window floated
-or un-floated):
+to send the message (assuming 0x4a0000b is the id of the window to be
+floated or un-floated):
 .Bd -literal -offset indent
 $ wmctrl \-i \-r 0x4a0000b \-b toggle,_NET_WM_STATE_ABOVE
 .Ed
index f81d1a2..dbcd5f6 100644 (file)
@@ -331,6 +331,7 @@ bool                        cycle_visible = false;
 int                    term_width = 0;
 int                    font_adjusted = 0;
 unsigned int           mod_key = MODKEY;
+bool                   warp_pointer = false;
 
 /* dmenu search */
 struct swm_region      *search_r;
@@ -404,6 +405,7 @@ bool                 urgent_enabled = false;
 int             composite_enabled = 0;
 double          opacity_focus = 1.0;
 double          opacity_unfocus = 0.6;
+bool            urgent_collapse = false;
 char           *clock_format = NULL;
 bool            window_class_enabled = false;
 bool            window_instance_enabled = false;
@@ -481,7 +483,7 @@ struct ws_win {
        bool                    can_delete;
        bool                    take_focus;
        bool                    java;
-       unsigned long           quirks;
+       uint32_t                quirks;
        struct workspace        *ws;    /* always valid */
        struct swm_screen       *s;     /* always valid, never changes */
        xcb_size_hints_t        sh;
@@ -665,7 +667,8 @@ struct quirk {
        regex_t                 regex_class;
        regex_t                 regex_instance;
        regex_t                 regex_name;
-       unsigned long           quirk;
+       uint32_t                quirk;
+       int                     ws;             /* Initial workspace. */
 #define SWM_Q_FLOAT            (1<<0)  /* float this window */
 #define SWM_Q_TRANSSZ          (1<<1)  /* transiend window size too small */
 #define SWM_Q_ANYWHERE         (1<<2)  /* don't position this window */
@@ -969,6 +972,7 @@ void         bar_window_name(char *, size_t, struct swm_region *);
 void    bar_window_state(char *, size_t, struct swm_region *);
 void    bar_workspace_name(char *, size_t, struct swm_region *);
 void    buttonpress(xcb_button_press_event_t *);
+void    center_pointer(struct swm_region *);
 void    check_conn(void);
 void    clear_keys(void);
 int     clear_maximized(struct workspace *);
@@ -1042,6 +1046,7 @@ char      *get_source_type_label(uint32_t);
 char   *get_stack_mode_name(uint8_t);
 #endif
 int32_t         get_swm_ws(xcb_window_t);
+bool    get_urgent(struct ws_win *);
 char   *get_win_name(xcb_window_t);
 uint8_t         get_win_state(xcb_window_t);
 void    get_wm_protocols(struct ws_win *);
@@ -1077,7 +1082,7 @@ uint32_t name_to_pixel(int, const char *);
 void    name_workspace(struct swm_region *, union arg *);
 void    new_region(struct swm_screen *, int, int, int, int);
 int     parsekeys(const char *, unsigned int, unsigned int *, KeySym *);
-int     parsequirks(const char *, unsigned long *);
+int     parsequirks(const char *, uint32_t *, int *);
 int     parse_rgb(const char *, uint16_t *, uint16_t *, uint16_t *);
 void    pressbutton(struct swm_region *, union arg *);
 void    priorws(struct swm_region *, union arg *);
@@ -1086,10 +1091,10 @@ void     print_win_geom(xcb_window_t);
 #endif
 void    propertynotify(xcb_property_notify_event_t *);
 void    quirk_free(struct quirk *);
-void    quirk_insert(const char *, const char *, const char *,unsigned long);
+void    quirk_insert(const char *, const char *, const char *, uint32_t, int);
 void    quirk_remove(struct quirk *);
 void    quirk_replace(struct quirk *, const char *, const char *, const char *,
-            unsigned long);
+            uint32_t, int);
 void    quit(struct swm_region *, union arg *);
 void    raise_toggle(struct swm_region *, union arg *);
 void    raise_window(struct ws_win *);
@@ -1124,7 +1129,7 @@ int        setconfvalue(const char *, const char *, int);
 void    setkeybinding(unsigned int, KeySym, enum keyfuncid, const char *);
 int     setkeymapping(const char *, const char *, int);
 int     setlayout(const char *, const char *, int);
-void    setquirk(const char *, const char *, const char *,unsigned long);
+void    setquirk(const char *, const char *, const char *, uint32_t, int);
 void    setscreencolor(const char *, int, int);
 void    setspawn(const char *, const char *, int);
 void    setup_ewmh(void);
@@ -2170,6 +2175,22 @@ bar_window_name(char *s, size_t sz, struct swm_region *r)
        free(title);
 }
 
+bool
+get_urgent(struct ws_win *win)
+{
+       xcb_icccm_wm_hints_t            hints;
+       xcb_get_property_cookie_t       c;
+       bool                            urgent = false;
+
+       if (win) {
+               c = xcb_icccm_get_wm_hints(conn, win->id);
+               if (xcb_icccm_get_wm_hints_reply(conn, c, &hints, NULL))
+                       urgent = xcb_icccm_wm_hints_get_urgency(&hints);
+       }
+
+       return urgent;
+}
+
 void
 bar_urgent(char *s, size_t sz)
 {
@@ -2177,8 +2198,6 @@ bar_urgent(char *s, size_t sz)
        int                     i, j, num_screens;
        bool                    urgent[SWM_WS_MAX];
        char                    b[8];
-       xcb_get_property_cookie_t       c;
-       xcb_icccm_wm_hints_t    hints;
 
        for (i = 0; i < workspace_limit; i++)
                urgent[i] = false;
@@ -2186,21 +2205,16 @@ bar_urgent(char *s, size_t sz)
        num_screens = get_screen_count();
        for (i = 0; i < num_screens; i++)
                for (j = 0; j < workspace_limit; j++)
-                       TAILQ_FOREACH(win, &screens[i].ws[j].winlist, entry) {
-                               c = xcb_icccm_get_wm_hints(conn, win->id);
-                               if (xcb_icccm_get_wm_hints_reply(conn, c,
-                                   &hints, NULL) == 0)
-                                       continue;
-                               if (hints.flags & XCB_ICCCM_WM_HINT_X_URGENCY)
-                                       urgent[j] = true;
-                       }
+                       TAILQ_FOREACH(win, &screens[i].ws[j].winlist, entry)
+                               urgent[j] = get_urgent(win);
 
        for (i = 0; i < workspace_limit; i++) {
-               if (urgent[i])
+               if (urgent[i]) {
                        snprintf(b, sizeof b, "%d ", i + 1);
-               else
-                       snprintf(b, sizeof b, "- ");
-               strlcat(s, b, sz);
+                       strlcat(s, b, sz);
+               } else if (!urgent_collapse) {
+                       strlcat(s, "- ", sz);
+               }
        }
 }
 
@@ -3212,6 +3226,26 @@ get_pointer_win(xcb_window_t root)
        return win;
 }
 
+void
+center_pointer(struct swm_region *r)
+{
+       struct ws_win                   *win;
+
+       if (!warp_pointer || r == NULL)
+               return;
+
+       win = r->ws->focus;
+
+       DNPRINTF(SWM_D_EVENT, "center_pointer: win %#x.\n", WINID(win));
+
+       if (win && win->mapped)
+               xcb_warp_pointer(conn, XCB_NONE, win->id, 0, 0, 0, 0,
+                   WIDTH(win) / 2, HEIGHT(win) / 2);
+       else
+               xcb_warp_pointer(conn, XCB_NONE, r->id, 0, 0, 0, 0,
+                   WIDTH(r) / 2, HEIGHT(r) / 2);
+}
+
 struct swm_region *
 root_to_region(xcb_window_t root, int check)
 {
@@ -3846,6 +3880,7 @@ switchws(struct swm_region *r, union arg *args)
 
        ewmh_update_current_desktop();
 
+       center_pointer(r);
        focus_flush();
        new_ws->state = SWM_WS_STATE_MAPPED;
 
@@ -3942,6 +3977,7 @@ focusrg(struct swm_region *r, union arg *args)
                return;
 
        focus_region(rr);
+       center_pointer(rr);
        focus_flush();
        DNPRINTF(SWM_D_FOCUS, "focusrg: done\n");
 }
@@ -3978,6 +4014,7 @@ cyclerg(struct swm_region *r, union arg *args)
                return;
 
        focus_region(rr);
+       center_pointer(rr);
        focus_flush();
        DNPRINTF(SWM_D_FOCUS, "cyclerg: done\n");
 }
@@ -4111,6 +4148,7 @@ swapwin(struct swm_region *r, union arg *args)
        ewmh_update_client_list();
 
        stack();
+       center_pointer(r);
        focus_flush();
 out:
        DNPRINTF(SWM_D_MOVE, "swapwin: done\n");
@@ -4264,7 +4302,6 @@ focus(struct swm_region *r, union arg *args)
        struct workspace        *ws = NULL;
        union arg               a;
        int                     i;
-       xcb_icccm_wm_hints_t    hints;
 
        if (!(r && r->ws))
                goto out;
@@ -4337,27 +4374,26 @@ focus(struct swm_region *r, union arg *args)
                                head = TAILQ_FIRST(&r->s->ws[(ws->idx + i) %
                                    workspace_limit].winlist);
 
-                       while (head != NULL &&
-                           (head = TAILQ_NEXT(head, entry)) != NULL) {
+                       while (head) {
                                if (head == cur_focus) {
-                                       winfocus = cur_focus;
-                                       break;
-                               }
-                               if (xcb_icccm_get_wm_hints_reply(conn,
-                                   xcb_icccm_get_wm_hints(conn, head->id),
-                                   &hints, NULL) != 0 &&
-                                   xcb_icccm_wm_hints_get_urgency(&hints)) {
+                                       if (i > 0) {
+                                               winfocus = cur_focus;
+                                               break;
+                                       }
+                               } else if (get_urgent(head)) {
                                        winfocus = head;
                                        break;
                                }
+
+                               head = TAILQ_NEXT(head, entry);
                        }
 
-                       if (winfocus != NULL)
+                       if (winfocus)
                                break;
                }
 
                /* Switch ws if new focus is on a different ws. */
-               if (winfocus != NULL && winfocus->ws != ws) {
+               if (winfocus && winfocus->ws != ws) {
                        a.id = winfocus->ws->idx;
                        switchws(r, &a);
                }
@@ -4370,6 +4406,7 @@ focus(struct swm_region *r, union arg *args)
                stack();
 
        focus_win(get_focus_magic(winfocus));
+       center_pointer(r);
        focus_flush();
 
 out:
@@ -4397,6 +4434,7 @@ cycle_layout(struct swm_region *r, union arg *args)
 
        focus_win(get_region_focus(r));
 
+       center_pointer(r);
        focus_flush();
 }
 
@@ -4418,6 +4456,7 @@ stack_config(struct swm_region *r, union arg *args)
                stack();
        bar_draw();
 
+       center_pointer(r);
        focus_flush();
 }
 
@@ -4781,7 +4820,7 @@ stack_master(struct workspace *ws, struct swm_geometry *g, int rot, bool flip)
                        win_g.y += last_h + 2 * border_width + tile_gap;
 
                if (disable_border && !(bar_enabled && ws->bar_enabled) &&
-                   winno == 1){
+                   winno == 1) {
                        bordered = false;
                        win_g.w += 2 * border_width;
                        win_g.h += 2 * border_width;
@@ -4994,12 +5033,13 @@ max_stack(struct workspace *ws, struct swm_geometry *g)
                if (X(w) != gg.x || Y(w) != gg.y || WIDTH(w) != gg.w ||
                    HEIGHT(w) != gg.h) {
                        w->g = gg;
-                       if (bar_enabled && ws->bar_enabled){
-                               w->bordered = true;
-                       } else {
+
+                       if (disable_border && !(bar_enabled && ws->bar_enabled)) {
                                w->bordered = false;
                                WIDTH(w) += 2 * border_width;
                                HEIGHT(w) += 2 * border_width;
+                       } else {
+                               w->bordered = true;
                        }
 
                        update_window(w);
@@ -5129,6 +5169,7 @@ send_to_ws(struct swm_region *r, union arg *args)
                }
        }
 
+       center_pointer(r);
        focus_flush();
 }
 
@@ -5944,6 +5985,7 @@ maximize_toggle(struct swm_region *r, union arg *args)
        if (w == w->ws->focus)
                focus_win(w);
 
+       center_pointer(r);
        focus_flush();
        DNPRINTF(SWM_D_MISC, "maximize_toggle: done\n");
 }
@@ -5975,6 +6017,7 @@ floating_toggle(struct swm_region *r, union arg *args)
        if (w == w->ws->focus)
                focus_win(w);
 
+       center_pointer(r);
        focus_flush();
        DNPRINTF(SWM_D_MISC, "floating_toggle: done\n");
 }
@@ -6330,6 +6373,7 @@ resize_step(struct swm_region *r, union arg *args)
                return;
 
        resize(win, args);
+       center_pointer(r);
        focus_flush();
 }
 
@@ -6529,6 +6573,7 @@ move_step(struct swm_region *r, union arg *args)
                return;
 
        move(win, args);
+       center_pointer(r);
        focus_flush();
 }
 
@@ -7589,10 +7634,10 @@ const char *quirkname[] = {
        "IGNORESPAWNWS",
 };
 
-/* SWM_Q_WS: retain '|' for back compat for now (2009-08-11) */
-#define SWM_Q_WS               "\n|+ \t"
+/* SWM_Q_DELIM: retain '|' for back compat for now (2009-08-11) */
+#define SWM_Q_DELIM            "\n|+ \t"
 int
-parsequirks(const char *qstr, unsigned long *quirk)
+parsequirks(const char *qstr, uint32_t *quirk, int *ws)
 {
        char                    *str, *cp, *name;
        int                     i;
@@ -7605,9 +7650,16 @@ parsequirks(const char *qstr, unsigned long *quirk)
 
        cp = str;
        *quirk = 0;
-       while ((name = strsep(&cp, SWM_Q_WS)) != NULL) {
+       while ((name = strsep(&cp, SWM_Q_DELIM)) != NULL) {
                if (cp)
-                       cp += (long)strspn(cp, SWM_Q_WS);
+                       cp += (long)strspn(cp, SWM_Q_DELIM);
+
+               if (sscanf(name, "WS[%d]", ws) == 1) {
+                       if (*ws > 0)
+                               *ws -= 1;
+                       continue;
+               }
+
                for (i = 0; i < LENGTH(quirkname); i++) {
                        if (strncasecmp(name, quirkname[i],
                            SWM_QUIRK_LEN) == 0) {
@@ -7636,14 +7688,14 @@ parsequirks(const char *qstr, unsigned long *quirk)
 
 void
 quirk_insert(const char *class, const char *instance, const char *name,
-    unsigned long quirk)
+    uint32_t quirk, int ws)
 {
        struct quirk            *qp;
        char                    *str;
        bool                    failed = false;
 
        DNPRINTF(SWM_D_QUIRK, "quirk_insert: class: %s, instance: %s, name: %s,"
-           " value: %lu\n", class, instance, name, quirk);
+           " value: %u, ws: %d\n", class, instance, name, quirk, ws);
 
        if ((qp = malloc(sizeof *qp)) == NULL)
                err(1, "quirk_insert: malloc");
@@ -7690,6 +7742,7 @@ quirk_insert(const char *class, const char *instance, const char *name,
                quirk_free(qp);
        } else {
                qp->quirk = quirk;
+               qp->ws = ws;
                TAILQ_INSERT_TAIL(&quirks, qp, entry);
        }
        DNPRINTF(SWM_D_QUIRK, "quirk_insert: leave\n");
@@ -7698,7 +7751,7 @@ quirk_insert(const char *class, const char *instance, const char *name,
 void
 quirk_remove(struct quirk *qp)
 {
-       DNPRINTF(SWM_D_QUIRK, "quirk_remove: %s:%s [%lu]\n", qp->class,
+       DNPRINTF(SWM_D_QUIRK, "quirk_remove: %s:%s [%u]\n", qp->class,
            qp->name, qp->quirk);
 
        TAILQ_REMOVE(&quirks, qp, entry);
@@ -7721,43 +7774,44 @@ quirk_free(struct quirk *qp)
 
 void
 quirk_replace(struct quirk *qp, const char *class, const char *instance,
-    const char *name, unsigned long quirk)
+    const char *name, uint32_t quirk, int ws)
 {
-       DNPRINTF(SWM_D_QUIRK, "quirk_replace: %s:%s:%s [%lu]\n", qp->class,
-           qp->instance, qp->name, qp->quirk);
+       DNPRINTF(SWM_D_QUIRK, "quirk_replace: %s:%s:%s [%u], ws: %d\n", qp->class,
+           qp->instance, qp->name, qp->quirk, qp->ws);
 
        quirk_remove(qp);
-       quirk_insert(class, instance, name, quirk);
+       quirk_insert(class, instance, name, quirk, ws);
 
        DNPRINTF(SWM_D_QUIRK, "quirk_replace: leave\n");
 }
 
 void
 setquirk(const char *class, const char *instance, const char *name,
-    unsigned long quirk)
+    uint32_t quirk, int ws)
 {
        struct quirk            *qp;
 
-       DNPRINTF(SWM_D_QUIRK, "setquirk: enter %s:%s:%s [%lu]\n", class,
-           instance, name, quirk);
+       DNPRINTF(SWM_D_QUIRK, "setquirk: enter %s:%s:%s [%u], ws: %d\n", class,
+           instance, name, quirk, ws);
 
        /* Remove/replace existing quirk. */
        TAILQ_FOREACH(qp, &quirks, entry) {
                if (strcmp(qp->class, class) == 0 &&
                    strcmp(qp->instance, instance) == 0 &&
                    strcmp(qp->name, name) == 0) {
-                       if (quirk == 0)
+                       if (quirk == 0 && ws == -1)
                                quirk_remove(qp);
                        else
-                               quirk_replace(qp, class, instance, name, quirk);
+                               quirk_replace(qp, class, instance, name, quirk,
+                                   ws);
                        DNPRINTF(SWM_D_QUIRK, "setquirk: leave\n");
                        return;
                }
        }
 
-       /* Only insert if quirk is not NONE. */
-       if (quirk)
-               quirk_insert(class, instance, name, quirk);
+       /* Only insert if quirk is not NONE or forced ws is set. */
+       if (quirk || ws != -1)
+               quirk_insert(class, instance, name, quirk, ws);
 
        DNPRINTF(SWM_D_QUIRK, "setquirk: leave\n");
 }
@@ -7783,8 +7837,8 @@ setconfquirk(const char *selector, const char *value, int flags)
 {
        char                    *str, *cp, *class;
        char                    *instance = NULL, *name = NULL;
-       int                     retval, count = 0;
-       unsigned long           qrks;
+       int                     retval, count = 0, ws = -1;
+       uint32_t                qrks;
 
        /* suppress unused warning since var is needed */
        (void)flags;
@@ -7827,8 +7881,8 @@ setconfquirk(const char *selector, const char *value, int flags)
        DNPRINTF(SWM_D_CONF, "setconfquirk: class: %s, instance: %s, "
            "name: %s\n", class, instance, name);
 
-       if ((retval = parsequirks(value, &qrks)) == 0)
-               setquirk(class, instance, name, qrks);
+       if ((retval = parsequirks(value, &qrks, &ws)) == 0)
+               setquirk(class, instance, name, qrks, ws);
 
        free(str);
        return (retval);
@@ -7837,19 +7891,32 @@ setconfquirk(const char *selector, const char *value, int flags)
 void
 setup_quirks(void)
 {
-       setquirk("MPlayer",             "xv",           ".*",   SWM_Q_FLOAT | SWM_Q_FULLSCREEN | SWM_Q_FOCUSPREV);
-       setquirk("OpenOffice.org 3.2",  "VCLSalFrame",  ".*",   SWM_Q_FLOAT);
-       setquirk("Firefox-bin",         "firefox-bin",  ".*",   SWM_Q_TRANSSZ);
-       setquirk("Firefox",             "Dialog",       ".*",   SWM_Q_FLOAT);
-       setquirk("Gimp",                "gimp",         ".*",   SWM_Q_FLOAT | SWM_Q_ANYWHERE);
-       setquirk("XTerm",               "xterm",        ".*",   SWM_Q_XTERM_FONTADJ);
-       setquirk("xine",                "Xine Window",  ".*",   SWM_Q_FLOAT | SWM_Q_ANYWHERE);
-       setquirk("Xitk",                "Xitk Combo",   ".*",   SWM_Q_FLOAT | SWM_Q_ANYWHERE);
-       setquirk("xine",                "xine Panel",   ".*",   SWM_Q_FLOAT | SWM_Q_ANYWHERE);
-       setquirk("Xitk",                "Xine Window",  ".*",   SWM_Q_FLOAT | SWM_Q_ANYWHERE);
-       setquirk("xine",                "xine Video Fullscreen Window", ".*",   SWM_Q_FULLSCREEN | SWM_Q_FLOAT);
-       setquirk("pcb",                 "pcb",          ".*",   SWM_Q_FLOAT);
-       setquirk("SDL_App",             "SDL_App",      ".*",   SWM_Q_FLOAT | SWM_Q_FULLSCREEN);
+       setquirk("MPlayer",             "xv",           ".*",
+           SWM_Q_FLOAT | SWM_Q_FULLSCREEN | SWM_Q_FOCUSPREV, -1);
+       setquirk("OpenOffice.org 3.2",  "VCLSalFrame",  ".*",
+           SWM_Q_FLOAT, -1);
+       setquirk("Firefox-bin",         "firefox-bin",  ".*",
+           SWM_Q_TRANSSZ, -1);
+       setquirk("Firefox",             "Dialog",       ".*",
+           SWM_Q_FLOAT, -1);
+       setquirk("Gimp",                "gimp",         ".*",
+           SWM_Q_FLOAT | SWM_Q_ANYWHERE, -1);
+       setquirk("XTerm",               "xterm",        ".*",
+           SWM_Q_XTERM_FONTADJ, -1);
+       setquirk("xine",                "Xine Window",  ".*",
+           SWM_Q_FLOAT | SWM_Q_ANYWHERE, -1);
+       setquirk("Xitk",                "Xitk Combo",   ".*",
+           SWM_Q_FLOAT | SWM_Q_ANYWHERE, -1);
+       setquirk("xine",                "xine Panel",   ".*",
+           SWM_Q_FLOAT | SWM_Q_ANYWHERE, -1);
+       setquirk("Xitk",                "Xine Window",  ".*",
+           SWM_Q_FLOAT | SWM_Q_ANYWHERE, -1);
+       setquirk("xine",                "xine Video Fullscreen Window", ".*",
+           SWM_Q_FULLSCREEN | SWM_Q_FLOAT, -1);
+       setquirk("pcb",                 "pcb",          ".*",
+           SWM_Q_FLOAT, -1);
+       setquirk("SDL_App",             "SDL_App",      ".*",
+           SWM_Q_FLOAT | SWM_Q_FULLSCREEN, -1);
 }
 
 /* conf file stuff */
@@ -7891,8 +7958,10 @@ enum {
        SWM_S_STACK_ENABLED,
        SWM_S_TERM_WIDTH,
        SWM_S_TILE_GAP,
+       SWM_S_URGENT_COLLAPSE,
        SWM_S_URGENT_ENABLED,
        SWM_S_VERBOSE_LAYOUT,
+       SWM_S_WARP_POINTER,
        SWM_S_WINDOW_CLASS_ENABLED,
        SWM_S_WINDOW_INSTANCE_ENABLED,
        SWM_S_WINDOW_NAME_ENABLED,
@@ -8092,6 +8161,9 @@ setconfvalue(const char *selector, const char *value, int flags)
        case SWM_S_TILE_GAP:
                tile_gap = atoi(value);
                break;
+       case SWM_S_URGENT_COLLAPSE:
+               urgent_collapse = (atoi(value) != 0);
+               break;
        case SWM_S_URGENT_ENABLED:
                urgent_enabled = (atoi(value) != 0);
                break;
@@ -8121,6 +8193,9 @@ setconfvalue(const char *selector, const char *value, int flags)
                                layouts[i].l_string = plain_stacker;
                }
                break;
+       case SWM_S_WARP_POINTER:
+               warp_pointer = (atoi(value) != 0);
+               break;
        case SWM_S_WINDOW_CLASS_ENABLED:
                window_class_enabled = (atoi(value) != 0);
                break;
@@ -8455,8 +8530,10 @@ struct config_option configopt[] = {
        { "tile_gap",                   setconfvalue,   SWM_S_TILE_GAP },
        { "title_class_enabled",        setconfvalue,   SWM_S_WINDOW_CLASS_ENABLED }, /* For backwards compat. */
        { "title_name_enabled",         setconfvalue,   SWM_S_WINDOW_INSTANCE_ENABLED }, /* For backwards compat. */
+       { "urgent_collapse",            setconfvalue,   SWM_S_URGENT_COLLAPSE },
        { "urgent_enabled",             setconfvalue,   SWM_S_URGENT_ENABLED },
        { "verbose_layout",             setconfvalue,   SWM_S_VERBOSE_LAYOUT },
+       { "warp_pointer",               setconfvalue,   SWM_S_WARP_POINTER },
        { "window_class_enabled",       setconfvalue,   SWM_S_WINDOW_CLASS_ENABLED },
        { "window_instance_enabled",    setconfvalue,   SWM_S_WINDOW_INSTANCE_ENABLED },
        { "window_name_enabled",        setconfvalue,   SWM_S_WINDOW_NAME_ENABLED },
@@ -8778,7 +8855,7 @@ manage_window(xcb_window_t id, int spawn_pos, bool mapped)
        xcb_get_geometry_reply_t        *gr;
        xcb_window_t            trans = XCB_WINDOW_NONE;
        uint32_t                i, wa[2], new_flags;
-       int                     ws_idx;
+       int                     ws_idx, force_ws = -1;
        char                    *class, *instance, *name;
 
        if ((win = find_window(id)) != NULL) {
@@ -8891,9 +8968,11 @@ manage_window(xcb_window_t id, int spawn_pos, bool mapped)
                    regexec(&qp->regex_instance, instance, 0, NULL, 0) == 0 &&
                    regexec(&qp->regex_name, name, 0, NULL, 0) == 0) {
                        DNPRINTF(SWM_D_CLASS, "manage_window: matched "
-                           "quirk: %s:%s:%s mask: %#lx\n", qp->class,
-                           qp->instance, qp->name, qp->quirk);
+                           "quirk: %s:%s:%s mask: %#x, ws: %d\n", qp->class,
+                           qp->instance, qp->name, qp->quirk, qp->ws);
                        win->quirks = qp->quirk;
+                       if (qp->ws >= 0 && qp->ws < workspace_limit)
+                               force_ws = qp->ws;
                }
        }
 
@@ -8925,6 +9004,9 @@ manage_window(xcb_window_t id, int spawn_pos, bool mapped)
                win->ws = r->ws;
        }
 
+       if (force_ws != -1)
+               win->ws = &r->s->ws[force_ws];
+
        /* Set the _NET_WM_DESKTOP atom. */
        DNPRINTF(SWM_D_PROP, "manage_window: set _NET_WM_DESKTOP: %d\n",
            win->ws->idx);
@@ -9592,6 +9674,7 @@ mapnotify(xcb_map_notify_event_t *e)
                if (ws->focus_pending == win) {
                        focus_win(win);
                        ws->focus_pending = NULL;
+                       center_pointer(win->ws->r);
                        focus_flush();
                }
        }
@@ -9854,6 +9937,7 @@ unmapnotify(xcb_unmap_notify_event_t *e)
                }
        }
 
+       center_pointer(ws->r);
        focus_flush();
 }
 
index f485c49..5e16633 100644 (file)
@@ -8,6 +8,7 @@
 # focus_close_wrap     = 1
 # focus_default                = last
 # spawn_position               = next
+# warp_pointer         = 1
 
 # Window Decoration
 # border_width         = 1
index ef85d43..d04a1b9 100644 (file)
@@ -1,5 +1,9 @@
-.\" Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
+.\" Copyright (c) 2009-2012 Marco Peereboom <marco@peereboom.us>
 .\" Copyright (c) 2009 Darrin Chandler <dwchandler@stilyagin.com>
+.\" Copyright (c) 2011-2014 Reginald Kennedy <rk@rejii.com>
+.\" Copyright (c) 2011-2012 Lawrence Teo <lteo@lteo.net>
+.\" Copyright (c) 2011-2012 Tiago Cunha <tcunha@gmx.com>
+.\" Copyright (c) 2012 David Hill <dhill@mindcry.org>
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
 .\" purpose with or without fee is hereby granted, provided that the above
@@ -13,7 +17,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: September 15 2011 $
+.Dd $Mdocdate: February 15 2012 $
 .Dt SPECTRWM 1
 .Os
 .Sh NOME
 .Nm spectrwm
 .Sh DESCRIZIONE
 .Nm
-? un gestore di finestre minimale che cerca di stare in disparte, in modo
-che il prezioso spazio sullo schermo possa essere usato per cose pi?
-importanti. Hai dei default sensati e non costringe l'utente ad imparare
-un linguaggio di programmazione per configurarlo. ? stato scritto dagli
-hacker per gli hacker e cerca di essere piccolo, compatto e veloce.
+\[`e] un gestore di finestre minimale che cerca di stare in disparte, in modo
+che il prezioso spazio sullo schermo possa essere usato per cose molto
+pi\[`u] importanti.
+Ha delle impostazioni predefinite ragionevoli e non richiede all'utente di
+imparare un nuovo linguaggio per modificarne la configurazione.
+\[`E] stato scritto dagli hacker per gli hacker, ed ha come obiettivo quello
+di essere piccolo, compatto e veloce.
 .Pp
-Quando
+All'avvio,
 .Nm
-viene avviato, legge le impostazioni presenti nel file di configurazione
+legge le impostazioni presenti nel suo file di configurazione,
 .Pa spectrwm.conf .
 Vedere la sezione
 .Sx FILE DI CONFIGURAZIONE
-pi? sotto.
+pi\[`u] sotto.
 .Pp
-In questa pagina di manuale viene usata la seguente notazione:
+Le seguenti notazioni verranno utilizzate all'interno di questa pagina:
 .Pp
 .Bl -tag -width Ds -offset indent -compact
 .It Cm M
 Meta
 .It Cm S
 Shift
-.It Aq Cm Nome
-Tasto nome
+.It Aq Cm Name
+Tasto Name
 .It Cm M1
 Tasto 1 (sinistro) del mouse
 .It Cm M3
@@ -53,241 +59,479 @@ Tasto 3 (destro) del mouse
 .El
 .Pp
 .Nm
-? molto semplice da usare. La maggior parte delle operazioni vengono
-svolte usando combinazioni di tasti sulla tastiera o sul mouse.
+\[`e] molto semplice da usare.
+La maggior parte delle azioni vengono svolte utilizzando combinazioni di
+tasti sulla tastiera o sul mouse.
 Vedere la sezione
 .Sx SCORCIATOIE
-pi? sotto per i default e le possibilit? di personalizzazione.
+pi\[`u] sotto per informazioni sulle impostazioni predefinite e sulle
+possibilit\[`a] di personalizzazione.
 .Sh FILE DI CONFIGURAZIONE
 .Nm
-prova per prima cosa ad aprire il file di configurazione personale
-dell'utente,
+da precedenza al file di configurazione specifico dell'utente,
 .Pa ~/.spectrwm.conf .
-Se il file in questione non ? disponibile, prova ad usare il file di
+Se quel file non \[`e] disponibile, tenta di utilizzare il file di
 configurazione globale
 .Pa /etc/spectrwm.conf .
 .Pp
-Il formato di questo file ? \*(Ltchiave\*(Gt = \*(Ltvalore\*(Gt.
-Per esempio:
+Il formato del file \[`e]
+.Pp
+.Dl Ar keyword Li = Ar setting
+.Pp
+Ad esempio:
 .Pp
 .Dl color_focus = red
 .Pp
-Per abilitare o disabilitare un'opzione, usare i valori 1 o 0
-rispettivamente.
-.Pp
-Il file supporta le seguenti chiavi:
-.Pp
-.Bl -tag -width "title_class_enabledXXX" -offset indent -compact
-.It Cm autorun
-Esegue un'applicazione nel workspace specificato all'avvio.
-Definito nel formato ws[<idx>]:applicazione, eg. ws[2]:xterm esegue un
-xterm nell'area di lavoro 2.
-.It Cm color_focus
-Colore del bordo della finestra che ha il focus.
-.It Cm color_unfocus
-Colore del bordo delle finestre che non hanno il focus.
-.It Cm bar_enabled
-Abilita o disabilita la barra di stato.
-.It Cm bar_border Ns Bq Ar x
+Le impostazioni di tipo binario possono essere abilitate e disabilitate
+utilizzando rispettivamente i valori 1 e 0.
+.Pp
+I colori devono essere specificati usando il formato usato da
+.Xr XQueryColor 3 .
+.Pp
+I commenti iniziano con #.
+Qualora fosse necessario usare usare
+.Ql #
+come parte di un'opzione, questo dovr\[`a] essere preceduto da un
+backslash, eg. \e#.
+.Pp
+Il file di configurazione supporta le seguenti impostazioni:
+.Bl -tag -width 2m
+.It Ic autorun
+All'avvio, esegue un'applicazione nell'area di lavoro specificata.
+Il formato da utilizzare \[`e]
+.Li ws Ns Bo Ar idx Bc : Ns Ar application ,
+eg. ws[2]:xterm esegue
+.Xr xterm 1
+nell'area di lavoro 2.
+.It Ic bar_action
+Script esterno che produce informazioni aggiuntive, come ad esempio quelle
+sullo stato di carica della batteria, da inserire nella barra di stato.
+.It Ic bar_at_bottom
+Posiziona la barra di stato in fondo ad ogni regione anzich\['e] in cima.
+.It Ic bar_borders Ns Bq Ar x
 Colore del bordo della barra di stato nello schermo
 .Ar x .
-.It Cm bar_border_width
-Spessore del bordo attorno alla barra di stato in pixel. Il bordo
-pu? essere disabilitato usando il valore 0.
-.It Cm bar_color Ns Bq Ar x
-Colore della barra di stato nello schermo
+.It Ic bar_border_unfocus Ns Bq Ar x
+Colore del bordo della barra di stato nelle regioni dello schermo
+.Ar x
+che non hanno il focus.
+.It Ic bar_border_width
+Imposta lo spessore del bordo della barra di stato, in pixel.
+Il bordo pu\[`o] essere disabilitato usando il valore 0.
+.It Ic bar_color Ns Bq Ar x
+Colore di sfondo della barra di stato nello schermo
 .Ar x .
-.It Cm bar_font_color Ns Bq Ar x
-Colore del testo della barra di stato nello schermo
+.It Ic bar_enabled
+Imposta il valore predefinito di
+.Ic bar_toggle ;
+il valore predefinito per questa opzione \[`e] 1.
+.It Ic bar_enabled_ws Ns Bq Ar x
+Imposta il valore predefinito di
+.Ic bar_toggle_ws
+per l'area di lavoro
+.Ar x ;
+il valore predefinito per questa opzione \[`e] 1.
+.It Ic bar_font
+Font da usare per la barra di stato.
+Il font pu\[`o] essere specificato usando Xft o X Logical Font
+Description (XLFD).
+\[`E] possibile specificare dei font secondari separandoli tra loro con
+una virgola.
+Se tutte le specifiche sono nel formato XLFD verranno usati i gruppi di font;
+se almeno una delle specifiche \[`e] in formato Xft, verr\[`a] usato Xft.
+Quando Xft \[`e] in uso, verr\[`a] usato solo il primo font caricato con
+successo anche nel caso in cui non dovesse comprendere tutti i glifi
+necessari.
+L'impostazione predefinita prevede l'uso dei gruppi di font; \[`e] bene
+tenere conto del fatto che
+.Xr dmenu 1
+non supporta Xft.
+.Pp
+Esempio con Xft:
+.Bd -literal -offset indent
+bar_font = Terminus:style=Regular:pixelsize=14:antialias=true
+
+bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,Terminus:pixelsize=14,\
+-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*
+.Ed
+.Pp
+Esempio con gruppi di font:
+.Bd -literal -offset indent
+bar_font = -*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*
+
+bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,\
+-*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*,\
+-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*
+.Ed
+.Pp
+Per ottenere un elenco dei font disponibili sul proprio sistema,
+usare
+.Xr fc-list 1
+o
+.Xr xlsfonts 1 .
+L'applicazione
+.Xr xfontsel 1
+pu\[`o] essere d'aiuto per il formato XLFD.
+.It Ic bar_font_color Ns Bq Ar x
+Colore del testo nella barra di stato nello schermo
+.Ar x .
+.It Ic bar_format
+Imposta il formato da utilizzare per la barra di stato,
+sovrascrivendo
+.Ic clock_format
+e tutte le opzioni che terminano con
+.Ic enabled .
+Il formato viene passato a
+.Xr strftime 3
+prima di essere usato, e pu\[`o] contenere le seguenti sequenze
+di caratteri:
+.Bl -column "Sequenza di caratteri" "Sostituita con" -offset indent
+.It Sy "Sequenza di caratteri" Ta Sy "Sostituita con"
+.It Li "+<" Ta "Lascia uno spazio"
+.It Li "+A" Ta "Output dello script esterno"
+.It Li "+C" Ta "Classe della finestra corrente (da WM_CLASS)"
+.It Li "+D" Ta "Nome dell'area di lavoro corrente"
+.It Li "+F" Ta "Indicatore di float"
+.It Li "+I" Ta "Indice dell'area di lavoro corrente"
+.It Li "+M" Ta "Numero di finestre minimizzate nell'area di lavoro corrente"
+.It Li "+N" Ta "Numero dello schermo corrente"
+.It Li "+P" Ta "Classe e istanza della finestra corrente, separate da due punti"
+.It Li "+S" Ta "Algoritmo di gestione delle finestre in uso"
+.It Li "+T" Ta "Istanza della finestra corrente (da WM_CLASS)"
+.It Li "+U" Ta "Indicatore di urgenza"
+.It Li "+V" Ta "Versione del programma"
+.It Li "+W" Ta "Nome della finestra corrente (da _NET_WM_NAME o WM_NAME)"
+.It Li "++" Ta "Il carattere" Ql +
+.El
+.Pp
+Tutte le sequenze di caratteri possono limitare il numero di caratteri
+massimo utilizzato, eg. +64A.
+Il testo che non contribuisce a formare una di queste sequenze di caratteri
+viene copiato senza subire modifiche.
+.It Ic bar_justify
+Allinea il test all'interno della barra di stato.
+I valori possibili sono
+.Ar left
+(sinistra),
+.Ar center
+(centro) e
+.Ar right
+(destra).
+.Pp
+Se il valore scelto non \[`e]
+.Ar left ,
+il testo potrebbe non risultare allineato correttamente.
+Vedere
+.Ic bar_format
+per maggiori informazioni.
+.It Ic bind Ns Bq Ar x
+Associa una combinazione di tasti all'azione
 .Ar x .
-.It Cm bar_font
-Font della barra di stato.
-.It Cm bar_action
-Script esterno che aggiunge informazioni come la carica della batteria alla
-barra di stato.
-.It Cm bar_at_bottom
-Posiziona la barra di stato sul fondo dello schermo anzich? in cima.
-.It Cm stack_enabled
-Abilita o disabilita la visualizzazione dell'algoritmo di stacking
-corrente nella barra di stato.
-.It Cm clock_enabled
-Abilita o disabilita l'orologio nella barra di stato. Se disabilitato,
-usando il valore 0, ? possibile usare un orologio personalizzato nello
-script specificato in
-.Pa bar_action .
-.It Cm dialog_ratio
-Alcune applicazioni hanno finestre di dialogo troppo piccole per risultare
-utili. Questa ? la percentuale dello schermo che verr? usata per le finestre
-di dialogo: ad esempio, 0.6 indica il 60% della dimensione fisica dello
-schermo.
-.It Cm layout
-Layout da utilizzare all'avvio. Definito nel formato
-ws[<idx>]:master_grow:master_add:stack_inc:layout:always_raise:stack_mode,
-eg. ws[2]:-4:0:1:0:horizontal assegna il layout orizzontale all'area di
-lavoro 2, riduce l'area principale di 4 unit?, aggiunge una finestra allo
-stack e mantiene il comportamento predefinito per quanto riguarda le
-finestre floating.
-I valori possibili per stack_mode sono
-.Pa vertical ,
-.Pa horizontal
+Vedere la sezione
+.Sx SCORCIATOIE
+pi\[`u] sotto.
+.It Ic border_width
+Imposta lo spessore del bordo delle finestre, in pixel.
+Il bordo pu\[`o] essere disabilitato usando il valore 0.
+.It Ic boundary_width
+Imposta la larghezza dell'area di contenimento delle regioni, in pixel.
+Questo valore permette di controllare di quanto una finestra debba essere
+trascinata o ridimensionata oltre il limite di una regione prima che
+venga considerata al di fuori di essa.
+Questa impostazione non viene presa in considerazione quando le finestre
+vengono manipolate utilizzando la tastiera.
+L'area di contenimento pu\[`o] essere disabilitata usando il valore 0.
+.It Ic clock_enabled
+Abilita o disabilita l'orologio nella barra di stato.
+Se viene usato il valore 0, \[`e] possibile inserire un orologio
+personalizzato nello script esterno definito in
+.Ic bar action .
+.It Ic iconic_enabled
+Visualizza nella barra di stato il numero di finestre minimizzate.
+Questo indicatore pu\[`o] essere abilitato usando il valore 1.
+.It Ic color_focus
+Colore del bordo della finestra che detiene il focus.
+Il colore predefinito \[`e] il rosso.
+.It Ic color_focus_maximized
+Colore del bordo della finestra che detiene il focus, se massimizzata.
+Il colore predefinito \[`e] quello usato per
+.Ic color_focus .
+.It Ic color_unfocus
+Colore del bordo delle finestre che non detengono il focus.
+Il colore predefinito \[`e] rgb:88/88/88.
+.It Ic color_unfocus_maximized
+Colore del bordo delle finestre che non detengono il focus, se massimizzate.
+Il colore predefinito \[`e] quello usato per
+.Ic color_unfocus .
+.It Ic dialog_ratio
+Alcune applicazioni creano finestre di dialogo troppo piccole per essere
+utilizzate.
+Questa opzione indica la percentuale dello schermo da utilizzare per le
+finestre di dialogo: ad esempio, il valore 0.6 indica che dovr\[`a] essere
+usato il 60% dello spazio disponibile.
+.It Ic disable_border
+Non mostrare i bordi quando la barra di stato \[`e] nascosta e c'\[`e] una
+sola finestra nella regione.
+.It Ic focus_close
+Imposta quale finestra ricever\[`a] il focus in seguito alla chiusura della
+finestra che lo detiene al momento.
+I valori possibili sono
+.Ar first
+(prima),
+.Ar next
+(successiva),
+.Ar previous
+(precedente, impostazione predefinita) e
+.Ar last
+(ultima).
+.Ar next
 e
-.Pa fullscreen .
-.Pp
-Fare riferimento a
-.Pa master_grow ,
-.Pa master_shrink ,
-.Pa master_add ,
-.Pa master_del ,
-.Pa stack_inc ,
-.Pa stack_del
+.Ar previous
+sono intese relativamente alla finestra che \[`e] stata chiusa.
+.It Ic focus_close_wrap
+Se abilitata, l'ultima finestra ricever\[`a] il focus quando l'ultima
+viene chiusa, e viceversa.
+Questa opzione pu\[`o] essere disabilitata usando il valore 0.
+.It Ic focus_default
+Finestra che deve ricevere il focus quando nessun'altra finestra lo
+detiene.
+I valori possibili sono
+.Ar first
+(prima) e
+.Ar last
+(ultima, impostazione predefinita).
+.It Ic focus_mode
+Comportamento del focus in relazione al cursore del mouse.
+I valori possibili sono:
+.Pp
+.Bl -tag -width "default" -offset indent -compact
+.It Ar default
+Modifica il focus quando viene attraversato un bordo in seguito ad un
+movimento del cursore o all'interazione con una finestra.
+.It Ar follow
+Modifica il focus ogni volta che il cursore attraversa un bordo, anche se
+questo avviene in seguito al passaggio ad un'area di lavoro diversa o ad
+un cambio di layout.
+.It Ar manual
+Modifica il focus solo quando si interagisce con una finestra.
+.El
+.It Ic java_workaround
+Evita alcuni problemi di rendering nelle GUI Java impersonando il window
+manager LG3D, scritto da Sun.
+Il valore predefinito \[`e] 1.
+.It Ic keyboard_mapping
+Rimuove tutte le scorciatoie da tastiera esistenti e carica le nuove
+scorciatoie dal file specificato.
+Questo permette di caricare scorciatoie specifiche del proprio layout
+di tastiera.
+Vedere la sezione
+.Sx MAPPE DI TASTIERA
+pi\[`u] sotto per un elenco dei file che vengono forniti.
+.It Ic layout
+Imposta il layout da utilizzare all'avvio.
+Definito nel formato
+.Li ws Ns Bo Ar idx Bc : Ns Ar master_grow : Ns Ar master_add : Ns Ar stack_inc : Ns Ar always_raise : Ns Ar stack_mode ,
+eg. ws[2]:-4:0:1:0:horizontal configura l'area di lavoro 2 per utilizzare
+un algoritmo di stacking orizzontale, riduce l'area principale di 4
+unit\[`a] e aggiunge una finestra all'area di stacking, mantenendo il
+comportamento predefinito per le finestre floating.
+I valori possibili per
+.Ar stack_mode
+sono
+.Ar vertical ,
+.Ar vertical_flip ,
+.Ar horizontal ,
+.Ar horizontal_flip
+and
+.Ar fullscreen .
+Vedere
+.Ic master_grow ,
+.Ic master_shrink ,
+.Ic master_add ,
+.Ic master_del ,
+.Ic stack_inc ,
+.Ic stack_dec ,
 e
-.Pa always_raise
-per ulteriori informazioni.
-Queste impostazioni sono complesse e hanno effetti secondari; ? opportuno
-familiarizzare con questi comandi prima di modificare l'opzione
-.Pa layout .
-.Pp
-Questa impostazione non viene applicata dopo il restart.
-.It Cm region
-Alloca una regione personalizzata, rimuovendo qualsiasi regione
-automaticamente rilevata stia occupando lo stesso spazio sullo schermo.
-Definita nel formato screen[<idx>]:LARGHEZZAxALTEZZA+X+Y, ad esempio
-\& screen[1]:800x1200+0+0.
-.Pp
-Per fare s? che pi? monitor vengano considerati come una singola entit?
-? sufficiente creare una regione sufficientemente grande da contenerli,
-eg. screen[1]:2048x760+0+0 unisce due monitor con risoluzione 1024x768
-posizionati uno di fianco all'altro.
-.It Cm term_width
-Imposta la dimensione minima preferita per il terminale. Se questo valore
-? maggiore di 0,
-.Nm
-cercher? di riaggiustare la dimensione del testo nel terminale in modo che
-la larghezza del terminale rimanga sopra il valore quando la finestra
-viene ridimensionata. Al momento solo
-.Xr xterm 1
-? supportato. Il binario di
-.Xr xterm 1
-deve essere setuid o setgid perch? questo funzioni: nella maggior parte dei
-sistemi, questo ? il default. L'utente potrebbe voler impostare
-program[term] (vedere la sezione
-.Sx PROGRAMMI
-pi? sotto) per usare una seconda copia del binario di
-.Xr xterm 1
-che non abbia il bit setgid impostato.
-.It Cm title_class_enabled
-Abilita o disabilita la visualizzazione della classe della finestra nella
-barra di stato. Impostare a 1 per abilitare.
-.It Cm title_name_enabled
-Abilita o disabilita la visualizzazione del titolo della finestra nella
-barra di stato. Impostare a 1 per abilitare.
-.It Cm urgent_enabled
-Abilita o disabilita l'hint "urgente".
-In molti emulatori di terminale, il supporto deve essere abilitato
-separatamente: per xterm, ad esempio, ? necessario aggiungere la riga
-.Pa xterm.urgentOnBell: true
-al file
-.Pa .Xdefaults .
-.It Cm window_name_enabled
-Abilita o disabilita la visualizzazione del nome della finestra nella
-barra di stato. Impostare a 1 per abilitare.
-.It Cm verbose_layout
-Abilita o disabilita la visualizzazione dei valori correnti di master e
-stack nella barra di stato. Impostare a 1 per abilitare.
-.It Cm modkey
-Cambia il tasto modificatore.
-Solitamente Mod1 ? il tasto ALT e Mod4 ? il tasto Windows su un PC.
-.It Cm focus_mode
-Se viene usato il valore
-.Pa follow_cursor ,
-il gestore di finestre dar? il focus alla finestra sotto il puntatore
-quando si cambia area di lavoro o si creano finestre.
-.It Cm disable_border
-Rimuovi il bordo dalle finestre se la barra di stato ? nascosta e c'?
-una sola finestra sullo schermo.
-.It Cm border_width
-Spessore del bordo delle finestre in pixel. Il valore 0 disabilita il bordo.
-.It Cm program Ns Bq Ar p
-Definisce una nuova azione per lanciare il programma
-.Ar p .
+.Ic always_raise
+per maggiori informazioni.
+Le opzioni che controllano gli algoritmi di gestione delle finestre sono
+complesse e possono influenzare altre opzioni, quindi \[`e] opportuno
+prendere confidenza con esse prima di utilizzare l'opzione
+.Ic layout .
+.Pp
+Questa impostazione non viene applicata al riavvio.
+.It Ic modkey
+Cambia il modificatore.
+Solitamente Mod1 \[`e] il tasto Alt e Mod4 il tasto Windows su un PC.
+.It Ic name
+Imposta il nome di un'area di lavoro all'avvio.
+Definito nel formato
+.Li ws Ns Bo Ar idx Bc : Ns Ar name ,
+eg. ws[1]:Console assegna il nome
+.Dq Console
+all'area di lavoro 1.
+.It Ic program Ns Bq Ar p
+Definisce la nuova azione
+.Ar p ,
+corrispondente all'esecuzione di un programma.
 Vedere la sezione
 .Sx PROGRAMMI
-pi? sotto.
-.It Cm bind Ns Bq Ar x
-Assegna una combinazione di tasti all'azione
-.Ar x .
-Vedere la sezione
-.Sx SCORCIATOIE
-pi? sotto.
-.It Cm quirk Ns Bq Ar c:n
+pi\[`u] sotto.
+.It Ic quirk Ns Bq Ar c Ns Li : Ns Ar i Ns Li : Ns Ar n
 Aggiunge un "quirk" per le finestre di classe
-.Ar c
+.Ar c ,
+istanza
+.Ar i
 e nome
 .Ar n .
 Vedere la sezione
-.Sx QUIRKS
-pi? sotto.
-.El
+.Sx QUIRK
+pi\[`u] sotto.
+.It Ic region
+Definisce una regione personalizzata, rimuovendo tutte le regioni create in
+automatico che occupano la stessa parte dello schermo.
+Definita nel formato
+.Li screen Ns Bo Ar idx Ns Bc : Ns Ar width Ns x Ns Ar height Ns + Ns Ar x Ns + Ns Ar y ,
+eg. screen[1]:800x1200+0+0.
 .Pp
-I colori devono essere specificati nel formato usato da
-.Xr XQueryColor 3
-e i font in quello usato da
-.Xr XQueryFont 3 .
+Per fare s\[`i] che una regione copra pi\[`u] monitor, \[`e] sufficiente
+definirla in modo che li occupi tutti, eg. screen[1]:2048x768+0+0 definisce
+una regione che copre due monitor con risoluzione 1024x768 posizionati uno
+di fianco all'altro.
+.It Ic region_padding
+Larghezza, in pixel, dello spazio lasciato vuoto all'interno di una regione.
+Questa opzione pu\[`o] essere disabilitata usando il valore 0.
+.It Ic spawn_position
+Posizione da assegnare alle finestre al momento della loro creazione.
+I valori possibili sono
+.Ar first
+(prima),
+.Ar next
+(successiva),
+.Ar previous
+(precedente) e
+.Ar last
+(ultima, predefinito).
+.Ar next
+e
+.Ar previous
+sono intese relativamente alla finestra che detiene il focus.
+.It Ic stack_enabled
+Abilita o disabilita la visualizzazione dell'algoritmo di stacking in uso
+all'interno della barra di stato.
+.It Ic term_width
+Imposta la larghezza minima desiderata per i terminali.
+Se il valore \[`e] maggiore di 0,
+.Nm
+cercher\[`a] di regolare la dimensione del font usato dal terminale
+per fare s\[`i] che la larghezza rimanga superiore ad esso mentre la
+finestra viene ridimensionata.
+Solo
+.Xr xterm 1
+\[`e] supportato al momento.
+L'eseguibile di
+.Xr xterm 1
+non deve avere i bit setuid o setgid abilitati, contrariamente a quanto
+avviene nella maggior parte dei sistemi.
+L'utente potrebbe dover creare una copia dell'eseguibile di
+.Xr xterm 1 ,
+priva dei bit setuid e setgid, e modificare program[term] (vedere la
+sezione
+.Sx PROGRAMMI
+pi\[`u] sotto) in modo che punti a questa copia.
+.It Ic title_gap
+Larghezza, in pixel, dello spazio lasciato vuoto tra una finestra e l'altra.
+L'utilizzo di un valore negativo fa s\[`i] che le finestre si sovrappongano.
+Se il valore impostato \[`e] l'opposto di
+.Ic border_width ,
+non verr\[`a] visualizzato alcun bordo tra le finestre.
+Questa opzione pu\[`o] essere disabilitata usando il valore 0.
+.It Ic urgent_collapse
+Disabilita la visualizzazione di un testo sostitutivo per le aree di lavoro
+che non contengono finestre urgenti.
+Questa opzione pu\[`o] essere abilitata usando il valore 1.
+.It Ic urgent_enabled
+Abilita o disabilita la visualizzazione dell'indicatore di urgenza
+all'interno della barra di stato.
+Molti emulatore di terminale devono essere configurati esplicitamente per
+fare s\[`i] che il carattere "bell" causi la modifica dello stato di
+urgenza della finestra.
+Ad esempio, in
+.Xr xterm 1 ,
+\[`e] necessario aggiungere al file
+.Pa .Xdefaults
+la seguente riga:
+.Bd -literal -offset indent
+xterm.bellIsUrgent: true
+.Ed
+.It Ic verbose_layout
+Abilita o disabilita la visualizzazione del numero di finestre nell'area
+principale e del numero di righe (o colonne) nell'area di stacking.
+Questa opzione pu\[`o] essere disabilitata usando il valore 1.
+Vedre
+.Ar master_add ,
+.Ar master_del ,
+.Ar stack_inc
+e
+.Ar stack_dec
+per maggiori informazioni.
+.It Ic window_class_enabled
+Abilita o disabilita la visualizzazione del nome della classe (da WM_CLASS)
+all'interno della barra di stato.
+Questa opzione pu\[`o] essere abilitata usando il valore 1.
+.It Ic window_instance_enabled
+Abilita o disabilita la visualizzazione del nome dell'istanza (da WM_CLASS)
+all'interno della barra di stato.
+Questa opzione pu\[`o] essere abilitata usando il valore 1.
+.It Ic window_name_enabled
+Abilita o disabilita la visualizzazione del titolo della finestra (da
+_NET_WM_NAME o WM_NAME) all'interno della barra di stato.
+Questa opzione pu\[`o] essere abilitata usando il valore 1.
 .Pp
-Per avere una lista dei font disponibili sul proprio sistema utilizzare
-.Xr fc-list 1
-o
-.Xr xlsfonts 1 .
-L'applicazione
-.Xr xfontsel 1
-? utile per visualizzare la X Logical Font Description ("XLFD") usata per
-la chiave
-.Pa bar_font .
+Per impedire che titoli di finestra troppo lunghi impediscano di
+visualizzare altre informazioni, lo spazio dedicato al titolo \[`e]
+limitato a 64 caratteri.
+Vedere
+.Ic bar_format
+per maggiori informazioni.
+.It Ic warp_pointer
+Posiziona il cursore del mouse al centro della finestra che ha il focus
+quando vengono utilizzate scorciatoie da tastiera per modificare il focus,
+cambiare area di lavoro, cambiare regione, etc.
+Questa opzione pu\[`o] essere abilitata usando il valore 1.
+.It Ic workspace_limit
+Imposta il numero di aree di lavoro disponibili.
+Il valore minimo \[`e] 1, quello massimo \[`e] 22, quello predefinito
+\[`e] 10.
+.El
 .Sh PROGRAMMI
 .Nm
-consente la definizione di azioni personalizzate per lanciare programmi di
-propria scelta, che possono essere assegnate a combinazioni di tasti nello
-stesso modo in cui ? possibile farlo con le azioni predefinite.
+consente di definire azioni personalizzate per l'esecuzione di programmi,
+e di assegnare queste azioni a scorciatoie da tastiera come \[`e]
+possibile per quelle predefinite.
 Vedere la sezione
 .Sx SCORCIATOIE
-pi? sotto.
+pi\[`u] sotto.
 .Pp
-I programmi di default sono descritte qui sotto:
+I programmi vengono definiti come segue:
 .Pp
-.Bl -tag -width "screenshot_wind" -offset indent -compact
-.It Cm term
-xterm
-.It Cm screenshot_all
-screenshot.sh full
-.It Cm screenshot_wind
-screenshot.sh window
-.It Cm lock
-xlock
-.It Cm initscr
-initscreen.sh
-.It Cm menu
-dmenu_run \-fn $bar_font \-nb $bar_color \-nf $bar_font_color \-sb $bar_border \-sf $bar_color
-.El
-.Pp
-I programmi personalizzati vengono specificati con la seguente sintassi:
+.Dl program Ns Bo Ar action Bc = Ar progpath Op Ar arg Op Ar arg ...
 .Pp
-.Dl program[<nome>] = <percorso> [<arg> [... <arg>]]
+.Ar action
+\[`e] qualsiasi identificatore che non vada in conflitto con una delle
+azioni predefinite,
+.Ar progpath
+\[`e] il percorso del programma da eseguire e
+.Ar arg
+sono gli argomenti (uno o pi\[`u]) da passare al programma.
 .Pp
-.Aq nome
-? un qualsiasi identificatore che non va in conflitto con un'azione
-predefinita o una chiave,
-.Aq percorso
-? il programma desiderato, e
-.Aq arg
-sono zero o pi? argomenti da passare al programma.
+Se il percorso o gli argomenti comprendono il carattere
+.Ql # ,
+questo dovr\[`a] essere preceduto da un carattere di escape,
+diventando \e#.
 .Pp
-Le seguenti variabili rappresentano valori impostabili in
-.Nm
-(vedere la sezione
-.Sx FILE DI CONFIGURAZIONE
-sopra), e possono essere usati nel campo
-.Aq arg
-dove saranno sostituite con il valore al momento del lancio del programma:
+I seguenti argomenti verranno sostituiti, al momento dell'esecuzione, con
+il valore assegnato all'opzione corrispondente:
 .Pp
 .Bl -tag -width "$bar_font_color" -offset indent -compact
 .It Cm $bar_border
@@ -296,41 +540,82 @@ dove saranno sostituite con il valore al momento del lancio del programma:
 .It Cm $bar_font_color
 .It Cm $color_focus
 .It Cm $color_unfocus
+.It Cm $dmenu_bottom
+\-b se
+.Ic bar_at_bottom
+\[`e] abilitato
+.It Cm $region_index
+.It Cm $workspace_index
 .El
 .Pp
 Esempio:
 .Bd -literal -offset indent
 program[ff] = /usr/local/bin/firefox http://spectrwm.org/
-bind[ff] = Mod+f # adesso Mod+F lancia firefox
+bind[ff] = MOD+Shift+b # Ora M-S-b esegue Firefox
 .Ed
 .Pp
-Per eliminare la combinazione precedente:
+Per eliminare la scorciatoia appena definita:
 .Bd -literal -offset indent
-bind[] = Mod+f
-program[ff] =
+bind[] = MOD+Shift+b
 .Ed
 .Pp
+Programmi predefiniti:
+.Pp
+.Bl -tag -width "screenshot_wind" -offset indent -compact
+.It Cm lock
+xlock
+.It Cm menu
+dmenu_run $dmenu_bottom \-fn $bar_font \-nb $bar_color \-nf $bar_font_color \-sb
+$bar_border \-sf $bar_color
+.It Cm term
+xterm
+.It Cm initscr
+initscreen.sh        # opzionale
+.It Cm screenshot_all
+screenshot.sh full   # opzionale
+.It Cm screenshot_wind
+screenshot.sh window # opzionale
+.El
+.Pp
+I programmi opzionali non verranno verificati a meno di non essere
+ridefiniti dall'utente.
+Se uno dei programmi predefiniti fallisce la verifica, \[`e] possibile
+risolvere l'errore installando il programma corrispondente, modificando
+il percorso del programma o disabilitando la scorciatoia relativa.
+.Pp
+Ad esempio, per ridefinire
+.Ic lock :
+.Bd -literal -offset indent
+program[lock] = xscreensaver\-command \-lock
+.Ed
+.Pp
+Per disabilitare la scorciatoia assegnata a
+.Ic lock
+ed impedirne la verifica:
+.Bd -literal -offset indent
+bind[] = MOD+Shift+Delete
+.Ed
 .Sh SCORCIATOIE
 .Nm
-fornisce molte funzioni (o azioni) accessibili tramite combinazioni di
-tasti sul mouse o sulla tastiera.
+fornisce numerose azioni che possono essere attivate usando combinazioni
+di tasti sulla tastiera o sul mouse.
 .Pp
-Le scorciatoie assegnate al mouse sono:
+Le combinazioni di tasti che coinvolgono il mouse sono le seguenti:
 .Pp
 .Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
 .It Cm M1
-D? focus alla finestra
+Assegna il focus ad una finestra
 .It Cm M-M1
-Muove la finestra
+Sposta una finestra
 .It Cm M-M3
-Ridimensiona la finestra
+Ridimensiona una finestra
 .It Cm M-S-M3
-Ridimensiona la finestra mantenendola centrata
+Ridimensiona una finestra, mantenendola centrata
 .El
 .Pp
-Le scorciatoie da tastiera di default sono:
+Le scorciatoie da tastiera predefinite sono le seguenti:
 .Pp
-.Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
+.Bl -tag -width "M-j, M-<TAB>XXXXXX" -offset indent -compact
 .It Cm M-S- Ns Aq Cm Return
 term
 .It Cm M-p
@@ -341,8 +626,10 @@ quit
 restart
 .It Cm M- Ns Aq Cm Space
 cycle_layout
+.It Cm M-S-\e
+flip_layout
 .It Cm M-S- Ns Aq Cm Space
-reset_layout
+stack_reset
 .It Cm M-h
 master_shrink
 .It Cm M-l
@@ -354,7 +641,7 @@ master_del
 .It Cm M-S-,
 stack_inc
 .It Cm M-S-.
-stack_del
+stack_dec
 .It Cm M- Ns Aq Cm Return
 swap_main
 .It Xo
@@ -369,30 +656,46 @@ focus_next
 focus_prev
 .It Cm M-m
 focus_main
+.It Cm M-u
+focus_urgent
 .It Cm M-S-j
 swap_next
 .It Cm M-S-k
 swap_prev
 .It Cm M-b
 bar_toggle
+.It Cm M-S-b
+bar_toggle_ws
 .It Cm M-x
 wind_del
 .It Cm M-S-x
 wind_kill
-.It Cm M- Ns Aq Ar n
-.Ns ws_ Ns Ar n
-.It Cm M-S- Ns Aq Ar n
-.Ns mvws_ Ns Ar n
+.It Cm M- Ns Aq Ar 1-9,0,F1-F12
+.Pf ws_ Aq Ar 1-22
+.It Cm M-S- Ns Aq Ar 1-9,0,F1-F12
+.Pf mvws_ Ns Aq Ar 1-22
+.It Cm M- Ns Aq Ar Keypad 1-9
+.Pf rg_ Aq Ar 1-9
+.It Cm M-S- Ns Aq Ar Keypad 1-9
+.Pf mvrg_ Aq Ar 1-9
 .It Cm M- Ns Aq Cm Right
 ws_next
 .It Cm M- Ns Aq Cm Left
 ws_prev
+.It Cm M- Ns Aq Cm Up
+ws_next_all
+.It Cm M- Ns Aq Cm Down
+ws_prev_all
 .It Cm M-a
+ws_next_move
+.It Cm M-S- Ns Aq Cm Left
+ws_prev_move
+.It Cm M-S- Ns Aq Cm Up
 ws_prior
 .It Cm M-S- Ns Aq Cm Right
-screen_next
+rg_next
 .It Cm M-S- Ns Aq Cm Left
-screen_prev
+rg_prev
 .It Cm M-s
 screenshot_all
 .It Cm M-S-s
@@ -401,7 +704,7 @@ screenshot_wind
 version
 .It Cm M-t
 float_toggle
-.It Cm M-S Aq Cm Delete
+.It Cm M-S- Ns Aq Cm Delete
 lock
 .It Cm M-S-i
 initscr
@@ -409,25 +712,47 @@ initscr
 iconify
 .It Cm M-S-w
 uniconify
+.It Cm M-e
+maximize_toggle
 .It Cm M-S-r
 always_raise
 .It Cm M-v
 button2
+.It Cm M--
+width_shrink
+.It Cm M-=
+width_grow
+.It Cm M-S--
+height_shrink
+.It Cm M-S-=
+height_grow
+.It Cm M-[
+move_left
+.It Cm M-]
+move_right
+.It Cm M-S-[
+move_up
+.It Cm M-S-]
+move_down
+.It Cm M-S-/
+name_workspace
+.It Cm M-/
+search_workspace
+.It Cm M-f
+search_win
 .El
 .Pp
-I nomi delle azioni e le relative descrizioni sono le seguenti:
+Le azioni predefinite disponibili sono le seguenti:
 .Pp
-.Bl -tag -width "M-j, M-<TAB>XXX" -offset indent -compact
+.Bl -tag -width "M-j, M-<TAB>XXXX" -offset indent -compact
 .It Cm term
-Lancia un nuovo terminale
-(vedi
+Esegue un terminale (vedere la sezione
 .Sx PROGRAMMI
-pi? in alto).
+pi\[`u] in alto).
 .It Cm menu
-Menu
-(vedi
+Mostra il menu (vedere la sezione
 .Sx PROGRAMMI
-pi? in alto).
+pi\[`u] in alto).
 .It Cm quit
 Chiude
 .Nm .
@@ -435,35 +760,44 @@ Chiude
 Riavvia
 .Nm .
 .It Cm cycle_layout
-Cambia layout.
-.It Cm reset_layout
-Re-inizializza il layout.
+Passa al layout successivo.
+.It Cm flip_layout
+Inverte l'area principale e quella di stacking.
+.It Cm stack_reset
+Riporta il layout al suo stato iniziale.
 .It Cm master_shrink
-Restringe l'area principale.
+Riduce la dimensione dell'area principale.
 .It Cm master_grow
-Allarga l'area principale.
+Aumenta la dimensione dell'area principale.
 .It Cm master_add
-Aggiunge finestre all'area principale.
+Aggiunge una finestra all'area principale.
 .It Cm master_del
-Rimuove finestre dall'area principale.
+Rimuove una finestra dall'area principale.
 .It Cm stack_inc
-Aggiunge righe/colonne all'area di stacking.
-.It Cm stack_del
-Rimuove righe/colonne dall'area di stacking.
+Aggiunge una riga (o colonna) all'area di stacking.
+.It Cm stack_dec
+Rimuove una riga (o colonna) dall'area di stacking.
 .It Cm swap_main
-Muove la finestra corrente nell'area principale.
+Sposta la finestra corrente nell'area principale.
 .It Cm focus_next
-D? il focus alla finestra successiva.
+Assegna il focus alla finestra successiva.
 .It Cm focus_prev
-D? il focus alla finestra precedente.
+Assegna il focus alla finestra precedente.
 .It Cm focus_main
-D? il focus alla finestra principale.
+Assegna il focus alla finestra principale dell'area di lavoro.
+.It Cm focus_urgent
+Assegna il focus alla finestra urgente successiva.
+Verr\[`a] effettuato, se necessario, il passaggio ad un'altra area di
+lavoro.
 .It Cm swap_next
-Scambia con la finestra successiva dell'area di lavoro.
+Inverte la finestra corrente con quella successiva.
 .It Cm swap_prev
-Scambia con la finestra precedente dell'area di lavoro.
+Inverte la finestra corrente con quella precedente.
 .It Cm bar_toggle
-Mostra/nascondi la barra di stato da tutte le aree di lavoro.
+Modifica la visibilit\[`a] della barra di stato a livello globale.
+.It Cm bar_toggle_ws
+Modifica la visibilit\[`a] della barra di stato nell'area di lavoro
+corrente.
 .It Cm wind_del
 Chiude la finestra corrente.
 .It Cm wind_kill
@@ -473,82 +807,186 @@ Passa all'area di lavoro
 .Ar n ,
 dove
 .Ar n
-? compreso tra 1 e 10.
+\[`e] un valore compreso tra 1 e
+.Ic workspace_limit .
 .It Cm mvws_ Ns Ar n
 Sposta la finestra corrente nell'area di lavoro
 .Ar n ,
 dove
 .Ar n
-? compreso tra 1 e 10.
+\[`e] un numero compreso tra 1 e
+.Ic workspace_limit .
+.It Cm rg_ Ns Ar n
+Assegna il focus alla regione
+.Ar n ,
+dove
+.Ar n
+\[`e] un numero compreso tra 1 e 9.
+.It Cm mvrg_ Ns Ar n
+Sposta la finestra corrente nella regione
+.Ar n ,
+dove
+.Ar n
+\[`e] un numero compreso tra 1 e 9.
 .It Cm ws_next
 Passa all'area di lavoro non vuota successiva.
 .It Cm ws_prev
 Passa all'area di lavoro non vuota precedente.
+.It Cm ws_next_all
+Passa all'area di lavoro successiva.
+.It Cm ws_prev_all
+Passa all'area di lavoro precedente.
+.It Cm ws_next_move
+Passa all'area di lavoro successiva, spostando allo stesso tempo la
+finestra corrente.
+.It Cm ws_prev_move
+Passa all'area di lavoro precedente, spostando allo stesso tempo la
+finestra corrente.
 .It Cm ws_prior
 Passa all'ultima area di lavoro visitata.
-.It Cm screen_next
-Sposta il puntatore nella regione successiva.
-.It Cm screen_prev
-Sposta il puntatore nella regione precedente.
+.It Cm rg_next
+Passa alla regione successiva.
+.It Cm rg_prev
+Passa alla regione precedente.
 .It Cm screenshot_all
-Cattura uno screenshot dell'intero schermo, se abilitato (vedere la sezione
+Cattura l'intera schermata chiamando l'apposito script (vedere la sezione
 .Sx PROGRAMMI
-pi? in alto).
+pi\[`u] in alto).
 .It Cm screenshot_wind
-Cattura uno screenshot di una singola finestra, se abilitato (vedere la
-sezione
+Cattura una singola finestra chiamando l'apposito script (vedere la sezione
 .Sx PROGRAMMI
-pi? in alto).
+pi\[`u] in alto).
 .It Cm version
-Abilita/disabilita il numero di versione nella barra di stato.
+Modifica la visibilit\[`a] del numero di versione all'interno della barra
+di stato.
 .It Cm float_toggle
-Passa la finestra che ha il focus da floating a tiled.
+Modifica la finestra che detiene il focus, portandola da floating a tiled
+e viceversa.
 .It Cm lock
 Blocca lo schermo (vedere la sezione
 .Sx PROGRAMMI
-pi? in alto).
+pi\[`u] in alto).
 .It Cm initscr
-Re-inizializza gli schermi fisici (vedere la sezione
+Inizializza nuovamente tutti gli schermi (vedere la sezione
 .Sx PROGRAMMI
-pi? in alto).
+pi\[`u] in alto).
 .It Cm iconify
-Minimizza (unmap) la finesta che ha il focus.
+Minimizza la finestra che detiene il focus.
 .It Cm uniconify
-Massimizza (map) la finestra selezionata tramite dmenu.
+Ripristina la finestra selezionata tramite
+.Xr dmenu 1 .
+.It Cm maximize_toggle
+Modifica lo stato di massimizzazione della finestra che detiene il focus.
 .It Cm always_raise
-Quando ? abilitato, le finestre floating possono essere oscurate da
-finestre tiled.
+Se impostato, le finestre tiled possono oscurare le finestre floating.
 .It Cm button2
 Simula la pressione del tasto centrale del mouse.
+.It Cm width_shrink
+Riduce la larghezza di una finestra floating.
+.It Cm width_grow
+Aumenta la larghezza di una finestra floating.
+.It Cm height_shrink
+Riduce l'altezza di una finestra floating.
+.It Cm height_grow
+Aumenta l'altezza di una finestra floating.
+.It Cm move_left
+Sposta una finestra floating verso sinistra di un'unit\[`a].
+.It Cm move_right
+Sposta una finestra floating verso destra di un'unit\[`a].
+.It Cm move_up
+Sposta una finestra floating verso l'alto di un'unit\[`a].
+.It Cm move_down
+Sposta una finestra floating verso il basso di un'unit\[`a].
+.It Cm name_workspace
+Assegna un nome all'area di lavoro corrente.
+.It Cm search_workspace
+Cerca un'area di lavoro.
+.It Cm search_win
+Cerca una finestra all'interno dell'area di lavoro corrente.
 .El
 .Pp
-Le scorciatoie personalizzate sono specificate nel file di configurazione
-come segue:
+Le scorciatoie da tastiera personalizzate vengono definite come segue:
+.Pp
+.Dl bind Ns Bo Ar action Bc = Ar keys
+.Pp
+.Ar action
+\[`e] una delle azioni predefinite descritte sopra, oppure la stringa vuota
+(per disabilitare la scorciatoia).
+.Ar keys
+\[`e] composta da uno o pi\[`u] tasti modificatore (eg. MOD, Mod1, Shift,
+etc.) e uno o pi\[`u] tasti normali (eg. b, Space, etc.) separati da
+.Ql + .
 .Pp
-.Dl bind[<azione>] = <tasti>
+Esempio:
+.Bd -literal -offset indent
+bind[reset] = Mod4+q # Assegna l'azione reset alla scorciatoia Win+q
+bind[] = Mod1+q # disabilita la scorciatoia predefinita Alt+q
+.Ed
+.Pp
+Per usare il valore dell'opzione
+.Ic modkey
+in una scorciatoia, specificare MOD come modificatore.
+.Pp
+Pi\[`u] scorciatoie possono essere assegnate alla stessa azione.
+.Pp
+Per usare dei caratteri non latini, come \[oa] o \[*p], all'interno di una
+scorciatoia, \[`e] necessario specificare il nome xkb del carattere
+anzich\['e] il carattere stesso.
+Eseguendo
+.Xr xev 1
+e premendo un tasto mentre la finestra del programma detiene il focus,
+\[`e] possibile leggere il nome xkb corrispondente al tasto premuto.
+Ad esempio, per \[oa]:
+.Bd -literal -offset indent
+KeyPress event, serial 41, synthetic NO, window 0x2600001,
+    root 0x15a, subw 0x0, time 106213808, (11,5), root:(359,823),
+    state 0x0, keycode 24 (keysym 0xe5, aring), same_screen YES,
+    XLookupString gives 2 bytes: (c3 a5) "\[oa]"
+    XmbLookupString gives 2 bytes: (c3 a5) "\[oa]"
+    XFilterEvent returns: False
+.Ed
 .Pp
-.Aq azione
-? una delle azioni elencate sopra (oppure nulla) e
-.Aq tasti
-? dato da zero o pi? modificatori (MOD, Mod1, Shift, ecc.) e uno o pi?
-tasti normali (b, space, ecc.), separati da "+".
-Per esempio:
+Il nome xkb \[`e] aring.
+Quindi, all'interno di
+.Pa spectrwm.conf
+sar\[`a] possibile aggiungere la seguente riga:
 .Bd -literal -offset indent
-bind[reset] = Mod4+q # assegna reset ai tasti Windows + q
-bind[] = Mod1+q # rimuovi l'assegnazione di Alt + q
+bind[program] = MOD+aring
 .Ed
+.Sh MAPPE DI TASTIERA
+\[`E] possibile caricare le scorciatoie da un file di configurazione
+separato tramite l'opzione
+.Ic keyboard_mapping :
+questo consente di utilizzare scorciatoie specifiche del proprio layout di
+tastiera.
 .Pp
-Pi? combinazioni di tasti possono essere assegnate alla stessa azione.
+Vengono forniti i seguenti file:
+.Pp
+.Bl -tag -width "spectrwm_XX.confXXX" -offset indent -compact
+.It Cm spectrwm_cz.conf
+Layout per tastiere ceche
+.It Cm spectrwm_es.conf
+Layout per tastiere spagnole
+.It Cm spectrwm_fr.conf
+Layout per tastiere francesi
+.It Cm spectrwm_fr_ch.conf
+Layout per tastiere francesi (Svizzera)
+.It Cm spectrwm_se.conf
+Layout per tastiere svedesi
+.It Cm spectrwm_us.conf
+Layout per tastiere americane
+.El
 .Sh QUIRK
-.Nm
-fornisce la possibilit? di specificare dei "quirk" per la gestione di
-finestre che devono subire un trattamento speciale da un gestore di finestre
-tiling, come ad esempio alcune finestre di dialogo e applicazioni a
-schermo intero.
+\[`E] possibile specificare "quirk" da applicare a quelle finestre (ad
+esempio applicazioni a schermo intero e finestre di dialogo) che richiedono
+un comportamento speciale da parte di un gestore di finestre tiling come
+.Nm .
 .Pp
-I quirk abilitati di default sono elencati qui sotto:
+La configurazione predefinita, per quanto riguarda i quirk, \[`e] la
+seguente:
 .Pp
-.Bl -tag -width "OpenOffice.org N.M:VCLSalFrame<TAB>XXX" -offset indent -compact
+.Bl -tag -width "OpenOffice.org N.M:VCLSalFrame<TAB>XXX" -offset indent \
+-compact
 .It Firefox\-bin:firefox\-bin
 TRANSSZ
 .It Firefox:Dialog
@@ -577,66 +1015,128 @@ FLOAT + ANYWHERE
 XTERM_FONTADJ
 .El
 .Pp
-I quirk sono descritti qui sotto:
+I quirk disponibili sono i seguenti:
 .Pp
 .Bl -tag -width "XTERM_FONTADJ<TAB>XXX" -offset indent -compact
 .It FLOAT
-Questa finestra deve essere lasciata libera di muoversi (float).
+Le finestre saranno sempre floating.
 .It TRANSSZ
-Aggiusta la dimensione delle finestre troppo piccole usando dialog_ratio
-(vedere
-.Sx FILE DI CONFIGURAZIONE ) .
+Modifica la dimensione delle finestre di dialogo in base al valore di
+.Ic dialog_ratio
+(vedere la sezione
+.Sx FILE DI CONFIGURAZIONE
+pi\[`u] in alto).
 .It ANYWHERE
-Consente alla finestra di decidere da sola dove posizionarsi.
+Consenti alle finestre di decidere la propria posizione.
 .It XTERM_FONTADJ
-Ridimensiona il font di xterm quando viene ridimensionata la finestra.
+Regola la dimensione dei font di
+.Xr xterm 1
+quando la dimensione delle finestre viene modificata.
 .It FULLSCREEN
-Rimuove i bordi, consentendo alla finestra di usare l'intera dimensione
-dello schermo.
+Non mostrare il bordo.
 .It FOCUSPREV
-Quando la finestra viene chiusa, d? il focus alla finestra che aveva il
-focus precedente anzich? all'applicazione precedente nello stack.
+Alla chiusura di una finestra, il focus verr\[`a] assegnato alla finestra
+che lo deteneva in precedenza e non alla finestra precedente nello stack.
+.It NOFOCUSONMAP
+Non assegnare il focus alle finestre quando vengono create.
+Questo quirk viene ignorato se il valore di
+.Ic focus_mode
+\[`e]
+.Ar follow .
+.It FOCUSONMAP_SINGLE
+Assegna il focus alle finestre quando vengono create solo se non sono
+gi\[`a] presenti delle finestre con la stessa classe e istanza nell'area
+di lavoro.
+Questo quirk viene ignorato se il valore di
+.Ic focus_mode
+\[`e]
+.Ar follow .
+.It OBEYAPPFOCUSREQ
+Assegna il focus alle finestre quando viene richiesto tramite un messaggio
+di tipo _NET_ACTIVE_WINDOW con sorgente 1.
+Se la sorgente \[`e] 0 (non specificato) o 2 (pager), la richiesta viene
+sempre accolta.
+.It IGNOREPID
+Ignora il PID nella scelta dell'area di lavoro iniziale per le nuove
+finestre.
+Molto utile per le applicazioni (eg. terminali) che creano pi\[`u] finestre
+all'interno dello stesso processo.
+.It IGNORESPAWNWS
+Ignora l'area di lavoro in cui \[`e] stata eseguita la scorciatoia da
+tastiera nella scelta dell'area di lavoro iniziale per le nuove finestre.
+.It WS Ns Bq Ar n
+Obbliga le nuove finestre ad essere assegnate all'area di lavoro
+.Ar n .
 .El
 .Pp
-I quirk personalizzati vanno specificati nel file di configurazione come
-segue:
+I quirk personalizzati vengono definiti come segue:
 .Pp
-.Dl quirk[<classe>:<nome>] = <quirk> [ + <quirk> ... ]
+.Dl quirk Ns Bo Ar class Ns Bo : Ns Ar instance Ns Bo : Ns Ar name Bc Bc Bc = Ar quirk Op + Ar quirk ...
+.Pp
+.Ar class ,
+.Ar instance
+(opzionale) e
+.Ar name
+(opzionale) sono dei pattern che vengono usati per determinare a quali
+finestre i quirk debbano essere applicati e
+.Ar quirk
+\[`e] uno dei quirk descritti in precedenza.
+.Pp
+I pattern vengono interpretati come espressioni regolari estese POSIX.
+I simboli ':', '[' e ']' devono essere preceduti da '\\' per essere
+considerati letteralmente.
+Vedere
+.Xr regex 7
+per ulteriori informazioni sulle espressioni regolari estese POSIX.
 .Pp
-.Aq classe
-e
-.Aq nome
-specificano a quali finestre i quirk vanno applicati, e
-.Aq quirk
-? uno dei quirk presente nella lista sopra.
 Ad esempio:
 .Bd -literal -offset indent
-quirk[MPlayer:xv] = FLOAT + FULLSCREEN + FOCUSPREV
-quirk[pcb:pcb] = NONE  # rimuovi un quirk precedentemente specificato
+quirk[MPlayer] = FLOAT + FULLSCREEN + FOCUSPREV # Le finestre con \
+classe 'MPlayer' sono floating
+quirk[.*] = FLOAT # Le finestre sono floating
+quirk[.*:.*:.*] = FLOAT # Come sopra
+quirk[Firefox:Navigator] = FLOAT # Le finestre di navigazione di \
+Firefox sono floating
+quirk[::Console] = FLOAT # Le finestre la cui classe non \[`e] impostata \
+e il cui nome \[`e] 'Console' sono floating
+quirk[\\[0-9\\].*:.*:\\[\\[\\:alnum\\:\\]\\]*] = FLOAT # Le finestre la \
+cui classe inizia con un numero e il cui nome \[`e] non definito o \
+contiene solo caratteri alfanumerici, senza spazi, sono floating
+quirk[pcb:pcb] = NONE # Rimuove i quirk predefiniti
 .Ed
-.Pp
-? possibile ottenere
-.Aq classe
+\[`E] possibile ottenere
+.Ar class ,
+.Ar instance
 e
-.Aq nome
-usando xprop(1) e facendo click sulla finestra desiderata.
-Nel seguente esempio ? stato fatto click sulla finestra principale di
+.Ar name
+eseguendo
+.Xr xprop 1
+e selezionando la finestra desiderata.
+In questo esempio, \[`e] stata selezionata la finestra principale di
 Firefox:
 .Bd -literal -offset indent
-$ xprop | grep WM_CLASS
+$ xprop | grep \-E "^(WM_CLASS|_NET_WM_NAME|WM_NAME)"
 WM_CLASS(STRING) = "Navigator", "Firefox"
+WM_NAME(STRING) = "spectrwm - ConformalOpenSource"
+_NET_WM_NAME(UTF8_STRING) = "spectrwm - ConformalOpenSource"
+.Ed
+.Pp
+Il comando
+.Xr xprop 1
+visualizza WM_CLASS nel seguente formato:
+.Bd -literal -offset indent
+WM_CLASS(STRING) = "<instance>", "<class>"
 .Ed
 .Pp
-Bisogna tenere conto del fatto che usare grep per trovare WM_CLASS inverte
-la classe e il nome. Nell'esempio precedente, la dichiarazione del quirk
-sarebbe
+In questo caso, bisognerebbe aggiungere al file di configurazione la
+seguente riga:
 .Bd -literal -offset indent
 quirk[Firefox:Navigator] = FLOAT
 .Ed
 .Pp
 .Nm
-assegna automaticamente i quirk alle finestre in base al valore della
-propriet? _NET_WM_WINDOW_TYPE in base al seguente schema:
+assegna alcuni quirk in automatico, basandosi sul valore della
+propriet\[`a] _NET_WM_WINDOW_TYPE, nel seguente modo:
 .Pp
 .Bl -tag -width "_NET_WM_WINDOW_TYPE_TOOLBAR<TAB>XXX" -offset indent -compact
 .It _NET_WM_WINDOW_TYPE_DOCK
@@ -651,102 +1151,99 @@ FLOAT
 FLOAT
 .El
 .Pp
-In tutti gli altri casi, nessun quirk ? automaticamente assegnato alla
-finestra. I quirk specificati nel file di configurazione hanno la precedenza
-sui quirk assegnati in automatico.
+In tutti gli altri casi gli unici quirk assegnati alle finestre saranno
+quelli predefiniti o, con precedenza maggiore, quelli specificati nel
+file di configurazione.
 .Sh EWMH
 .Nm
-implementa in maniera parziale la specifica Extended Window Manager Hints
-(EWMH). Ci? permette di controllare sia le finestre che
+implementa in maniera parziale la specifica EWMH, Extended Window Manager
+Hints: questo consente di controllare le finestre, oltre che
 .Nm
-stesso tramite script e programmi esterni. Per renderlo possibile,
+stesso, da script e programmi esterni.
+Per sfruttare questo supporto,
 .Nm
-risponde ad alcuni eventi di tipo ClientMessage; questo tipo di messaggio
-pu? essere inviato da un terminale usando programmi come
+dovr\[`a] ricevere degli eventi di tipo ClientMessage; questo tipo di
+messaggio pu\[`o] essere inviato dalla riga di comando usando tool come
 .Xr wmctrl 1
 e
 .Xr xdotool 1 .
-Per il formato esatto di questi messaggi, si veda la specifica EWMH.
+Il formato dei messaggi \[`e] definito nella specifica EWMH.
 .Pp
-L'id della finestra che ha il focus ? memorizzato nella propriet?
-_NET_ACTIVE_WINDOW della root window. ? quindi possibile ottenere il titolo
-della finestra attiva usando
-.Xr xprop 1
-e
-.Xr grep 1
+L'identificativo della finestra che detiene il focus pu\[`o] essere
+ottenuto leggendo il valore della propriet\[`a] _NET_ACTIVE_WINDOWS
+della root window.
+Ad esempio, per visualizzare il titolo della finestra:
 .Bd -literal -offset indent
 $ WINDOWID=`xprop \-root _NET_ACTIVE_WINDOW | grep \-o "0x.*"`
-$ xprop \-id $WINDOWID WM_NAME | grep \-o "\\".*\\""
+$ xprop \-id $WINDOWID _NET_WM_NAME | grep \-o "\\".*\\""
 .Ed
 .Pp
-Per dare il focus ad una finestra, ? sufficiente inviare il messaggio
-_NET_ACTIVE_WINDOW alla root window. Ad esempio, usando
-.Xr wmctrl 1
-(supponendo che 0x4a0000b sia l'id della finestra a cui dare il focus):
+Il focus pu\[`o] essere assegnato ad una finestra inviando un messaggio
+di tipo _NET_ACTIVE_WINDOW alla root window, ad esempio:
 .Bd -literal -offset indent
-$ wmctrl \-i \-c 0x4a0000b
+$ wmctrl \-i \-a 0x4a0000b
 .Ed
 .Pp
-Per chiudere una finestra si pu? inviare il messaggio _NET_CLOSE_WINDOW
-alla root window. Ad esempio, usando
-.Xr wmctrl 1
-(supponendo che 0x4a0000b sia l'id della finestra da chiudere):
+Le finestre possono essere chiuse inviando un messaggio di tipo
+_NET_CLOSE_WINDOW, ad esempio:
 .Bd -literal -offset indent
 $ wmctrl \-i \-c 0x4a0000b
 .Ed
 .Pp
-Per passare una finestra da floating a tiled si pu? aggiungere o rimuovere
-l'atomo _NET_WM_STATE_ABOVE alla propriet? _NET_WM_STATE della finestra,
-inviando il messaggio _NET_WM_STATE alla root window. Ad esempio, usando
-.Xr wmctrl 1
-(supponendo che 0x4a0000b sia l'id della finestra):
+Le finestre possono essere portate da floating a tiled, e viceversa,
+aggiungendo o rimuovendo l'atomo _NET_WM_STATE_ABOVE dalla propriet\[`a]
+_NET_WM_STATE della finestra.
+Per fare ci\[`o], \[`e] necessario inviare un messaggio di tipo
+_NET_WM_STATE, ad esempio:
 .Bd -literal -offset indent
 $ wmctrl \-i \-r 0x4a0000b \-b toggle,_NET_WM_STATE_ABOVE
 .Ed
 .Pp
-Le finestre floating possono essere ridimensionate o spostate inviando il
-messaggio _NET_MOVERESIZE_WINDOW alla root window. Ad esempio, usando
-.Xr wmctrl 1
-(supponendo che 0x4a0000b sia l'id della finestra da spostare):
+Le finestre possono essere minimizzate e ripristinate sostituendo
+_NET_WM_STATE_HIDDEN a _NET_WM_STATE_ABOVE nell'esempio precedente:
 .Bd -literal -offset indent
-$ wmctrl \-i \-r 0x4a0000b \-e 0,100,50,640,480
+$ wmctrl \-i \-r 0x4a0000b \-b toggle,_NET_WM_STATE_HIDDEN
 .Ed
 .Pp
-Questo comando sposta la finestra in (100,50) e la ridimensiona a 640x480.
+Le finestre floating possono essere ridimensionate e spostate tramite
+l'invio di un messaggio di tipo _NET_MOVERESIZE_WINDOW, ad esempio:
+.Bd -literal -offset indent
+$ wmctrl \-i \-r 0x4a0000b \-e 0,100,50,640,480
+.Ed
+In questo caso, la con id 0x4a0000b finestra viene spostata in (100,50)
+e la sua dimensione diventa 640x480.
 .Pp
-I messaggi _NET_MOVERESIZE_WINDOW vengono ignorati per le finestre stacked.
+I messaggi di tipo _NET_MOVERESIZE_WINDOW che fanno riferimento a finestre
+tiled verranno ignorati.
 .Sh SEGNALI
-? possibile riavviare
-.Nm
-inviandogli il segnale HUP.
+Il segnale HUP fa riavviare
+.Nm .
 .Sh FILE
 .Bl -tag -width "/etc/spectrwm.confXXX" -compact
 .It Pa ~/.spectrwm.conf
-impostazioni di
-.Nm
-dell'utente.
-.It Pa /etc/spectrwm.conf
-impostazioni globali di
+File di configurazione specifico dell'utente.
 .Nm .
+.It Pa /etc/spectrwm.conf
+File di configurazione globale.
 .El
 .Sh ORIGINE
 .Nm
-prende ispirazione da xmonad & dwm.
+\[`e] ispirato a xmonad & dwm.
 .Sh AUTORI
 .An -nosplit
-.Pp
 .Nm
-? stato scritto da:
+\[`e] stato scritto da:
 .Pp
-.Bl -tag -width "Ryan Thomas McBride Aq mcbride@countersiege.com " -offset indent -compact
+.Bl -tag -width "Ryan Thomas McBride Aq mcbride@countersiege.com " -offset \
+indent -compact
 .It Cm Marco Peereboom Aq marco@peereboom.us
 .It Cm Ryan Thomas McBride Aq mcbride@countersiege.com
 .It Cm Darrin Chandler Aq dwchandler@stilyagin.com
 .It Cm Pierre-Yves Ritschard Aq pyr@spootnik.org
 .It Cm Tuukka Kataja Aq stuge@xor.fi
 .It Cm Jason L. Wright Aq jason@thought.net
+.It Cm Reginald Kennedy Aq rk@rejii.com
+.It Cm Lawrence Teo Aq lteo@lteo.net
+.It Cm Tiago Cunha Aq tcunha@gmx.com
+.It Cm David Hill Aq dhill@mindcry.org
 .El
-.Sh BUGS
-Al momento il menu, invocato usando
-.Cm M-p ,
-dipende da dmenu.
index 3818a70..9aad052 100644 (file)
--- a/version.h
+++ b/version.h
@@ -22,8 +22,8 @@
 #define SPECTRWM_STRINGIZE(x)  SPECTRWM_STR(x)
 
 #define SPECTRWM_MAJOR         2
-#define SPECTRWM_MINOR         5
-#define SPECTRWM_PATCH         1
+#define SPECTRWM_MINOR         6
+#define SPECTRWM_PATCH         0
 #define SPECTRWM_VERSION               SPECTRWM_STRINGIZE(SPECTRWM_MAJOR) "." \
                                SPECTRWM_STRINGIZE(SPECTRWM_MINOR) "." \
                                SPECTRWM_STRINGIZE(SPECTRWM_PATCH)