From b6475cca6f43ad4fafd06125550a5f65c556c83c Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 17 Mar 2014 10:58:46 +0900 Subject: [PATCH] * usr/bin/byobu-layout.in: LP: #1278277 - fix layout saving, which broke in tmux 1.8 - incrementally rearrange while building our windows up to restore, as sometimes we run out of room; tiling in between seems to work --- debian/changelog | 4 ++++ usr/bin/byobu-layout.in | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 084b9185..b48b8f82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,10 @@ byobu (5.75) unreleased; urgency=medium - fix up the uninstallation of byobu launcher * usr/lib/byobu/include/select-session.py: LP: #1279533 - quick hack to fix crashes when python can't figure out the encoding + * usr/bin/byobu-layout.in: LP: #1278277 + - fix layout saving, which broke in tmux 1.8 + - incrementally rearrange while building our windows up to restore, + as sometimes we run out of room; tiling in between seems to work [ Kosuke Asami ] * usr/lib/byobu/battery: LP: #1289157, #1289157 diff --git a/usr/bin/byobu-layout.in b/usr/bin/byobu-layout.in index 971882e3..8ef746f2 100755 --- a/usr/bin/byobu-layout.in +++ b/usr/bin/byobu-layout.in @@ -47,7 +47,7 @@ list_layouts() { case "$1" in "save") - layout=$(tmux list-windows | grep "(active)$" | sed -e "s/.*\[layout //" -e "s/\] (active)$//") + layout=$(tmux list-windows | grep "(active)$" | sed -e "s/.*\[layout //" -e "s/\] .*(active)$//") panes=$(tmux list-panes | wc -l) if [ -n "$2" ]; then name="$2" @@ -109,6 +109,7 @@ case "$1" in # Create panes if nececessary to restore the layout while [ $(tmux list-panes | wc -l) -lt $panes ]; do tmux split-window + tmux select-layout tiled done # Finally, restore the layout and refresh tmux select-layout "$layout"