diff --git a/bin/cpu-count b/bin/cpu-count index fa923ef4..c45e0ef9 100755 --- a/bin/cpu-count +++ b/bin/cpu-count @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e count=`grep -c "^processor.*:" /proc/cpuinfo` if [ "$count" = "1" ]; then diff --git a/bin/cpu-freq b/bin/cpu-freq index 8ab97745..0350d1c9 100755 --- a/bin/cpu-freq +++ b/bin/cpu-freq @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e mhz=`grep -m 1 "^cpu MHz" /proc/cpuinfo | sed "s/^.*: //" | sed "s/\..*$//"` if [ $mhz -gt 1000 -a -x /usr/bin/bc ]; then diff --git a/bin/load-average b/bin/load-average index 0ed04d55..f698095e 100755 --- a/bin/load-average +++ b/bin/load-average @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/sh -e cat /proc/loadavg | cut -d " " -f -1 diff --git a/bin/mem-available b/bin/mem-available index b33a8b2c..0cd008c5 100755 --- a/bin/mem-available +++ b/bin/mem-available @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e mem=`grep -m 1 "^MemTotal:" /proc/meminfo | sed 's/ kB$//' | sed 's/^.* //'` if [ $mem -gt 1000000 -a -x /usr/bin/bc ]; then diff --git a/bin/reboot-required b/bin/reboot-required index 5b9b508f..e13a93d9 100755 --- a/bin/reboot-required +++ b/bin/reboot-required @@ -1,9 +1,4 @@ -#!/bin/sh - -if [ ! -x /usr/share/update-notifier/notify-reboot-required ]; then - echo "?" - exit 1 -fi +#!/bin/sh -e if [ -e /var/run/reboot-required ]; then echo "(@)" diff --git a/bin/release b/bin/release index 73c2eb94..a7be71b8 100755 --- a/bin/release +++ b/bin/release @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/sh -e /usr/bin/lsb_release -d -s | sed 's/\s*(.*)$//' diff --git a/bin/updates-available b/bin/updates-available index 1b67fff2..8b455450 100755 --- a/bin/updates-available +++ b/bin/updates-available @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e # expire the cache in X seconds; 1 hour by default EXPIRATION=3600 @@ -14,7 +14,7 @@ print_updates() { } cache=/var/run/updates-available -mycache=/var/tmp/updates-available-$USER +mycache=$HOME/.screenrc-updates-available u= # If global updates-available cache is present, use it. # Only available in Jaunty+. diff --git a/debian/changelog b/debian/changelog index 0c87ecc9..cb6f5afb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,13 +6,28 @@ screen-profiles (1.9) UNRELEASED; urgency=low [ Dustin Kirkland ] * keybindings/common: fix leading whitespace on new window creation LP: #317558 + * keybindings/common, doc/help.txt: change the default escape sequence + back to ctrl-a * profiles/common, bin/updates-available: the updates-available script now caches its value, expiring that value every 60 minutes; so subsequent checks are much cheaper; we can allow the screen status script to run more frequently now, since most will be cache checks; we'll really benefit from this in Jaunty + * debian/control: remove buildeps on gettext, po4a, which are only called + in the prebuild; depend on ${misc:Depends} with debhelper >= 5 + * debian/rules: use dh_testdir in get-orig-source, dh_clean to clean up + build; run as 'debian/rules get-orig-source'; removing dh_installdirs as + its not needed; add dh_md5sums + * debian/dirs: not needed, removing + * debian/copyright: updated to use canonical.com address, attribute + Canonical copyright, and mention Nick as co-author + * select-screen-profile.1: fixed typo + * bin/*, *: use -e for shell scripts + * bin/updates-available: cache updates available count in the user's + homedir, rather than world-writable /var/tmp (race conditions exist) + * screen-launcher.1, screen-profiles-helper.1: new manpages - -- Dustin Kirkland Thu, 15 Jan 2009 14:53:16 -0600 + -- Dustin Kirkland Fri, 16 Jan 2009 16:29:47 -0600 screen-profiles (1.8-0ubuntu1) jaunty; urgency=low diff --git a/debian/control b/debian/control index 8e73cd01..f9435d2f 100644 --- a/debian/control +++ b/debian/control @@ -3,13 +3,13 @@ Section: misc Priority: optional Maintainer: Dustin Kirkland Standards-Version: 3.8.0 -Build-Depends: debhelper (>= 6.0), gettext, po4a +Build-Depends: debhelper (>= 5) Homepage: http://launchpad.net/screen-profiles Vcs-Bzr: http://bazaar.launchpad.net/~kirkland/screen-profiles/main Package: screen-profiles Architecture: all -Depends: debconf (>= 0.5) | debconf-2.0, screen, gettext-base, python, python-newt +Depends: ${misc:Depends}, debconf (>= 0.5) | debconf-2.0, screen, gettext-base, python, python-newt Recommends: update-notifier-common Suggests: bc Description: a set of useful profiles and a profile-switcher for GNU screen diff --git a/debian/copyright b/debian/copyright index c925ec16..574376d2 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,12 +1,15 @@ -This package was debianized by Dustin Kirkland +This package was debianized by Dustin Kirkland Sun, 14 Dec 2008 13:11:37 -0600 It was downloaded from: http://launchpad.net/screen-profiles -Upstream Authors: Dustin Kirkland +Upstream Authors: + Dustin Kirkland + Nick Barcet Copyright: - Copyright (C) 2002-2008 Dustin Kirkland + Copyright (C) 2008-2009 Canonical Ltd. + All rights reserved. License: @@ -31,5 +34,5 @@ License: the icons are available at . The Ubuntu packaging: - Copyright (C) 2008 by Dustin Kirkland + Copyright (C) 2008-2009 Canonical Ltd. released under the GPL-3. diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index 57da96b0..00000000 --- a/debian/dirs +++ /dev/null @@ -1,5 +0,0 @@ -usr/bin -usr/share/screen-profiles -usr/share/screen-profiles/bin -usr/share/screen-profiles/keybindings -usr/share/screen-profiles/profiles diff --git a/debian/rules b/debian/rules index d9fdf997..063226bf 100755 --- a/debian/rules +++ b/debian/rules @@ -5,11 +5,12 @@ # export DH_VERBOSE=1 PACKAGE=screen-profiles -VER=`head -n 1 ./changelog | sed 's/^.*(//' | sed 's/).*//' | sed 's/-.*//'` +VER=`head -n 1 debian/changelog | sed 's/^.*(//' | sed 's/).*//' | sed 's/-.*//'` get-orig-source: - [ -d ../../${PACKAGE} ] && mv ../../${PACKAGE} ../../${PACKAGE}-${VER} || true - tar -C ../../ --exclude .bzr --exclude debian -zcvf ../../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER} + dh_testdir + -[ -d ../${PACKAGE} ] && mv ../${PACKAGE} ../${PACKAGE}-${VER} + tar -C ../ --exclude .bzr --exclude debian -zcvf ../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER} prebuild: cd po4a && po4a --no-backups po4a.conf @@ -17,13 +18,12 @@ prebuild: build: clean: - rm -rf debian/${PACKAGE} debian/files debian/${PACKAGE}.debhelper.log + dh_clean debian/${PACKAGE} debian/files debian/${PACKAGE}.debhelper.log install:build dh_testdir dh_testroot dh_clean -k - dh_installdirs -X.bzr dh_install -X.bzr # Everything else is handled by dh_install @@ -33,7 +33,7 @@ binary-indep: build install dh_testdir dh_testroot dh_installdocs -X.bzr - dh_installman select-screen-profile.1 + dh_installman screen-launcher.1 screen-profiles-helper.1 select-screen-profile.1 dh_installchangelogs README dh_installdebconf dh_compress @@ -41,9 +41,10 @@ binary-indep: build install dh_link /etc/screenrc usr/share/${PACKAGE}/profiles/plain dh_installdeb dh_gencontrol + dh_md5sums dh_builddeb binary: binary-indep -.PHONY: build clean binary-indep binary install prebuild +.PHONY: build clean binary-indep binary install prebuild get-orig-source binary-arch: diff --git a/doc/help.txt b/doc/help.txt index 6c140fec..ef0b1cbb 100644 --- a/doc/help.txt +++ b/doc/help.txt @@ -12,5 +12,3 @@ F5 Close this window | F9 Basic help (this) Commands: 'screen -r' - reattach | 'man screen' - complete help - -Note that the escape key has been changed from to . diff --git a/keybindings/common b/keybindings/common index 8cec192d..988b8e50 100644 --- a/keybindings/common +++ b/keybindings/common @@ -28,25 +28,23 @@ # # bindkey commands should be followed by a comment that will be used in the # help file (one day). The command should be formated as: -# | explanation +# # | explanation -# Changed the default escape from ctrl-a to ctrl-g, so as not to conflict -# with emacs' ctrl-a -escape ^Gg - # F1 -> 'help' in gnome-terminal -register n "^g^c^gA" # Goes with the F2 definition -bindkey -k k2 process n # F2 | Create new window (and name it) -bindkey -k k3 prev # F3 | Previous Window -bindkey -k k4 next # F4 | Next Window -bindkey -k k5 kill # F5 | Close window -bindkey -k k6 detach # F6 | Detach from this session -bindkey -k k7 copy # F7 | Enter copy/scrollback mode -bindkey -k k8 help # F8 | Advanced help/keybindings +# F-keys seem to work well in both gnome-terminal and tty consoles + # F1 | 'help' in gnome-terminal +register n "^a^c^aA" # Goes with the F2 definition +bindkey -k k2 process n # F2 | Create new window (and name it) +bindkey -k k3 prev # F3 | Previous Window +bindkey -k k4 next # F4 | Next Window +bindkey -k k5 kill # F5 | Close window +bindkey -k k6 detach # F6 | Detach from this session +bindkey -k k7 copy # F7 | Enter copy/scrollback mode +bindkey -k k8 help # F8 | Advanced help/keybindings bindkey -k k9 screen -t help 0 screen-profiles-helper # F9 | Welcome screen - # F10 -> 'toolbar' in gnome-terminal - # F11 -> 'fullscreen' in gnome-terminal - # F12 + # F10 | 'toolbar' in gnome-terminal + # F11 | 'fullscreen' in gnome-terminal + # F12 | # power detach -register x "^g^d D" +register x "^a^d D" bindkey ^[[3;6~ process x # C-shift-del | Detach and logout diff --git a/screen-launcher b/screen-launcher index e9b2691b..8dcfc655 100755 --- a/screen-launcher +++ b/screen-launcher @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # # GNU screen-profiles-helper # Copyright (C) 2008 Canonical Ltd. diff --git a/screen-launcher-install b/screen-launcher-install index 34c77e15..95f9f984 100755 --- a/screen-launcher-install +++ b/screen-launcher-install @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh -e # # GNU screen-profiles-helper # Copyright (C) 2008 Canonical Ltd. @@ -26,7 +26,6 @@ install_screen_launcher() { launcher="/usr/bin/screen-launcher" # We have to make sure screen is called last pos=$(( $(grep -ns "$launcher" "$dest" | sed 's/:.*$//' | head -1) )) - do=0 if [ $pos -gt 0 ]; then if [ $pos -lt $(( $(wc -l "$dest" | sed "s/ .*$//") -2)) ]; then @@ -46,4 +45,3 @@ install_screen_launcher() { install_screen_launcher "$HOME/.bashrc" install_screen_launcher "$HOME/.bash_profile" - diff --git a/screen-launcher-uninstall b/screen-launcher-uninstall index 259d017f..898b2a5c 100755 --- a/screen-launcher-uninstall +++ b/screen-launcher-uninstall @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh -e # # GNU screen-profiles-helper # Copyright (C) 2008 Canonical Ltd. @@ -28,4 +28,3 @@ remove_screen_launcher() { remove_screen_launcher "$HOME/.bashrc" remove_screen_launcher "$HOME/.bash_profile" - diff --git a/screen-launcher.1 b/screen-launcher.1 new file mode 100644 index 00000000..1e78fdcb --- /dev/null +++ b/screen-launcher.1 @@ -0,0 +1,22 @@ +.TH screen\-launcher 1 "16 Jan 2009" screen-profiles "screen-profiles" +.SH NAME +screen\-launcher \- Screen Launcher + +.SH DESCRIPTION +\fBscreen\-launcher\fP is a simple application that will launch "screen", reconnecting to an existing detached session (if available). + +This script exists for simple insertion and removal from a user's ~/.screenrc file, by the \fBscreen\-profiles\-helper\fP utility. + +.SH "SEE ALSO" +.PD 0 +.TP +\fBscreen\fP(1), \fBscreen\-profiles\-helper\fP(1) + +.TP +\fIhttp://launchpad.net/screen-profiles\fP +.PD + +.SH AUTHOR +This manpage was written by Dustin Kirkland for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation. + +On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. diff --git a/screen-profiles-helper.1 b/screen-profiles-helper.1 new file mode 100644 index 00000000..14d1cc71 --- /dev/null +++ b/screen-profiles-helper.1 @@ -0,0 +1,20 @@ +.TH screen\-profiles\-helper 1 "16 Jan 2009" screen-profiles "screen-profiles" +.SH NAME +screen\-profiles\-helper \- Configuration utility for screen\-profiles + +.SH DESCRIPTION +\fBscreen\-profiles\-helper\fP is an application that can configure a number of options available in the screen\-profiles utility. + +.SH "SEE ALSO" +.PD 0 +.TP +\fBscreen\fP(1) + +.TP +\fIhttp://launchpad.net/screen-profiles\fP +.PD + +.SH AUTHOR +This manpage was written by Dustin Kirkland for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or any later version published by the Free Software Foundation. + +On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. diff --git a/select-screen-profile b/select-screen-profile index 569fd9fd..0df77e27 100755 --- a/select-screen-profile +++ b/select-screen-profile @@ -73,11 +73,11 @@ prompt() { for x in $profiles; do i=$(expr $i + 1) desc=" " - if [ $x = "ubuntu" ]; then + if [ "$x" = "ubuntu" ]; then desc="<---- ` gettext 'recommended'`" simple=$i fi - echo " $i. $x\t\t$desc" + echo " $i. $x \t\t$desc" done echo selected=x diff --git a/select-screen-profile.1 b/select-screen-profile.1 index d0ed8b36..ffd977ee 100644 --- a/select-screen-profile.1 +++ b/select-screen-profile.1 @@ -3,7 +3,7 @@ select\-screen\-profile \- Screen Profile Selector .SH DESCRIPTION -\fBselect\-screen\-profile\fP is an application lists the available screen profiles on a system and prompts the user to select one. +\fBselect\-screen\-profile\fP is an application that lists the available screen profiles on a system and prompts the user to select one. The selected profile will be symbolically linked into the current user's ~/.screenrc file, if that file does not yet exist, or is currently a symbolic link.