diff --git a/debian/changelog b/debian/changelog index 9a847a94..e2bddc2f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,10 @@ byobu (5.85) unreleased; urgency=medium session names start with an underscore, adding this feature to tmux based byobu. + [ Srdjan Grubor ] + * usr/bin/byobu-layout.in: + - add a list-layouts command + -- Dustin Kirkland Mon, 28 Jul 2014 09:12:13 +0100 byobu (5.84-0ubuntu1) utopic; urgency=medium diff --git a/usr/bin/byobu-layout.in b/usr/bin/byobu-layout.in index 8ef746f2..92330eb3 100755 --- a/usr/bin/byobu-layout.in +++ b/usr/bin/byobu-layout.in @@ -29,8 +29,6 @@ PRESETS="even-horizontal even-vertical main-horizontal main-vertical tiled" current_panes=$(tmux list-panes | wc -l) list_layouts() { - echo - echo "Restore layout with , save a layout with " echo echo "Byobu Saved Layouts" local count=0 i= desc= count= p= @@ -52,6 +50,8 @@ case "$1" in if [ -n "$2" ]; then name="$2" else + echo + echo "Restore layout with , save a layout with " while true; do list_layouts echo -n "Enter a unique name to save this layout: " @@ -115,8 +115,12 @@ case "$1" in tmux select-layout "$layout" tmux source "$BYOBU_PREFIX/share/byobu/profiles/tmuxrc" ;; + list) + list_layouts + exit 0 + ;; *) - echo "ERROR: Invalid argument, try [save|restore]" 2>&1 + echo "ERROR: Invalid argument, try [save|restore|list]" 2>&1 exit 1 ;; esac