mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
usr/bin/byobu, usr/share/byobu/profiles/byoburc: add support for
different window sets, LP: #517796
This commit is contained in:
parent
d2c6f9587c
commit
25c188ff0b
3 changed files with 18 additions and 28 deletions
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -1,8 +1,9 @@
|
|||
byobu (2.74-0ubuntu1) maverick; urgency=low
|
||||
byobu (2.74) unreleased; urgency=low
|
||||
|
||||
* usr/lib/byobu/disk_io: fix regex to support RAID devices, LP: #572855
|
||||
* debian/postinst: make debconf question failsafe, LP: #569041
|
||||
* usr/bin/byobu: add support for different window sets, LP: #517796
|
||||
* usr/bin/byobu, usr/share/byobu/profiles/byoburc: add support for
|
||||
different window sets, LP: #517796
|
||||
* usr/bin/byobu-select-session: use screen -ls, less overhead
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 28 Apr 2010 23:11:14 -0500
|
||||
|
|
|
@ -20,24 +20,12 @@
|
|||
PKG="byobu"
|
||||
VERSION=2.74
|
||||
|
||||
while [ ! -z "$1" ]; do
|
||||
case "$1" in
|
||||
-v|--version)
|
||||
# Add a version argument for debugging purposes
|
||||
if [ "$#" = "1" ] && [ "$1" = "-v" ]; then
|
||||
echo "$PKG version $VERSION"
|
||||
screen -v
|
||||
exit 0
|
||||
;;
|
||||
--windows)
|
||||
if [ -r "$2" ]; then
|
||||
WINDOWS=$(cat "$2")
|
||||
fi
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
ARGS="$ARGS $1"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
# Check if we're being autolaunched, and this user explicitly does not want it.
|
||||
if [ "$0" = "/etc/profile.d/Z98-$PKG.sh" ] && [ -r "$HOME/.$PKG/disable-autolaunch" ]; then
|
||||
|
@ -50,16 +38,17 @@ byobu-janitor --force
|
|||
# Set window title until https://bugs.launchpad.net/bugs/338722 is fixed in screen
|
||||
printf "\033]0;${USER}@$(hostname) - ${PKG}\007"
|
||||
|
||||
# Configure default windows
|
||||
DEFAULT_WINDOW=
|
||||
if [ -n "$WINDOWS" ];
|
||||
mv -f "$HOME/.byobu/windows" "$HOME/.byobu/.windows-swap"
|
||||
cleanup='mv -f "$HOME/.byobu/.windows-swap" "$HOME/.byobu/windows"'
|
||||
printf "%s\n%s\n" "$WINDOWS\n" "$cleanup" > "$HOME/.byobu/windows"
|
||||
elif ! grep -qs "^[^#]" "$HOME/.$PKG/windows"; then
|
||||
DEFAULT_WINDOW="-t shell motd+shell"
|
||||
WINDOW_LIST="$HOME/.$PKG/windows"
|
||||
if [ -r "$BYOBU_WINDOWS" ]; then
|
||||
# Override default window list, based on BYOBU_WINDOWS environment variable
|
||||
WINDOW_LIST="$HOME/.$PKG/windows"
|
||||
fi
|
||||
|
||||
# Launch motd+shell, unless the user has default windows set to launch
|
||||
grep -qs "^[^#]" "$WINDOW_LIST" || DEFAULT_WINDOW="-t shell motd+shell"
|
||||
export BYOBU_WINDOWS
|
||||
|
||||
# Check if our terminfo supports 256 colors
|
||||
[ -x /usr/bin/tput ] && [ $(/usr/bin/tput colors 2>/dev/null || echo 0) -eq 256 ] && SCREEN_TERM="-T screen-256color"
|
||||
|
||||
|
|
|
@ -20,5 +20,5 @@
|
|||
###############################################################################
|
||||
|
||||
source $HOME/.byobu/profile
|
||||
source $HOME/.byobu/windows
|
||||
source $BYOBU_WINDOWS
|
||||
source $HOME/.screenrc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue