screen: default to the light profile, if unspecified; this should be

acceptable now that the F9:Menu prompt is always shown, and from there,
any user can easily change their profile
-Dustin Kirkland <kirkland@ubuntu.com>Tue, 21 Apr 2009 14:49:21 -0500
This commit is contained in:
Dustin Kirkland 2009-04-21 14:50:13 -05:00
commit 45a8da0e02
2 changed files with 11 additions and 5 deletions

6
debian/changelog vendored
View file

@ -10,7 +10,11 @@ screen-profiles (1.48) unreleased; urgency=low
* select-screen-profile: remove the ubuntu specific profile handling * select-screen-profile: remove the ubuntu specific profile handling
* screen: fix broken symlinks to ubuntu-* profiles * screen: fix broken symlinks to ubuntu-* profiles
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 21 Apr 2009 14:40:16 -0500 * screen: default to the light profile, if unspecified; this should be
acceptable now that the F9:Menu prompt is always shown, and from there,
any user can easily change their profile
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 21 Apr 2009 14:49:21 -0500
screen-profiles (1.47-0ubuntu1) jaunty; urgency=low screen-profiles (1.47-0ubuntu1) jaunty; urgency=low

10
screen
View file

@ -22,15 +22,17 @@
# If $HOME/.screenrc exists but $HOME/.screen-profiles/profile does not, # If $HOME/.screenrc exists but $HOME/.screen-profiles/profile does not,
# this shows that the user has an existing custom screen configuration, # this shows that the user has an existing custom screen configuration,
# and thus we will not bother them with a select-screen-profile prompt. # and thus we will not force screen-profiles on them.
if [ -r "$HOME/.screenrc" -a ! -e "$HOME/.screen-profiles/profile" -a ! -h "$HOME/.screen-profiles/profile" ]; then if [ -r "$HOME/.screenrc" -a ! -e "$HOME/.screen-profiles/profile" -a ! -h "$HOME/.screen-profiles/profile" ]; then
exec /usr/bin/screen.real -c "$HOME/.screenrc" "$@" exec /usr/bin/screen.real -c "$HOME/.screenrc" "$@"
exit $? exit $?
fi fi
DEFAULT_PROFILE="light"
# Ensure that the user has selected a screen profile # Ensure that the user has selected a screen profile
profile="$HOME/.screen-profiles/profile" profile="$HOME/.screen-profiles/profile"
[ -h "$profile" ] || /usr/bin/select-screen-profile [ -h "$profile" ] || /usr/bin/select-screen-profile -s "$DEFAULT_PROFILE"
# Previously, profiles were prepended with ubuntu-. # Previously, profiles were prepended with ubuntu-.
# This is no longer the case, for cross-distro compatibility. # This is no longer the case, for cross-distro compatibility.
@ -41,10 +43,10 @@ if [ -h "$profile" -a ! -r "$profile" ]; then
if [ -r "$newsrc" ]; then if [ -r "$newsrc" ]; then
ln -sf "$newsrc" "$profile" ln -sf "$newsrc" "$profile"
else else
/usr/bin/select-screen-profile /usr/bin/select-screen-profile -s "$DEFAULT_PROFILE"
fi fi
else else
/usr/bin/select-screen-profile /usr/bin/select-screen-profile -s "$DEFAULT_PROFILE"
fi fi
fi fi