* select-screen-profile & screen: move the environment sanitation code

to the screen script, such that it is executed each time screen is run,
  rather than on screen profile selection only
This commit is contained in:
Dustin Kirkland 2009-01-29 12:10:17 +01:00
commit a135a9d6b8
3 changed files with 14 additions and 10 deletions

5
debian/changelog vendored
View file

@ -19,8 +19,11 @@ screen-profiles (1.18) UNRELEASED; urgency=low
* select-screen-profile: some hackery to work around the fact that we now * 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 have a 'misc' directory in the profile listing, as well as a possibly
duplicated ubuntu and ubuntu-light profiles duplicated ubuntu and ubuntu-light profiles
* select-screen-profile & screen: move the environment sanitation code
to the screen script, such that it is executed each time screen is run,
rather than on screen profile selection only
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 28 Jan 2009 18:23:31 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Wed, 28 Jan 2009 19:00:19 -0500
screen-profiles (1.17-0ubuntu1) jaunty; urgency=low screen-profiles (1.17-0ubuntu1) jaunty; urgency=low

13
screen
View file

@ -18,7 +18,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
if [ ! -r "$HOME/.screenrc-profile" ]; then # Ensure that the user has selected a screen profile
/usr/bin/select-screen-profile [ -r "$HOME/.screenrc-profile" ] || /usr/bin/select-screen-profile
fi
# Ensure that their keybindings are seeded
[ -s "$HOME/.screenrc-keybindings" ] || echo "source /usr/share/screen-profiles/keybindings/common" > "$HOME/.screenrc-keybindings"
# Ensure that their default windows are seeded
[ -r "$HOME/.screenrc-windows" ] || cp "/usr/share/screen-profiles/windows/common" "$HOME/.screenrc-windows"
# Now let's execute screen!
exec /usr/bin/screen.real "$@" exec /usr/bin/screen.real "$@"

View file

@ -139,12 +139,6 @@ setprofile() {
if [ $found -eq 0 ]; then if [ $found -eq 0 ]; then
echo "Invalid profile" echo "Invalid profile"
fi fi
if [ ! -e "$HOME/.screenrc-windows" ]; then
cp "$BASE_DIR/windows/common" "$HOME/.screenrc-windows"
fi
if [ ! -e "$HOME/.screenrc-keybindings" ]; then
touch "$HOME/.screenrc-keybindings"
fi
} }
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then