diff --git a/debian/changelog b/debian/changelog index 883417df..244bd38f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,8 +19,11 @@ screen-profiles (1.18) UNRELEASED; urgency=low * 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 + * 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 Wed, 28 Jan 2009 18:23:31 -0500 + -- Dustin Kirkland Wed, 28 Jan 2009 19:00:19 -0500 screen-profiles (1.17-0ubuntu1) jaunty; urgency=low diff --git a/screen b/screen index 47faca42..cb90ddba 100755 --- a/screen +++ b/screen @@ -18,7 +18,14 @@ # along with this program. If not, see . -if [ ! -r "$HOME/.screenrc-profile" ]; then - /usr/bin/select-screen-profile -fi +# Ensure that the user has selected a screen profile +[ -r "$HOME/.screenrc-profile" ] || /usr/bin/select-screen-profile + +# 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 "$@" diff --git a/select-screen-profile b/select-screen-profile index d1836a30..0a8c1840 100755 --- a/select-screen-profile +++ b/select-screen-profile @@ -139,12 +139,6 @@ setprofile() { if [ $found -eq 0 ]; then echo "Invalid profile" 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