From 14f3ba9a719999c0989a9eae4f25e2ad154e7c5c Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 28 Jan 2009 18:29:29 -0500 Subject: [PATCH] * debian/install: install all non-ubuntu profiles into /usr/share/screen-profiles/profiles/misc; install the ubuntu-light profile as "ubuntu-light" * debian/rules: call the generate-profiles script as part of the get-orig-source target; dh_link the ubuntu-light profile to ubuntu (to maintain legacy compatibility to existing ~/.screenrc-profile's) * profiles/debian,fedora,redhat,ubuntu: removed since these are auto generated now * profiles/debian-dark,debian-light,fedora-dark,fedora-light,redhat-dark, redhat-light,ubuntu-dark,ubuntu-light: new, autogenerated profiles * profiles/generate-profiles: shell script that will generate profiles using a skel file and a set of custom "logos" * profiles/logos/*: extracted the unique logo component of each profile and dropped in here * profiles/profile.skel: skeleton profile functionality, to be sed-upon by the generate-profiles script * select-screen-profile: some hackery to work around the fact that we now have a 'misc' directory in the profile listing, as well as a possibly duplicated ubuntu and ubuntu-light profiles --- debian/changelog | 22 ++++++++++++++++++++-- debian/install | 8 +++++++- debian/rules | 8 +++----- profiles/fedora | 24 ------------------------ profiles/generate-profiles | 15 +++++++++++++++ profiles/logos/debian | 1 + profiles/logos/fedora | 1 + profiles/logos/redhat | 1 + profiles/logos/ubuntu | 1 + profiles/{debian => profile.skel} | 8 ++++---- profiles/redhat | 24 ------------------------ profiles/ubuntu | 28 ---------------------------- select-screen-profile | 5 ++++- 13 files changed, 57 insertions(+), 89 deletions(-) delete mode 100644 profiles/fedora create mode 100755 profiles/generate-profiles create mode 100644 profiles/logos/debian create mode 100644 profiles/logos/fedora create mode 100644 profiles/logos/redhat create mode 100644 profiles/logos/ubuntu rename profiles/{debian => profile.skel} (79%) delete mode 100644 profiles/redhat delete mode 100644 profiles/ubuntu diff --git a/debian/changelog b/debian/changelog index a5d0bee5..883417df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,26 @@ screen-profiles (1.18) UNRELEASED; urgency=low - * + * debian/install: install all non-ubuntu profiles into + /usr/share/screen-profiles/profiles/misc; install the ubuntu-light + profile as "ubuntu-light" + * debian/rules: call the generate-profiles script as part of the + get-orig-source target; dh_link the ubuntu-light profile to ubuntu (to + maintain legacy compatibility to existing ~/.screenrc-profile's) + * profiles/debian,fedora,redhat,ubuntu: removed since these are auto + generated now + * profiles/debian-dark,debian-light,fedora-dark,fedora-light,redhat-dark, + redhat-light,ubuntu-dark,ubuntu-light: new, autogenerated profiles + * profiles/generate-profiles: shell script that will generate profiles + using a skel file and a set of custom "logos" + * profiles/logos/*: extracted the unique logo component of each profile + and dropped in here + * profiles/profile.skel: skeleton profile functionality, to be sed-upon + by the generate-profiles script + * select-screen-profile: some hackery to work around the fact that we now + have a 'misc' directory in the profile listing, as well as a possibly + duplicated ubuntu and ubuntu-light profiles - -- Dustin Kirkland Tue, 27 Jan 2009 16:03:32 -0500 + -- Dustin Kirkland Wed, 28 Jan 2009 18:23:31 -0500 screen-profiles (1.17-0ubuntu1) jaunty; urgency=low diff --git a/debian/install b/debian/install index 7c2bb96d..0b92dac4 100644 --- a/debian/install +++ b/debian/install @@ -7,8 +7,14 @@ bin/reboot-required usr/share/screen-profiles/bin bin/release usr/share/screen-profiles/bin bin/updates-available usr/share/screen-profiles/bin profiles/common usr/share/screen-profiles/profiles -profiles/ubuntu usr/share/screen-profiles/profiles +profiles/ubuntu-light usr/share/screen-profiles/profiles profiles/ubuntu-dark usr/share/screen-profiles/profiles +profiles/debian-light usr/share/screen-profiles/profiles/misc +profiles/debian-dark usr/share/screen-profiles/profiles/misc +profiles/fedora-light usr/share/screen-profiles/profiles/misc +profiles/fedora-dark usr/share/screen-profiles/profiles/misc +profiles/redhat-light usr/share/screen-profiles/profiles/misc +profiles/redhat-dark usr/share/screen-profiles/profiles/misc keybindings/common usr/share/screen-profiles/keybindings windows/common usr/share/screen-profiles/windows screen usr/bin diff --git a/debian/rules b/debian/rules index fb7923c3..9226ca0e 100755 --- a/debian/rules +++ b/debian/rules @@ -10,11 +10,8 @@ VER=`head -n 1 debian/changelog | sed 's/^.*(//' | sed 's/).*//' | sed 's/-.*//' get-orig-source: dh_testdir -[ -d ../${PACKAGE} ] && mv ../${PACKAGE} ../${PACKAGE}-${VER} - # auto-generate ubuntu-dark profile - cp -f profiles/ubuntu profiles/ubuntu-dark - grep "^caption " profiles/common >> profiles/ubuntu-dark - sed -i "s/ Wk/ Kw/g" profiles/ubuntu-dark - sed -i "s/kW/wK/g" profiles/ubuntu-dark + # auto-generate the logo'd light/dark profiles + ./profiles/generate-profiles tar -C ../ --exclude .bzr --exclude debian -zcvf ../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER} prebuild: @@ -44,6 +41,7 @@ binary-indep: build install dh_compress -i dh_fixperms -i dh_link -i /etc/screenrc usr/share/${PACKAGE}/profiles/plain + dh_link -i /usr/share/${PACKAGE}/profiles/ubuntu-light usr/share/${PACKAGE}/profiles/ubuntu dh_installdeb -i dh_gencontrol -i dh_md5sums -i diff --git a/profiles/fedora b/profiles/fedora deleted file mode 100644 index 0bba8da8..00000000 --- a/profiles/fedora +++ /dev/null @@ -1,24 +0,0 @@ -############################################################################### -# Screen Profile for Debian -# This configuration profile is intended to roughly approximate a Fedora -# Desktop within 'screen'. -# -# Copyright (C) 2008 Dustin Kirkland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -############################################################################### - -source /usr/share/screen-profiles/profiles/common - -hardstatus string '%{= wk} %{+b Bw} f %{+b wk} %100` %{= Wk}|%= |%{+b gW}%103`%{= Wk}|%{= wk}%Y-%m-%d %c:%s' diff --git a/profiles/generate-profiles b/profiles/generate-profiles new file mode 100755 index 00000000..1235092c --- /dev/null +++ b/profiles/generate-profiles @@ -0,0 +1,15 @@ +#!/bin/sh +# This script should be run during in the './debian/rules get-orig-source' +# step. + +for i in $(ls profiles/logos); do + echo "Generating profile: $i-light" + cat profiles/profile.skel > profiles/$i-light + logo="`cat profiles/logos/$i`" + sed -i "s/__LOGO__/$logo/" profiles/$i-light + echo "Generating profile: $i-dark" + cp profiles/$i-light profiles/$i-dark + grep "^caption " profiles/common >> profiles/$i-dark + sed -i "s/ Wk/ Kw/g" profiles/$i-dark + sed -i "s/kW/wK/g" profiles/$i-dark +done diff --git a/profiles/logos/debian b/profiles/logos/debian new file mode 100644 index 00000000..181f4fd9 --- /dev/null +++ b/profiles/logos/debian @@ -0,0 +1 @@ +%{= r} %{=b }@%{= } diff --git a/profiles/logos/fedora b/profiles/logos/fedora new file mode 100644 index 00000000..edaaa9ef --- /dev/null +++ b/profiles/logos/fedora @@ -0,0 +1 @@ +%{+b Bw} f diff --git a/profiles/logos/redhat b/profiles/logos/redhat new file mode 100644 index 00000000..842bcd58 --- /dev/null +++ b/profiles/logos/redhat @@ -0,0 +1 @@ +%{+b RK} RH diff --git a/profiles/logos/ubuntu b/profiles/logos/ubuntu new file mode 100644 index 00000000..73e137be --- /dev/null +++ b/profiles/logos/ubuntu @@ -0,0 +1 @@ +%{+b kr}\\%{= ky}o%{=b kY}\/%{=b Wk} diff --git a/profiles/debian b/profiles/profile.skel similarity index 79% rename from profiles/debian rename to profiles/profile.skel index 3f32734d..4e161fc1 100644 --- a/profiles/debian +++ b/profiles/profile.skel @@ -1,7 +1,7 @@ ############################################################################### -# Screen Profile for Debian -# This configuration profile is intended to roughly approximate a Debian -# Desktop within 'screen'. +# Screen Profile +# This configuration profile is intended to roughly approximate graphical +# desktop within 'screen'; inspired by the Ubuntu Gnome Desktop. # # Copyright (C) 2008 Dustin Kirkland # @@ -21,7 +21,7 @@ source /usr/share/screen-profiles/profiles/common -hardstatus string '%{= wk} %{+b Wr} @ %{+b wk} %100` %{= Wk} %= %{=b bW}%102`%{= Wk} %{=b rW}%101`%{= Wk} %{= Yk}%106`%{= Wk} %{= Wk}%104`%{=b cW}%103`%{= Wk} %{=b gW}%105`%{= Wk} %Y-%m-%d %0c:%s' +hardstatus string '__LOGO__%{=b Wk} %100` %{= Wk} %= %{=b bW}%102`%{= Wk} %{=b rW}%101`%{= Wk} %{= Yk}%106`%{= Wk} %{= Wk}%104`%{=b cW}%103`%{= Wk} %{=b gW}%105`,%107`%{= Wk} %Y-%m-%d %0c:%s' # NOTE: There is an arbitrary limit of being able to change colors 16 times # in this 'hardstatus string'. diff --git a/profiles/redhat b/profiles/redhat deleted file mode 100644 index 665b9c7f..00000000 --- a/profiles/redhat +++ /dev/null @@ -1,24 +0,0 @@ -############################################################################### -# Screen Profile for Debian -# This configuration profile is intended to roughly approximate a Red Hat -# Desktop within 'screen'. -# -# Copyright (C) 2008 Dustin Kirkland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -############################################################################### - -source /usr/share/screen-profiles/profiles/common - -hardstatus string '%{= wk} %{+b RK} RH %{+b wk} %100` %{= Wk}|%= |%{+b gW}%103`%{= Wk}|%{= wk}%Y-%m-%d %c:%s' diff --git a/profiles/ubuntu b/profiles/ubuntu deleted file mode 100644 index 73669096..00000000 --- a/profiles/ubuntu +++ /dev/null @@ -1,28 +0,0 @@ -############################################################################### -# Screen Profile for the Ubuntu Server -# This configuration profile is intended to roughly approximate the Ubuntu -# Gnome Desktop within 'screen'. -# -# Copyright (C) 2008 Dustin Kirkland -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -############################################################################### - -source /usr/share/screen-profiles/profiles/common - -hardstatus string '%{+b kr}\%{= ky}o%{=b kY}/%{=b Wk} %100` %{= Wk} %= %{=b bW}%102`%{= Wk} %{=b rW}%101`%{= Wk} %{= Yk}%106`%{= Wk} %{= Wk}%104`%{=b cW}%103`%{= Wk} %{=b gW}%105`,%107`%{= Wk} %Y-%m-%d %0c:%s' - -# NOTE: There is an arbitrary limit of being able to change colors 16 times -# in this 'hardstatus string'. -# See: https://bugs.launchpad.net/bugs/315871 (fixed in Jaunty) diff --git a/select-screen-profile b/select-screen-profile index 448f70f6..d1836a30 100755 --- a/select-screen-profile +++ b/select-screen-profile @@ -54,10 +54,13 @@ assert_symlink "$HOME/.screenrc-profile" listprofiles() { # Display list of profiles, one per line for x in $(ls $PROFILE_DIR); do - if [ $x = "common" ]; then + if [ $x = "common" -o $x = "misc" ]; then # Skip the common profile, no value there continue fi + if [ $x = "ubuntu" -a -r "$PROFILE_DIR/ubuntu-light" ]; then + continue + fi echo "$x" done }