* profiles/common, screen: create a temp file to use on screen launch,

consisting of the profile plus the windows, but don't source default
windows otherwise as this breaks F5-refresh, LP: #368786


Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-04-29 01:16:44 -05:00
commit f5b38ecb52
3 changed files with 10 additions and 3 deletions

5
debian/changelog vendored
View file

@ -6,8 +6,11 @@ screen-profiles (1.52) unreleased; urgency=low
LP: #368925
* profiles/profile.skel: swap the position of ip-address and menu
* screen-profiles.1: document all notifications, LP: #369040
* profiles/common, screen: create a temp file to use on screen launch,
consisting of the profile plus the windows, but don't source default
windows otherwise as this breaks F5-refresh, LP: #368786
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 29 Apr 2009 00:36:48 -0500
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 29 Apr 2009 01:14:27 -0500
screen-profiles (1.51-0ubuntu1) karmic; urgency=low

View file

@ -62,4 +62,3 @@ altscreen on
defscrollback 10000
source $HOME/.screen-profiles/keybindings
source $HOME/.screen-profiles/windows

7
screen
View file

@ -79,7 +79,12 @@ fi
# Now let's execute screen!
if [ "$#" = "0" ]; then
exec /usr/bin/screen.real -c "$HOME/.screen-profiles/profile" /usr/bin/motd+shell
# Create a temporary config file *with* the default windows
# but if we refresh, we'll just source the profile, without
temp=$(mktemp screen-profiles-XXXXXXXX)
trap "rm -f $temp 2>/dev/null || true" EXIT HUP INT QUIT TERM
cat "$HOME/.screen-profiles/profile" "$HOME/.screen-profiles/windows" > "$temp"
exec /usr/bin/screen.real -c "$temp" /usr/bin/motd+shell
else
exec /usr/bin/screen.real -c "$HOME/.screen-profiles/profile" "$@"
fi