From ef3262d447b7653b8705f9f303d8c7fc86cc8bac Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 14 May 2009 13:04:00 -0500 Subject: [PATCH] * byobu, debian/install, motd+shell, profiles/byoburc: launch screen with a simple config file that includes the chosen profile plus the chosen windows; but on refresh, only reload the chosen profile; revert previous hack that did this by creating a temporary config file and broke on hardy, LP: #375309 Signed-off-by: Dustin Kirkland --- byobu | 6 +----- debian/changelog | 7 ++++++- debian/install | 1 + motd+shell | 1 - profiles/byoburc | 23 +++++++++++++++++++++++ 5 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 profiles/byoburc diff --git a/byobu b/byobu index cb73f4f5..a5ad29fb 100755 --- a/byobu +++ b/byobu @@ -97,12 +97,8 @@ sed -i "s/$OLDPKG/$PKG/g" "$HOME/.$PKG/keybindings" # Now let's execute screen! if [ "$#" = "0" ]; then - # Create a temporary config file *with* the default windows - # but if we refresh, we'll just source the profile, without - temp=$(mktemp -t $PKG-XXXXXXXX) - cat "$HOME/.$PKG/profile" "$HOME/.$PKG/windows" > "$temp" [ -n "$SHELL" -a -x "$SHELL" ] || SHELL="/bin/sh" - exec $SCREEN_REAL -c "$temp" $SHELL /usr/bin/motd+shell "$temp" + exec $SCREEN_REAL -c "/usr/share/$PKG/profiles/byoburc" $SHELL /usr/bin/motd+shell else exec $SCREEN_REAL -c "$HOME/.$PKG/profile" "$@" fi diff --git a/debian/changelog b/debian/changelog index 8cce5032..fc742d72 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,12 +13,17 @@ byobu (2.4) unreleased; urgency=low * bin/ip-address: hostname -i doesn't always work, use ifconfig instead, LP: #376080 * byobu-export: tar files with owner/group as root/root, LP: #371025 + * byobu, debian/install, motd+shell, profiles/byoburc: launch screen + with a simple config file that includes the chosen profile plus + the chosen windows; but on refresh, only reload the chosen profile; + revert previous hack that did this by creating a temporary config + file and broke on hardy, LP: #375309 * debian/control: suggest vim, for better handling of status details [ David Duffey ] * rpm/byobu.spec: initial specfile for RH packaging - -- Dustin Kirkland Thu, 14 May 2009 00:55:35 -0500 + -- Dustin Kirkland Thu, 14 May 2009 13:03:53 -0500 byobu (2.3-0ubuntu1) karmic; urgency=low diff --git a/debian/install b/debian/install index d3e705f6..4a9e6cc1 100644 --- a/debian/install +++ b/debian/install @@ -1,5 +1,6 @@ bin/* usr/lib/byobu po/locale/* usr/share/locale +profiles/byoburc usr/share/byobu/profiles profiles/common usr/share/byobu/profiles profiles/NONE usr/share/byobu/profiles profiles/black usr/share/byobu/profiles diff --git a/motd+shell b/motd+shell index d880111e..abdfccab 100755 --- a/motd+shell +++ b/motd+shell @@ -18,5 +18,4 @@ # along with this program. If not, see . [ -r /etc/motd ] && cat /etc/motd -[ -n "$1" -a -w "$1" ] && rm -f "$1" 2>/dev/null [ -n "$SHELL" -a -x "$SHELL" ] && exec "$SHELL" || exec /bin/sh diff --git a/profiles/byoburc b/profiles/byoburc new file mode 100644 index 00000000..02a84a59 --- /dev/null +++ b/profiles/byoburc @@ -0,0 +1,23 @@ +############################################################################### +# Load both the profile, and the default windows, used at startup but not +# profile refresh +# +# Copyright (C) 2009 Canonical Ltd. +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +############################################################################### + +source $HOME/.byobu/profile +source $HOME/.byobu/windows