mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-24 07:06:19 -07:00
Drop the distro name in generated profiles
* debian/install: fix installation of profiles * debian/rules: don't create the ubuntu profile symlink * debian/screen-profiles-extras.install: no longer need to install the distro-specific profiles * profiles/generate: generate profiles which do not have ubuntu- prepended * select-screen-profile: remove the ubuntu specific profile handling * screen: fix broken symlinks to ubuntu-* profiles -- Dustin Kirkland <kirkland@ubuntu.com>Tue, 21 Apr 2009 14:40:16 -0500
This commit is contained in:
parent
1bc9bf610c
commit
83aaa105e9
7 changed files with 58 additions and 44 deletions
12
debian/changelog
vendored
12
debian/changelog
vendored
|
@ -1,8 +1,16 @@
|
||||||
screen-profiles (1.48) unreleased; urgency=low
|
screen-profiles (1.48) unreleased; urgency=low
|
||||||
|
|
||||||
* UNRELEASED
|
Drop the distro name in generated profiles
|
||||||
|
* debian/install: fix installation of profiles
|
||||||
|
* debian/rules: don't create the ubuntu profile symlink
|
||||||
|
* debian/screen-profiles-extras.install: no longer need to install
|
||||||
|
the distro-specific profiles
|
||||||
|
* profiles/generate: generate profiles which do not have ubuntu-
|
||||||
|
prepended
|
||||||
|
* select-screen-profile: remove the ubuntu specific profile handling
|
||||||
|
* screen: fix broken symlinks to ubuntu-* profiles
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Sat, 18 Apr 2009 16:13:00 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 21 Apr 2009 14:40:16 -0500
|
||||||
|
|
||||||
screen-profiles (1.47-0ubuntu1) jaunty; urgency=low
|
screen-profiles (1.47-0ubuntu1) jaunty; urgency=low
|
||||||
|
|
||||||
|
|
6
debian/install
vendored
6
debian/install
vendored
|
@ -2,9 +2,9 @@ bin/* var/lib/screen-profiles
|
||||||
po/locale/* usr/share/locale
|
po/locale/* usr/share/locale
|
||||||
profiles/common usr/share/screen-profiles/profiles
|
profiles/common usr/share/screen-profiles/profiles
|
||||||
profiles/plain usr/share/screen-profiles/profiles
|
profiles/plain usr/share/screen-profiles/profiles
|
||||||
profiles/ubuntu-black usr/share/screen-profiles/profiles
|
profiles/black usr/share/screen-profiles/profiles
|
||||||
profiles/ubuntu-dark usr/share/screen-profiles/profiles
|
profiles/dark usr/share/screen-profiles/profiles
|
||||||
profiles/ubuntu-light usr/share/screen-profiles/profiles
|
profiles/light usr/share/screen-profiles/profiles
|
||||||
keybindings/common usr/share/screen-profiles/keybindings
|
keybindings/common usr/share/screen-profiles/keybindings
|
||||||
keybindings/none usr/share/screen-profiles/keybindings
|
keybindings/none usr/share/screen-profiles/keybindings
|
||||||
windows/common usr/share/screen-profiles/windows
|
windows/common usr/share/screen-profiles/windows
|
||||||
|
|
1
debian/rules
vendored
1
debian/rules
vendored
|
@ -62,7 +62,6 @@ binary-indep: build install
|
||||||
dh_installdebconf -i
|
dh_installdebconf -i
|
||||||
dh_compress -i
|
dh_compress -i
|
||||||
dh_fixperms -i
|
dh_fixperms -i
|
||||||
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
|
||||||
|
|
4
debian/screen-profiles-extras.install
vendored
4
debian/screen-profiles-extras.install
vendored
|
@ -1,3 +1 @@
|
||||||
profiles/ubuntu-*_* usr/share/screen-profiles/profiles
|
profiles/*_* usr/share/screen-profiles/profiles
|
||||||
profiles/*-* usr/share/screen-profiles/profiles/misc
|
|
||||||
|
|
||||||
|
|
|
@ -19,28 +19,24 @@
|
||||||
# This script should be run during in the './debian/rules get-orig-source'
|
# This script should be run during in the './debian/rules get-orig-source'
|
||||||
# step.
|
# step.
|
||||||
|
|
||||||
DISTROS="ubuntu"
|
rm -f profiles/light profiles/dark profiles/black profiles/*_*
|
||||||
|
if [ "$1" = "--clean" ]; then
|
||||||
for i in $DISTROS; do
|
echo "Removing generated profiles"
|
||||||
rm -f profiles/$i*
|
exit 0
|
||||||
if [ "$1" = "--clean" ]; then
|
fi
|
||||||
echo "Removing profiles for: $i"
|
echo "Generating profiles"
|
||||||
continue
|
cat profiles/profile.skel > profiles/light
|
||||||
|
cp profiles/light profiles/dark
|
||||||
|
sed -i "s/ Wk/ Kw/g" profiles/dark
|
||||||
|
sed -i "s/kW/wK/g" profiles/dark
|
||||||
|
for j in "B-light_blue" "b-dark_blue" "C-light_cyan" "c-dark_cyan" "G-light_green" "g-dark_green" "M-light_purple" "m-dark_purple" "R-light_red" "r-dark_red" "Y-light_yellow" "y-dark_yellow" "k-black"; do
|
||||||
|
x=$(echo "$j" | awk -F"-" '{print $1}')
|
||||||
|
desc=$(echo "$j" | awk -F"-" '{print $2}')
|
||||||
|
y="w"
|
||||||
|
if echo "$desc" | grep -qs "light"; then
|
||||||
|
y="k"
|
||||||
fi
|
fi
|
||||||
echo "Generating profiles for: $i"
|
cp profiles/light profiles/$desc
|
||||||
cat profiles/profile.skel > profiles/$i-light
|
sed -i "s/ Wk/ $x$y/g" profiles/$desc
|
||||||
cp profiles/$i-light profiles/$i-dark
|
sed -i "s/kW/$y$x/g" profiles/$desc
|
||||||
sed -i "s/ Wk/ Kw/g" profiles/$i-dark
|
|
||||||
sed -i "s/kW/wK/g" profiles/$i-dark
|
|
||||||
for j in "B-light_blue" "b-dark_blue" "C-light_cyan" "c-dark_cyan" "G-light_green" "g-dark_green" "M-light_purple" "m-dark_purple" "R-light_red" "r-dark_red" "Y-light_yellow" "y-dark_yellow" "k-black"; do
|
|
||||||
x=$(echo "$j" | awk -F"-" '{print $1}')
|
|
||||||
desc=$(echo "$j" | awk -F"-" '{print $2}')
|
|
||||||
y="w"
|
|
||||||
if echo "$desc" | grep -qs "light"; then
|
|
||||||
y="k"
|
|
||||||
fi
|
|
||||||
cp profiles/$i-light profiles/$i-$desc
|
|
||||||
sed -i "s/ Wk/ $x$y/g" profiles/$i-$desc
|
|
||||||
sed -i "s/kW/$y$x/g" profiles/$i-$desc
|
|
||||||
done
|
|
||||||
done
|
done
|
||||||
|
|
22
screen
22
screen
|
@ -29,8 +29,26 @@ if [ -r "$HOME/.screenrc" -a ! -e "$HOME/.screen-profiles/profile" -a ! -h "$HOM
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure that the user has selected a screen profile
|
# Ensure that the user has selected a screen profile
|
||||||
[ -h "$HOME/.screen-profiles/profile" ] || /usr/bin/select-screen-profile
|
profile="$HOME/.screen-profiles/profile"
|
||||||
if [ ! -r "$HOME/.screen-profiles/profile" ]; then
|
[ -h "$profile" ] || /usr/bin/select-screen-profile
|
||||||
|
|
||||||
|
# Previously, profiles were prepended with ubuntu-.
|
||||||
|
# This is no longer the case, for cross-distro compatibility.
|
||||||
|
# Try to fix broken symlinks for upgrading users, or prompt to reselect.
|
||||||
|
if [ -h "$profile" -a ! -r "$profile" ]; then
|
||||||
|
if stat "$profile" | head -n1 | grep -qs ".*->.*ubuntu\-.*"; then
|
||||||
|
newsrc=$(stat "$profile" | head -n1 | sed "s/.*\`//" | sed "s/'.*//" | sed "s/ubuntu-//")
|
||||||
|
if [ -r "$newsrc" ]; then
|
||||||
|
ln -sf "$newsrc" "$profile"
|
||||||
|
else
|
||||||
|
/usr/bin/select-screen-profile
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
/usr/bin/select-screen-profile
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -r "$profile" ]; then
|
||||||
echo
|
echo
|
||||||
echo "Your selected profile is not accessible."
|
echo "Your selected profile is not accessible."
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -58,19 +58,16 @@ listprofiles() {
|
||||||
# Display list of profiles, one per line
|
# Display list of profiles, one per line
|
||||||
# Start with basic profiles
|
# Start with basic profiles
|
||||||
basename $(ls $PROFILE_DIR/plain 2>/dev/null) 2>/dev/null
|
basename $(ls $PROFILE_DIR/plain 2>/dev/null) 2>/dev/null
|
||||||
basename $(ls $PROFILE_DIR/*-light 2>/dev/null) 2>/dev/null
|
basename $(ls $PROFILE_DIR/light 2>/dev/null) 2>/dev/null
|
||||||
basename $(ls $PROFILE_DIR/*-dark 2>/dev/null) 2>/dev/null
|
basename $(ls $PROFILE_DIR/dark 2>/dev/null) 2>/dev/null
|
||||||
basename $(ls $PROFILE_DIR/*-black 2>/dev/null) 2>/dev/null
|
basename $(ls $PROFILE_DIR/black 2>/dev/null) 2>/dev/null
|
||||||
# Now, list advanced profiles
|
# Now, list advanced profiles
|
||||||
for x in $(ls $PROFILE_DIR/*-*_* 2>/dev/null); do
|
for x in $(ls $PROFILE_DIR/*_* 2>/dev/null); do
|
||||||
x=$(basename "$x")
|
x=$(basename "$x")
|
||||||
if [ $x = "common" -o $x = "misc" ]; 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
|
||||||
}
|
}
|
||||||
|
@ -84,9 +81,7 @@ prompt() {
|
||||||
for x in $profiles; do
|
for x in $profiles; do
|
||||||
i=$(expr $i + 1)
|
i=$(expr $i + 1)
|
||||||
desc=" "
|
desc=" "
|
||||||
if [ "$x" = "ubuntu" ]; then
|
if [ "$x" = "plain" ]; then
|
||||||
desc="-light\t"
|
|
||||||
elif [ "$x" = "plain" ]; then
|
|
||||||
simple=$i
|
simple=$i
|
||||||
fi
|
fi
|
||||||
[ $i -lt 10 ] && i=" $i"
|
[ $i -lt 10 ] && i=" $i"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue