debian/0000755000000000000000000000000011726457163007202 5ustar debian/source/0000755000000000000000000000000011726457163010502 5ustar debian/source/format0000644000000000000000000000001411726457163011710 0ustar 3.0 (quilt) debian/scrotwm.preinst0000644000000000000000000000077611726457163012320 0ustar #!/bin/sh set -e # Migrate user changes to the new configuration file dpkg-maintscript-helper \ mv_conffile \ /etc/scrotwm.conf \ /etc/spectrwm.conf \ 0.11.0-1 \ scrotwm \ -- \ "$@" # Don't list scrotwm as an alternative for x-window-manager anymore. # # This cleanup has to be performed here because, when upgrading, the old # prerm is not called in a way that cleans up the alternative if [ "$1" = "upgrade" ]; then update-alternatives --remove x-window-manager /usr/bin/scrotwm fi #DEBHELPER# debian/scrotwm.NEWS0000644000000000000000000000054211726457163011377 0ustar spectrwm (1.0.0-1) unstable; urgency=low scrotwm has been renamed to spectrwm. The scrotwm package now contains only compatibility symlinks and can be safely removed once all local configuration, including custom scripts that rely on the old locations, has been migrated. -- Andrea Bolognani Wed, 07 Mar 2012 23:10:57 +0100 debian/compat0000644000000000000000000000000211726457163010400 0ustar 7 debian/watch0000644000000000000000000000012511726457163010231 0ustar version=3 http://opensource.conformal.com/snapshots/spectrwm/spectrwm-([\d\.]+)\.tgz debian/scrotwm.prerm0000644000000000000000000000031611726457163011747 0ustar #!/bin/sh set -e # Migrate user changes to the new configuration file dpkg-maintscript-helper \ mv_conffile \ /etc/scrotwm.conf \ /etc/spectrwm.conf \ 0.11.0-1 \ scrotwm \ -- \ "$@" #DEBHELPER# debian/scrotwm.postinst0000644000000000000000000000114511726457163012506 0ustar #!/bin/sh set -e # Migrate user changes to the new configuration file dpkg-maintscript-helper \ mv_conffile \ /etc/scrotwm.conf \ /etc/spectrwm.conf \ 0.11.0-1 \ scrotwm \ -- \ "$@" # Add some useful pointers to the legacy configuration file if [ "$1" = "configure" ]; then cat >/etc/scrotwm.conf <= 1.15.7.2~) to properly migrate existing custom configuration files. * 104-skip-compatibility-symlinks.diff: - don't let upstream's build system handle compatibility symlinks. * 005-use-consistent-naming.diff: - merged upstream; dropped. * Update Standards-Version to 3.9.3 (no changes needed). -- Andrea Bolognani Wed, 07 Mar 2012 23:10:57 +0100 scrotwm (0.11.0-1) unstable; urgency=low * New upstream release. * 005-use-consistent-naming.diff: - keep the spelling of the software name consistent. * Update Homepage: field accordingly. -- Andrea Bolognani Sat, 11 Feb 2012 17:40:50 +0100 scrotwm (0.10.0-1) unstable; urgency=low * New upstream release. * Update Debian copyright file. * Update Vcs-* control fields. * Various packaging improvements. -- Andrea Bolognani Sat, 28 Jan 2012 12:20:27 +0100 scrotwm (0.9.34-1) unstable; urgency=low * New upstream release. * 002-improve-man-page.diff: - improve English man page. Closes: #531844 (please allow one workspace to span multiple monitors). * 003-update-italian-man-page.diff: - bring Italian man page up-to-date. * Add README.Debian file. Closes: #552647 (suggest or recommend acpi and iostat). * Install Portuguese man page. * Drop .desktop file, it is now shipped upstream. * Update watch file to reflect new snapshot location. * Recommend suckless-tools, which replaces dwm-tools. * Add Depends: on libxtst-dev. * Use hardening build flags, as provided by dpkg-buildflags. * Update Debian copyright file to DEP5 candidate version. * Bump Standards-Version to 3.9.2 (no changes needed). -- Andrea Bolognani Fri, 11 Nov 2011 10:06:03 +0100 scrotwm (0.9.20-1) unstable; urgency=low * New upstream release: - Closes: #531790 (focus changes to the window in the background sometimes). - Closes: #531826 (doesn't play well with hidden windows). - Closes: #532569 (dialogs are always displayed on the first screen in a multi-head setup). * 002-check-before-preloading-libswmhack.diff: - libswmhack.so is installed now, so this patch is no longer needed. * 003-dont-use-hypen-as-minus-sign.diff: - merged upstream; dropped. * 102-remove-bash-and-openbsd-assumptions.diff: - call top correctly. * 103-try-versioned-dlopen.diff: - make libswmhack.so work even when libx11-dev and libxt-dev are not installed. Closes: #551732 (unable to run some applications because of LD_PRELOAD=/usr/.../libswmhack.so.0.0 in the environment). * Convert to 3.0 (quilt) source format. * Document patches according to DEP-3. -- Andrea Bolognani Tue, 01 Dec 2009 17:29:54 +0100 scrotwm (0.9.8-1) unstable; urgency=low * New upstream release. * Build and install libswmhack.so. * 003-dont-use-hypen-as-minus-sign.diff: fix a common man page issue. * Bump Standards-Version to 3.8.3 (no changes needed). -- Andrea Bolognani Mon, 14 Sep 2009 11:13:35 +0200 scrotwm (0.9.5-1) unstable; urgency=low * New upstream release. * Remove bashisms from baraction.sh example script. (Closes: #530990) -- Andrea Bolognani Sat, 30 May 2009 21:18:27 +0200 scrotwm (0.9.2-1) unstable; urgency=low * Initial release. (Closes: #514322) -- Andrea Bolognani Thu, 19 Mar 2009 08:11:05 +0100 debian/copyright0000644000000000000000000001513111726457163011136 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: spectrwm Upstream-Contact: Marco Peereboom Source: http://opensource.conformal.com/wiki/spectrwm Files: spectrwm.c Copyright: 2009-2012, Marco Peereboom 2009-2011, Ryan McBride 2009, Darrin Chandler 2009, Pierre-Yves Ritschard 2010, Tuukka Kataja 2011, Jason L. Wright 2011-2012, Reginald Kennedy 2011-2012, Lawrence Teo 2011-2012, Tiago Cunha 2006-2008, Anselm R Garbe 2006-2007, Sander van Dijk 2006-2007, Jukka Salmi 2007, Premysl Hruby 2007, Szabolcs Nagy 2007, Christof Musik 2007-2008, Enno Gottox Boland 2007-2008, Peter Hartlich 2008, Martin Hurton License: ISC and Expat Files: version.h Copyright: 2011 Conformal Systems LLC License: ISC Files: lib/swm_hack.c Copyright: 2009, Marco Peereboom 2009, Ryan McBride 2005-2007, Carsten Haitzler 2006-2007, Kim Woelders License: ISC and Expat Files: linux/linux.c Copyright: 1998, Todd C. Miller 1998, The NetBSD Foundation, Inc. 1997, Christos Zoulas 2004, Ted Unangst and Todd Miller License: Expat and BSD-3-clause and BSD-4-clause Files: debian/* Copyright: 2009-2012, Andrea Bolognani License: ISC License: ISC Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. . THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of The NetBSD Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: BSD-4-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Christos Zoulas. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/scrotwm.links0000644000000000000000000000014211726457163011737 0ustar usr/bin/spectrwm usr/bin/scrotwm usr/share/man/man1/spectrwm.1.gz usr/share/man/man1/scrotwm.1.gz debian/README.Debian0000644000000000000000000000153311726457163011245 0ustar spectrwm for Debian ------------------ This file explains what are the differences between spectrwm as released by the author and the Debian version. I try hard to keep the Debian version as close as possible to the upstream version, however a certain number of changes couldn't be avoided. * x-terminal-emulator is used instead of xterm as the default terminal emulator, making spectrwm play nice with Debian's alternatives system. Choosing another terminal emulator via spectrwm.conf is still possible; * the baraction.sh example script has been patched to weed out all non Policy compliant shell constructs; apm usage has been removed in favour of acpi as well. If you want to make use of this script, you need to install the sysstat, procps and acpi packages. -- Andrea Bolognani Tue, 09 Feb 2010 14:56:26 +0100 debian/patches/0000755000000000000000000000000011726457163010631 5ustar debian/patches/101-use-x-terminal-emulator-instead-of-xterm.diff0000644000000000000000000000421111726457163021644 0ustar Description: use x-terminal-emulator instead of xterm x-terminal-emulator is a sensible default terminal emulator on Debian, so use it instead of xterm in the default configuration. Forwarded: not-needed Author: Andrea Bolognani Last-Update: 2012-02-19 Index: spectrwm.git/spectrwm.c =================================================================== --- spectrwm.git.orig/spectrwm.c 2012-02-19 21:41:48.961021479 +0100 +++ spectrwm.git/spectrwm.c 2012-02-19 21:44:48.155492134 +0100 @@ -4635,7 +4635,7 @@ void setup_spawn(void) { - setconfspawn("term", "xterm", 0); + setconfspawn("term", "x-terminal-emulator", 0); setconfspawn("screenshot_all", "screenshot.sh full", 0); setconfspawn("screenshot_wind", "screenshot.sh window", 0); setconfspawn("lock", "xlock", 0); @@ -6870,7 +6870,7 @@ if ((bar_fonts = strdup(SWM_BAR_FONTS)) == NULL) err(1, "setup_globals: strdup: failed to allocate memory."); - if ((spawn_term[0] = strdup("xterm")) == NULL) + if ((spawn_term[0] = strdup("x-terminal-emulator")) == NULL) err(1, "setup_globals: strdup: failed to allocate memory."); if ((clock_format = strdup("%a %b %d %R %Z %Y")) == NULL) Index: spectrwm.git/spectrwm.conf =================================================================== --- spectrwm.git.orig/spectrwm.conf 2012-02-19 21:41:48.929021038 +0100 +++ spectrwm.git/spectrwm.conf 2012-02-19 21:45:10.699802963 +0100 @@ -30,13 +30,13 @@ # urgent_enabled = 1 # spawn app -# program[term] = xterm +# program[term] = x-terminal-emulator # program[screenshot_all] = screenshot.sh full # program[screenshot_wind] = screenshot.sh window # program[lock] = xlock # program[initscr] = initscreen.sh # program[menu] = dmenu_run -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_border -sf $bar_color -# spawn_term = xterm +# spawn_term = x-terminal-emulator # dialog box size ratio .3 >= r < 1 # dialog_ratio = 0.6 @@ -47,7 +47,7 @@ # region = screen[1]:1280x1024+1280+0 # Launch applications in a workspace of choice -# autorun = ws[1]:xterm +# autorun = ws[1]:x-terminal-emulator # autorun = ws[2]:xxxterm http://www.openbsd.org # workspace layout debian/patches/series0000644000000000000000000000041711726457163012050 0ustar 001-remove-bash-assumptions.diff 002-improve-man-page.diff 003-update-italian-man-page.diff 004-improve-makefile.diff 101-use-x-terminal-emulator-instead-of-xterm.diff 102-remove-openbsd-assumptions.diff 103-try-versioned-dlopen.diff 104-skip-compatibility-symlinks.diff debian/patches/002-improve-man-page.diff0000644000000000000000000000112211726457163015122 0ustar Description: Improve manual page Fixes and improvements to the English manual page. Forwarded: Marco Peereboom Author: Andrea Bolognani Last-Update: 2012-02-19 Index: spectrwm.git/spectrwm.1 =================================================================== --- spectrwm.git.orig/spectrwm.1 2012-02-19 19:46:30.493632750 +0100 +++ spectrwm.git/spectrwm.1 2012-02-19 19:49:50.676392792 +0100 @@ -354,7 +354,7 @@ 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 debian/patches/104-skip-compatibility-symlinks.diff0000644000000000000000000000213211726457163017447 0ustar Description: Don't install compatibility symlinks Forwarded: not-needed Author: Andrea Bolognani Last-Update: 2012-02-19 Index: spectrwm.git/linux/Makefile =================================================================== --- spectrwm.git.orig/linux/Makefile 2012-02-19 23:06:23.334984674 +0100 +++ spectrwm.git/linux/Makefile 2012-02-19 23:08:55.777086480 +0100 @@ -46,7 +46,6 @@ 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) install -m 644 ../spectrwm.1 $(DESTDIR)$(MANDIR)/man1/spectrwm.1 install -m 644 ../spectrwm_es.1 $(DESTDIR)$(MANDIR)/es/man1/spectrwm.1 @@ -57,7 +56,6 @@ uninstall: rm -f $(DESTDIR)$(BINDIR)/spectrwm - rm -f $(DESTDIR)$(BINDIR)/scrotwm rm -f $(DESTDIR)$(LIBDIR)/libswmhack.so.$(LIBVERSION) rm -f $(DESTDIR)$(MANDIR)/man1/spectrwm.1 rm -f $(DESTDIR)$(MANDIR)/es/man1/spectrwm.1 debian/patches/001-remove-bash-assumptions.diff0000644000000000000000000000363711726457163016565 0ustar Description: Remove Bash assumptions The example baraction.sh script shipped in scrotwm's release relies on some non-POSIX shell features. . This patch modifies the script so that it is possible to run it on a POSIX-compliant shell. The patched script still relies on a bunch of OpenBSD-specific features, which are taken care of in a different patch. Bug-Debian: http://bugs.debian.org/530990 Forwarded: Marco Peereboom Author: Andrea Bolognani Last-Update: 2010-07-21 Index: spectrwm.git/baraction.sh =================================================================== --- spectrwm.git.orig/baraction.sh 2012-02-19 19:34:10.263426784 +0100 +++ spectrwm.git/baraction.sh 2012-02-19 19:44:08.263671744 +0100 @@ -1,6 +1,10 @@ #!/bin/sh # +APM="/usr/sbin/apm -alb" +IOSTAT="/usr/sbin/iostat -c -C 3600" # wish infinity was an option +TOP="/usr/bin/top" + print_date() { # The date is printed to the status bar by default. # To print the date through this script, set clock_enabled to 0 @@ -11,7 +15,7 @@ } print_mem() { - MEM=`/usr/bin/top | grep Free: | cut -d " " -f6` + MEM=`${TOP} | grep Free: | cut -d " " -f6` echo -n "Free mem: $MEM " } @@ -83,19 +87,20 @@ while :; do # instead of sleeping, use iostat as the update timer. # cache the output of apm(8), no need to call that every second. - /usr/sbin/iostat -C -c 3600 |& # wish infinity was an option - PID="$!" - APM_DATA="" I=0 - trap "kill $PID; exit" TERM - while read -p; do - if [ $(( ${I} % 1 )) -eq 0 ]; then - APM_DATA=`/usr/sbin/apm -alb` + ${IOSTAT} 2>&1 | + while read IOSTAT_DATA; do + if [ ${I} -eq 0 ]; then + PID="$!" + trap "kill $PID; exit" TERM + fi + if [ $(( ${I} % 10 )) -eq 0 ]; then + APM_DATA=`${APM}` fi if [ $I -gt 2 ]; then # print_date - print_mem $MEM - print_cpu $REPLY + print_mem + print_cpu $IOSTAT_DATA print_cpuspeed print_apm $APM_DATA echo "" debian/patches/102-remove-openbsd-assumptions.diff0000644000000000000000000000711011726457163017272 0ustar Description: Remove OpenBSD assumptions The example baraction.sh script shipped in scrotwm's release relies on some features specific to the OpenBSD versions of the iostat and top commands. Moreover, it uses apm to get battery data. . This patch modifies the script so that it is possible to run it on a Debian system. It uses acpi instead of apm, which is a better choice for virtually any modern system. Bug-Debian: http://bugs.debian.org/530990 Author: Andrea Bolognani Last-Update: 2010-07-21 Index: scrotwm.git/baraction.sh =================================================================== --- scrotwm.git.orig/baraction.sh 2012-01-12 22:29:04.170284596 +0100 +++ scrotwm.git/baraction.sh 2012-01-12 22:32:49.296772037 +0100 @@ -1,9 +1,9 @@ #!/bin/sh # -APM="/usr/sbin/apm -alb" -IOSTAT="/usr/sbin/iostat -c -C 3600" # wish infinity was an option -TOP="/usr/bin/top" +ACPI="/usr/bin/acpi -b" +IOSTAT="/usr/bin/iostat -c 1 3600" +TOP="/usr/bin/top -b -n 1" print_date() { # The date is printed to the status bar by default. @@ -15,78 +15,48 @@ } print_mem() { - MEM=`${TOP} | grep Free: | cut -d " " -f6` + MEM=`${TOP} | grep '^Mem:' | sed 's/[^0-9,k]//g' | cut -d ',' -f 3` echo -n "Free mem: $MEM " } _print_cpu() { - typeset -R4 _1=${1} _2=${2} _3=${3} _4=${4} _5=${5} - echo -n "CPU:${_1}% User${_2}% Nice${_3}% Sys${_4}% Int${_5}% Idle " + echo -n "CPU: ${1}% User ${2}% Nice ${3}% Sys ${6}% Idle " } print_cpu() { OUT="" - # iostat prints each column justified to 3 chars, so if one counter - # is 100, it jams up agains the preceeding one. sort this out. + # Remove the decimal part from all the percentages while [ "${1}x" != "x" ]; do - if [ ${1} -gt 99 ]; then - OUT="$OUT ${1%100} 100" - else - OUT="$OUT ${1}" - fi + OUT="${OUT} `echo "${1}" | cut -d '.' -f 1`" shift; done _print_cpu $OUT } -print_apm() { - BAT_STATUS=$1 - BAT_LEVEL=$2 - AC_STATUS=$3 - - if [ $AC_STATUS -ne 255 -o $BAT_STATUS -lt 4 ]; then - if [ $AC_STATUS -eq 0 ]; then - echo -n "on battery (${BAT_LEVEL}%)" - else - case $AC_STATUS in - 1) - AC_STRING="on AC: " - ;; - 2) - AC_STRING="on backup AC: " - ;; - *) - AC_STRING="" - ;; - esac; - case $BAT_STATUS in - 4) - BAT_STRING="(no battery)" - ;; - [0-3]) - BAT_STRING="(battery ${BAT_LEVEL}%)" - ;; - *) - BAT_STRING="(battery unknown)" - ;; - esac; - - FULL="${AC_STRING}${BAT_STRING}" - if [ "$FULL" != "" ]; then - echo -n "$FULL" - fi - fi - fi -} - -print_cpuspeed() { - CPU_SPEED=`/sbin/sysctl hw.cpuspeed | cut -d "=" -f2` - echo -n "CPU speed: $CPU_SPEED MHz " +print_acpi() { + BAT_STATUS="${3}" + BAT_LEVEL="`echo "${4}" | tr -d ','`" + + case "${BAT_STATUS}" in + "Charging,") + FULL="on AC: (battery ${BAT_LEVEL})" + ;; + "Discharging,") + FULL="on battery (${BAT_LEVEL})" + ;; + "") + FULL="on AC (no battery)" + ;; + *) + FULL="(battery unknown)" + ;; + esac; + echo -n "${FULL}" } while :; do # instead of sleeping, use iostat as the update timer. - # cache the output of apm(8), no need to call that every second. + # cache the output of acpi(1), no need to call that every second. I=0 ${IOSTAT} 2>&1 | while read IOSTAT_DATA; do @@ -95,14 +65,13 @@ trap "kill $PID; exit" TERM fi if [ $(( ${I} % 10 )) -eq 0 ]; then - APM_DATA=`${APM}` + ACPI_DATA=`${ACPI}` fi - if [ $I -gt 2 ]; then + if [ $(( ${I} % 3 )) -eq 0 ] && [ ${I} -gt 2 ]; then # print_date print_mem print_cpu $IOSTAT_DATA - print_cpuspeed - print_apm $APM_DATA + print_acpi $ACPI_DATA echo "" fi I=$(( ${I} + 1 )); debian/patches/004-improve-makefile.diff0000644000000000000000000001157111726457163015225 0ustar Description: Improve GNU/Linux Makefile Make sure to use all the build flags that can be expected in the environment, overriding the maintainer build flags if necessary; split the build flags among the variables in the standard way; correctly declare all dependencies between source files; install localized man pages in the expected locations; get rid of the symlink hackery. Forwarded: Marco Peereboom Author: Andrea Bolognani Last-Update: 2012-02-19 Index: spectrwm.git/linux/Makefile =================================================================== --- spectrwm.git.orig/linux/Makefile 2012-02-19 22:41:22.682294347 +0100 +++ spectrwm.git/linux/Makefile 2012-02-19 22:44:36.968973087 +0100 @@ -1,53 +1,69 @@ -CFLAGS+= -Wall -ggdb -D_GNU_SOURCE -I. -CFLAGS+= -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\" -LDADD+= -lX11 -lXrandr -lXtst +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +LIBDIR ?= $(PREFIX)/lib +DATAROOTDIR ?= $(PREFIX)/share +MANDIR ?= $(DATAROOTDIR)/man +XSESSIONSDIR ?= $(DATAROOTDIR)/xsessions + +BUILDVERSION = $(shell sh $(CURDIR)/../buildver.sh) +LIBVERSION = $(shell . $(CURDIR)/../lib/shlib_version; echo $$major.$$minor) + +MAINT_CFLAGS = -Wall -ggdb +MAINT_CPPFLAGS = -I. -D_GNU_SOURCE -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LIBVERSION)\" +MAINT_LDLIBS = -lX11 -lXrandr -lXtst -PREFIX?= /usr/local -BINDIR?= $(PREFIX)/bin -LIBDIR?= $(PREFIX)/lib -MANDIR?= $(PREFIX)/share/man - -CC= gcc - -LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor) - -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) -shared -fpic $+ -o $@ $(MAINT_LDLIBS) $(LDLIBS) -libswmhack.so.$(LVERS): swm_hack.so - $(CC) -shared -fpic -o libswmhack.so.$(LVERS) swm_hack.so $(LDADD) +swm_hack.so: ../lib/swm_hack.c + $(CC) $(MAINT_CFLAGS) $(CFLAGS) $(MAINT_CPPFLAGS) $(CPPFLAGS) -c -fpic -DPIC $< -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 $(DESTDIR)$(BINDIR)/spectrwm $(DESTDIR)$(BINDIR)/scrotwm - -clean: - rm -f spectrwm *.o *.so libswmhack.so.* spectrwm.c swm_hack.c version.h + 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) + 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) + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/spectrwm + rm -f $(DESTDIR)$(BINDIR)/scrotwm + rm -f $(DESTDIR)$(LIBDIR)/libswmhack.so.$(LIBVERSION) + 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 debian/patches/103-try-versioned-dlopen.diff0000644000000000000000000000712711726457163016064 0ustar Description: Try versioned dlopen() libswmhack.so tries to dlopen() libX11.so and libXt.so, but these symlinks are available only if the corresponding -dev package is installed. . If dlopen() fails, try with libX11.so.6 and libXt.so.6. If even that fails, print an explanatory error message and abort the process. Bug-Debian: http://bugs.debian.org/551732 Author: Andrea Bolognani Last-Update: 2009-11-02 Index: spectrwm.git/lib/swm_hack.c =================================================================== --- spectrwm.git.orig/lib/swm_hack.c 2012-02-19 19:34:10.263426784 +0100 +++ spectrwm.git/lib/swm_hack.c 2012-02-19 21:45:49.232334232 +0100 @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -129,12 +130,29 @@ static CWF *func = NULL; char *env; Window id; + char *error; /* find the real Xlib and the real X function */ if (!lib_xlib) lib_xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY); + if (!lib_xlib) + lib_xlib = dlopen("libX11.so.6", RTLD_GLOBAL | RTLD_LAZY); + + if (!lib_xlib) + if ((error = dlerror()) != NULL) { + fprintf(stderr, "%s\n", error); + assert(lib_xlib); + } + if (!func) { func = (CWF *) dlsym(lib_xlib, "XCreateWindow"); + + if (!func) + if ((error = dlerror()) != NULL) { + fprintf(stderr, "%s\n", error); + assert(func); + } + dpy = display; } @@ -174,13 +192,29 @@ static CSWF *func = NULL; char *env; Window id; + char *error; /* find the real Xlib and the real X function */ if (!lib_xlib) lib_xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY); + if (!lib_xlib) + lib_xlib = dlopen("libX11.so.6", RTLD_GLOBAL | RTLD_LAZY); + + if (!lib_xlib) + if ((error = dlerror()) != NULL) { + fprintf(stderr, "%s\n", error); + assert(lib_xlib); + } + if (!func) func = (CSWF *) dlsym(lib_xlib, "XCreateSimpleWindow"); + if (!func) + if ((error = dlerror()) != NULL) { + fprintf(stderr, "%s\n", error); + assert(func); + } + if (parent == DefaultRootWindow(display)) parent = MyRoot(display); @@ -208,13 +242,29 @@ XReparentWindow(Display * display, Window window, Window parent, int x, int y) { static RWF *func = NULL; + char *error; /* find the real Xlib and the real X function */ if (!lib_xlib) lib_xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY); + if (!lib_xlib) + lib_xlib = dlopen("libX11.so.6", RTLD_GLOBAL | RTLD_LAZY); + + if (!lib_xlib) + if ((error = dlerror()) != NULL) { + fprintf(stderr, "%s\n", error); + assert(lib_xlib); + } + if (!func) func = (RWF *) dlsym(lib_xlib, "XReparentWindow"); + if (!func) + if ((error = dlerror()) != NULL) { + fprintf(stderr, "%s\n", error); + assert(func); + } + if (parent == DefaultRootWindow(display)) parent = MyRoot(display); @@ -235,12 +285,30 @@ { static ANEF *func = NULL; static int kp_add = 0, kp_subtract = 0; + char *error; /* find the real Xlib and the real X function */ if (!lib_xtlib) + lib_xtlib = dlopen("libXt.so.6", RTLD_GLOBAL | RTLD_LAZY); + if (!lib_xtlib) lib_xtlib = dlopen("libXt.so", RTLD_GLOBAL | RTLD_LAZY); + + if (!lib_xtlib) + if ((error = dlerror()) != NULL) { + fprintf(stderr, "%s\n", error); + assert(lib_xtlib); + } + if (!func) { func = (ANEF *) dlsym(lib_xtlib, "XtAppNextEvent"); + + if (!func) { + if ((error = dlerror()) != NULL) { + fprintf(stderr, "%s\n", error); + assert(func); + } + } + if (dpy != NULL) { kp_add = XKeysymToKeycode(dpy, XK_KP_Add); kp_subtract = XKeysymToKeycode(dpy, XK_KP_Subtract); debian/patches/003-update-italian-man-page.diff0000644000000000000000000006054711726457163016363 0ustar Description: Update Italian manual page Bring Italian manual page up-to-date. Forwarded: Marco Peereboom Author: Andrea Bolognani Last-Update: 2012-02-19 Index: spectrwm.git/spectrwm_it.1 =================================================================== --- spectrwm.git.orig/spectrwm_it.1 2012-02-19 20:22:40.015545145 +0100 +++ spectrwm.git/spectrwm_it.1 2012-02-19 20:29:54.689538238 +0100 @@ -23,10 +23,10 @@ .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? +è 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 +un linguaggio di programmazione per configurarlo. È stato scritto dagli hacker per gli hacker e cerca di essere piccolo, compatto e veloce. .Pp Quando @@ -35,7 +35,7 @@ .Pa spectrwm.conf . Vedere la sezione .Sx FILE DI CONFIGURAZIONE -pi? sotto. +più sotto. .Pp In questa pagina di manuale viene usata la seguente notazione: .Pp @@ -53,21 +53,21 @@ .El .Pp .Nm -? molto semplice da usare. La maggior parte delle operazioni vengono +è molto semplice da usare. La maggior parte delle operazioni vengono svolte usando combinazioni di tasti sulla tastiera o sul mouse. Vedere la sezione .Sx SCORCIATOIE -pi? sotto per i default e le possibilit? di personalizzazione. +più sotto per i default e le possibilità di personalizzazione. .Sh FILE DI CONFIGURAZIONE .Nm prova per prima cosa ad aprire il file di configurazione personale dell'utente, .Pa ~/.spectrwm.conf . -Se il file in questione non ? disponibile, prova ad usare il file di +Se il file in questione non è disponibile, prova ad usare il file di configurazione globale .Pa /etc/spectrwm.conf . .Pp -Il formato di questo file ? \*(Ltchiave\*(Gt = \*(Ltvalore\*(Gt. +Il formato di questo file è \*(Ltchiave\*(Gt = \*(Ltvalore\*(Gt. Per esempio: .Pp .Dl color_focus = red @@ -77,64 +77,97 @@ .Pp Il file supporta le seguenti chiavi: .Pp -.Bl -tag -width "title_class_enabledXXX" -offset indent -compact -.It Cm autorun +.Bl -tag -width 2m +.It Ic autorun Esegue un'applicazione nel workspace specificato all'avvio. Definito nel formato ws[]: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 +.It Ic bar_action +Script esterno che aggiunge informazioni come la carica della batteria alla +barra di stato. +.It Ic bar_at_bottom +Posiziona la barra di stato sul fondo dello schermo anziché in cima. +.It Ic bar_border Ns Bq Ar x Colore del bordo della barra di stato nello schermo .Ar x . -.It Cm bar_border_width +.It Ic 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 +può essere disabilitato usando il valore 0. +.It Ic bar_color Ns Bq Ar x Colore 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 -.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_delay +.It Ic bar_delay Frequenza di aggiornamento, in secondi, dello script esterno che aggiunge informazioni 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 +.It Ic bar_enabled +Abilita o disabilita la barra di stato. +.It Ic bar_font +Font della barra di stato. +.It Ic bar_font_color Ns Bq Ar x +Colore del testo della barra di stato nello schermo +.Ar x . +.It Ic bar_justify +Giustifica il testo nella barra di stato. I valori possibili sono +.Pa left +(sinistra), +.Pa center +(centro), +e +.Pa right +(destra). +.It Ic bind Ns Bq Ar x +Assegna una combinazione di tasti all'azione +.Ar x . +Vedere la sezione +.Sx SCORCIATOIE +più sotto. +.It Ic border_width +Spessore del bordo delle finestre in pixel. Il valore 0 disabilita il bordo. +.It Ic clock_enabled Abilita o disabilita l'orologio nella barra di stato. Se disabilitato, -usando il valore 0, ? possibile usare un orologio personalizzato nello +usando il valore 0, è possibile usare un orologio personalizzato nello script specificato in .Pa bar_action . -.It Cm dialog_ratio +.It Ic color_focus +Colore del bordo della finestra che ha il focus. +.It Ic color_unfocus +Colore del bordo delle finestre che non hanno il focus. +.It Ic dialog_ratio Alcune applicazioni hanno finestre di dialogo troppo piccole per risultare -utili. Questa ? la percentuale dello schermo che verr? usata per le finestre +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 +.It Ic disable_border +Rimuovi il bordo dalle finestre se la barra di stato è nascosta e c'è +una sola finestra sullo schermo. +.It Ic focus_mode +Se viene usato il valore +.Pa follow_cursor +(segui il cursore), +il gestore di finestre darà il focus alla finestra sotto il puntatore +quando si cambia area di lavoro o si creano finestre. +.It Ic keyboard_mapping +Ignora tutte le scorciatoie esistenti e carica delle nuove scorciatoie dal +file specificato. +Vedere la sezione +.Sx FILE DI MAPPATURA DELLA TASTIERA +per una lista di file di mappatura che vengono forniti per diversi layout +di tastiera. +.It Ic layout Layout da utilizzare all'avvio. Definito nel formato ws[]: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 +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 vertical +(verticale), .Pa horizontal +(orizzontale) e -.Pa fullscreen . +.Pa fullscreen +(a schermo intero). .Pp Fare riferimento a .Pa master_grow , @@ -146,90 +179,77 @@ e .Pa always_raise per ulteriori informazioni. -Queste impostazioni sono complesse e hanno effetti secondari; ? opportuno +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 +.It Ic modkey +Cambia il tasto modificatore. +Solitamente Mod1 è il tasto ALT e Mod4 è il tasto Windows su un PC. +.It Ic program Ns Bq Ar p +Definisce una nuova azione per lanciare il programma +.Ar p . +Vedere la sezione +.Sx PROGRAMMI +più sotto. +.It Cm quirk Ns Bq Ar c:n +Aggiunge un "quirk" per le finestre di classe +.Ar c +e nome +.Ar n . +Vedere la sezione +.Sx QUIRK +più sotto. +.It Ic region Alloca una regione personalizzata, rimuovendo qualsiasi regione automaticamente rilevata stia occupando lo stesso spazio sullo schermo. Definita nel formato screen[]: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, +Per fare sì che più monitor vengano considerati come una singola entità +è sufficiente creare una regione abbastanza 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 +.It Ic stack_enabled +Abilita o disabilita la visualizzazione dell'algoritmo di stacking +corrente nella barra di stato. +.It Ic term_width Imposta la dimensione minima preferita per il terminale. Se questo valore -? maggiore di 0, +è maggiore di 0, .Nm -cercher? di riaggiustare la dimensione del testo nel terminale in modo che +cercherà di adattare 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 +è supportato. L'eseguibile 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 +deve essere setuid o setgid perché questo funzioni: nella maggior parte dei +sistemi, questo avviene di default. L'utente potrebbe voler impostare program[term] (vedere la sezione .Sx PROGRAMMI -pi? sotto) per usare una seconda copia del binario di +più sotto) per usare una seconda copia dell'eseguibile di .Xr xterm 1 che non abbia il bit setgid impostato. -.It Cm title_class_enabled +.It Ic 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 +.It Ic 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 +.It Ic 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 +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 +.It Ic 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 . -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 -Aggiunge un "quirk" per le finestre di classe -.Ar c -e nome -.Ar n . -Vedere la sezione -.Sx QUIRKS -pi? sotto. +.It Ic window_name_enabled +Abilita o disabilita la visualizzazione del nome della finestra nella +barra di stato. Impostare a 1 per abilitare. .El .Pp I colori devono essere specificati nel formato usato da @@ -243,19 +263,19 @@ .Xr xlsfonts 1 . L'applicazione .Xr xfontsel 1 -? utile per visualizzare la X Logical Font Description ("XLFD") usata per +è utile per visualizzare la X Logical Font Description ("XLFD") usata per la chiave .Pa bar_font . .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. +stesso modo in cui è possibile farlo con le azioni predefinite. Vedere la sezione .Sx SCORCIATOIE -pi? sotto. +più sotto. .Pp -I programmi di default sono descritte qui sotto: +I programmi di default sono descritti qui sotto: .Pp .Bl -tag -width "screenshot_wind" -offset indent -compact .It Cm term @@ -277,12 +297,12 @@ .Dl program[] = [ [... ]] .Pp .Aq nome -? un qualsiasi identificatore che non va in conflitto con un'azione +è un qualsiasi identificatore che non va in conflitto con un'azione predefinita o una chiave, .Aq percorso -? il programma desiderato, e +è il programma desiderato, e .Aq arg -sono zero o pi? argomenti da passare al programma. +sono zero o più argomenti da passare al programma. .Pp Le seguenti variabili rappresentano valori impostabili in .Nm @@ -304,15 +324,14 @@ 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 # adesso Mod+Shift+b lancia firefox .Ed .Pp Per eliminare la combinazione precedente: .Bd -literal -offset indent -bind[] = Mod+f +bind[] = Mod+Shift+b program[ff] = .Ed -.Pp .Sh SCORCIATOIE .Nm fornisce molte funzioni (o azioni) accessibili tramite combinazioni di @@ -322,7 +341,7 @@ .Pp .Bl -tag -width "M-j, M-XXX" -offset indent -compact .It Cm M1 -D? focus alla finestra +Dà focus alla finestra .It Cm M-M1 Muove la finestra .It Cm M-M3 @@ -344,8 +363,10 @@ 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 @@ -357,7 +378,7 @@ .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 @@ -390,6 +411,10 @@ 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_prior .It Cm M-S- Ns Aq Cm Right @@ -416,6 +441,28 @@ 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-s +search_win .El .Pp I nomi delle azioni e le relative descrizioni sono le seguenti: @@ -425,12 +472,12 @@ Lancia un nuovo terminale (vedi .Sx PROGRAMMI -pi? in alto). +più in alto). .It Cm menu Menu (vedi .Sx PROGRAMMI -pi? in alto). +più in alto). .It Cm quit Chiude .Nm . @@ -439,7 +486,9 @@ .Nm . .It Cm cycle_layout Cambia layout. -.It Cm reset_layout +.It Cm flip_layout +Inverti l'area principale e l'area di stacking. +.It Cm stack_reset Re-inizializza il layout. .It Cm master_shrink Restringe l'area principale. @@ -450,17 +499,17 @@ .It Cm master_del Rimuove finestre 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. +Aumenta il numero di righe/colonne all'area di stacking. +.It Cm stack_dec +Riduce il numero di righe/colonne dall'area di stacking. .It Cm swap_main Muove la finestra corrente nell'area principale. .It Cm focus_next -D? il focus alla finestra successiva. +Dà il focus alla finestra successiva. .It Cm focus_prev -D? il focus alla finestra precedente. +Dà il focus alla finestra precedente. .It Cm focus_main -D? il focus alla finestra principale. +Dà il focus alla finestra principale. .It Cm swap_next Scambia con la finestra successiva dell'area di lavoro. .It Cm swap_prev @@ -476,17 +525,21 @@ .Ar n , dove .Ar n -? compreso tra 1 e 10. +è compreso tra 1 e 10. .It Cm mvws_ Ns Ar n Sposta la finestra corrente nell'area di lavoro .Ar n , dove .Ar n -? compreso tra 1 e 10. +è compreso tra 1 e 10. .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_prior Passa all'ultima area di lavoro visitata. .It Cm screen_next @@ -496,12 +549,12 @@ .It Cm screenshot_all Cattura uno screenshot dell'intero schermo, se abilitato (vedere la sezione .Sx PROGRAMMI -pi? in alto). +più in alto). .It Cm screenshot_wind Cattura uno screenshot di una singola finestra, se abilitato (vedere la sezione .Sx PROGRAMMI -pi? in alto). +più in alto). .It Cm version Abilita/disabilita il numero di versione nella barra di stato. .It Cm float_toggle @@ -509,20 +562,42 @@ .It Cm lock Blocca lo schermo (vedere la sezione .Sx PROGRAMMI -pi? in alto). +più in alto). .It Cm initscr Re-inizializza gli schermi fisici (vedere la sezione .Sx PROGRAMMI -pi? in alto). +più in alto). .It Cm iconify Minimizza (unmap) la finesta che ha il focus. .It Cm uniconify Massimizza (map) la finestra selezionata tramite dmenu. .It Cm always_raise -Quando ? abilitato, le finestre floating possono essere oscurate da +Quando è abilitato, le finestre floating possono essere oscurate da finestre tiled. .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 di un passo verso sinistra. +.It Cm move_right +Sposta una finestra floating di un passo verso destra. +.It Cm move_up +Sposta una finestra floating di un passo verso l'alto. +.It Cm move_down +Sposta una finestra floating di un passo verso il basso. +.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. .El .Pp Le scorciatoie personalizzate sono specificate nel file di configurazione @@ -531,9 +606,9 @@ .Dl bind[] = .Pp .Aq azione -? una delle azioni elencate sopra (oppure nulla) e +è una delle azioni elencate sopra (oppure nulla) e .Aq tasti -? dato da zero o pi? modificatori (MOD, Mod1, Shift, ecc.) e uno o pi? +è dato da zero o più modificatori (MOD, Mod1, Shift, ecc.) e uno o più tasti normali (b, space, ecc.), separati da "+". Per esempio: .Bd -literal -offset indent @@ -541,10 +616,31 @@ bind[] = Mod1+q # rimuovi l'assegnazione di Alt + q .Ed .Pp -Pi? combinazioni di tasti possono essere assegnate alla stessa azione. +Più combinazioni di tasti possono essere assegnate alla stessa azione. +.Sh FILE DI MAPPATURA DELLA TASTIERA +I file di mappatura per svariati layout di tastiera sono elencati qui sotto. +Questi file possono essere utilizzati tramite la chiave di configurazione +.Pa keyboard_mapping +per caricare scorciatoie create appositamente per un determinato layout +di tastiera. +.Pp +.Bl -tag -width "scrotwm_XX.confXXX" -offset indent -compact +.It Cm scrotwm_cz.conf +Layout di tastiera per la Repubblica Ceca +.It Cm scrotwm_es.conf +Layout di tastiera per la Spagna +.It Cm scrotwm_fr.conf +Layout di tastiera per la Francia +.It Cm scrotwm_fr_ch.conf +Layout di tastiera per la Svizzera Francese +.It Cm scrotwm_se.conf +Layout di tastiera per la Svezia +.It Cm scrotwm_us.conf +Layout di tastiera per gli Stati Uniti +.El .Sh QUIRK .Nm -fornisce la possibilit? di specificare dei "quirk" per la gestione di +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. @@ -597,8 +693,8 @@ Rimuove i bordi, consentendo alla finestra di usare l'intera dimensione dello schermo. .It FOCUSPREV -Quando la finestra viene chiusa, d? il focus alla finestra che aveva il -focus precedente anzich? all'applicazione precedente nello stack. +Quando la finestra viene chiusa, dà il focus alla finestra che aveva il +focus precedente anziché all'applicazione precedente nello stack. .El .Pp I quirk personalizzati vanno specificati nel file di configurazione come @@ -611,35 +707,38 @@ .Aq nome specificano a quali finestre i quirk vanno applicati, e .Aq quirk -? uno dei quirk presente nella lista sopra. +è 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 .Ed .Pp -? possibile ottenere +È possibile ottenere .Aq classe e .Aq nome -usando xprop(1) e facendo click sulla finestra desiderata. -Nel seguente esempio ? stato fatto click sulla finestra principale di +usando +.Xr xprop 1 +e facendo click sulla finestra desiderata. +Nel seguente esempio è stato fatto click sulla finestra principale di Firefox: .Bd -literal -offset indent $ xprop | grep WM_CLASS WM_CLASS(STRING) = "Navigator", "Firefox" .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 +Bisogna tenere conto del fatto che usare +.Xr grep 1 +per trovare WM_CLASS inverte la classe e il nome. Nell'esempio precedente, +la dichiarazione del quirk sarebbe .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: +proprietà _NET_WM_WINDOW_TYPE in base al seguente schema: .Pp .Bl -tag -width "_NET_WM_WINDOW_TYPE_TOOLBARXXX" -offset indent -compact .It _NET_WM_WINDOW_TYPE_DOCK @@ -654,25 +753,25 @@ FLOAT .El .Pp -In tutti gli altri casi, nessun quirk ? automaticamente assegnato alla +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. .Sh EWMH .Nm implementa in maniera parziale la specifica Extended Window Manager Hints -(EWMH). Ci? permette di controllare sia le finestre che +(EWMH). Ciò permette di controllare sia le finestre che .Nm stesso tramite script e programmi esterni. Per renderlo possibile, .Nm risponde ad alcuni eventi di tipo ClientMessage; questo tipo di messaggio -pu? essere inviato da un terminale usando programmi come +può essere inviato da un terminale usando programmi come .Xr wmctrl 1 e .Xr xdotool 1 . Per il formato esatto di questi messaggi, si veda la 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 +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 @@ -682,7 +781,7 @@ $ xprop \-id $WINDOWID WM_NAME | grep \-o "\\".*\\"" .Ed .Pp -Per dare il focus ad una finestra, ? sufficiente inviare il messaggio +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): @@ -690,7 +789,7 @@ $ wmctrl \-i \-c 0x4a0000b .Ed .Pp -Per chiudere una finestra si pu? inviare il messaggio _NET_CLOSE_WINDOW +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): @@ -698,8 +797,8 @@ $ 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, +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): @@ -719,7 +818,7 @@ .Pp I messaggi _NET_MOVERESIZE_WINDOW vengono ignorati per le finestre stacked. .Sh SEGNALI -? possibile riavviare +È possibile riavviare .Nm inviandogli il segnale HUP. .Sh FILE @@ -739,7 +838,7 @@ .An -nosplit .Pp .Nm -? stato scritto da: +è stato scritto da: .Pp .Bl -tag -width "Ryan Thomas McBride Aq mcbride@countersiege.com " -offset indent -compact .It Cm Marco Peereboom Aq marco@peereboom.us @@ -748,8 +847,7 @@ .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 .El -.Sh BUGS -Al momento il menu, invocato usando -.Cm M-p , -dipende da dmenu. debian/control0000644000000000000000000000323011726457163010603 0ustar Source: spectrwm Section: x11 Priority: optional Maintainer: Andrea Bolognani Build-Depends: debhelper (>= 7), dpkg-dev (>= 1.16.1~), libx11-dev, libxt-dev, libxrandr-dev, libxtst-dev Standards-Version: 3.9.3 Homepage: http://opensource.conformal.com/wiki/spectrwm Vcs-Git: git://anonscm.debian.org/collab-maint/spectrwm.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/spectrwm.git;a=summary Package: spectrwm Architecture: any Provides: x-window-manager Replaces: scrotwm (<< 1.0.0-1~) Breaks: scrotwm (<< 1.0.0-1~) Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: suckless-tools, xterm | x-terminal-emulator, xfonts-terminus Description: dynamic tiling window manager spectrwm is a minimalistic window manager that tries to stay out of the way so that valuable screen real estate can be used for much more important stuff. . It has sane defaults and does not require one to learn a language to do any configuration. . It was written by hackers for hackers and it strives to be small, compact and fast. Package: scrotwm Architecture: all Section: oldlibs Priority: extra Pre-Depends: dpkg (>= 1.15.7.2~) Depends: spectrwm, ${misc:Depends} Description: dynamic tiling window manager (transitional package) spectrwm is a minimalistic window manager that tries to stay out of the way so that valuable screen real estate can be used for much more important stuff. . scrotwm is the old name for spectrwm. This transitional package is provided to ease upgrades; it also contains compatibility symlinks to ensure upgrading doesn't break a working setup. It can be safely deleted if backward compatibility with scrotwm is not needed. debian/spectrwm.install0000644000000000000000000000002211726457163012430 0ustar spectrwm.conf etc