* 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
This commit is contained in:
Dustin Kirkland 2009-01-28 18:29:29 -05:00
commit 14f3ba9a71
13 changed files with 57 additions and 89 deletions

22
debian/changelog vendored
View file

@ -1,8 +1,26 @@
screen-profiles (1.18) UNRELEASED; urgency=low 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 <kirkland@ubuntu.com> Tue, 27 Jan 2009 16:03:32 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Wed, 28 Jan 2009 18:23:31 -0500
screen-profiles (1.17-0ubuntu1) jaunty; urgency=low screen-profiles (1.17-0ubuntu1) jaunty; urgency=low

8
debian/install vendored
View file

@ -7,8 +7,14 @@ bin/reboot-required usr/share/screen-profiles/bin
bin/release usr/share/screen-profiles/bin bin/release usr/share/screen-profiles/bin
bin/updates-available usr/share/screen-profiles/bin bin/updates-available usr/share/screen-profiles/bin
profiles/common usr/share/screen-profiles/profiles 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/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 keybindings/common usr/share/screen-profiles/keybindings
windows/common usr/share/screen-profiles/windows windows/common usr/share/screen-profiles/windows
screen usr/bin screen usr/bin

8
debian/rules vendored
View file

@ -10,11 +10,8 @@ VER=`head -n 1 debian/changelog | sed 's/^.*(//' | sed 's/).*//' | sed 's/-.*//'
get-orig-source: get-orig-source:
dh_testdir dh_testdir
-[ -d ../${PACKAGE} ] && mv ../${PACKAGE} ../${PACKAGE}-${VER} -[ -d ../${PACKAGE} ] && mv ../${PACKAGE} ../${PACKAGE}-${VER}
# auto-generate ubuntu-dark profile # auto-generate the logo'd light/dark profiles
cp -f profiles/ubuntu profiles/ubuntu-dark ./profiles/generate-profiles
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
tar -C ../ --exclude .bzr --exclude debian -zcvf ../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER} tar -C ../ --exclude .bzr --exclude debian -zcvf ../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER}
prebuild: prebuild:
@ -44,6 +41,7 @@ binary-indep: build install
dh_compress -i dh_compress -i
dh_fixperms -i dh_fixperms -i
dh_link -i /etc/screenrc usr/share/${PACKAGE}/profiles/plain 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_installdeb -i
dh_gencontrol -i dh_gencontrol -i
dh_md5sums -i dh_md5sums -i

View file

@ -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 <kirkland@canonical.com>
#
# 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 <http://www.gnu.org/licenses/>.
###############################################################################
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'

15
profiles/generate-profiles Executable file
View file

@ -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

1
profiles/logos/debian Normal file
View file

@ -0,0 +1 @@
%{= r} %{=b }@%{= }

1
profiles/logos/fedora Normal file
View file

@ -0,0 +1 @@
%{+b Bw} f

1
profiles/logos/redhat Normal file
View file

@ -0,0 +1 @@
%{+b RK} RH

1
profiles/logos/ubuntu Normal file
View file

@ -0,0 +1 @@
%{+b kr}\\%{= ky}o%{=b kY}\/%{=b Wk}

View file

@ -1,7 +1,7 @@
############################################################################### ###############################################################################
# Screen Profile for Debian # Screen Profile
# This configuration profile is intended to roughly approximate a Debian # This configuration profile is intended to roughly approximate graphical
# Desktop within 'screen'. # desktop within 'screen'; inspired by the Ubuntu Gnome Desktop.
# #
# Copyright (C) 2008 Dustin Kirkland <kirkland@canonical.com> # Copyright (C) 2008 Dustin Kirkland <kirkland@canonical.com>
# #
@ -21,7 +21,7 @@
source /usr/share/screen-profiles/profiles/common 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 # NOTE: There is an arbitrary limit of being able to change colors 16 times
# in this 'hardstatus string'. # in this 'hardstatus string'.

View file

@ -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 <kirkland@canonical.com>
#
# 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 <http://www.gnu.org/licenses/>.
###############################################################################
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'

View file

@ -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 <kirkland@canonical.com>
#
# 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 <http://www.gnu.org/licenses/>.
###############################################################################
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)

View file

@ -54,10 +54,13 @@ assert_symlink "$HOME/.screenrc-profile"
listprofiles() { listprofiles() {
# Display list of profiles, one per line # Display list of profiles, one per line
for x in $(ls $PROFILE_DIR); do 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 # Skip the common profile, no value there
continue continue
fi fi
if [ $x = "ubuntu" -a -r "$PROFILE_DIR/ubuntu-light" ]; then
continue
fi
echo "$x" echo "$x"
done done
} }