diff --git a/debian/changelog b/debian/changelog index 7500c02c..834cfe35 100644 --- a/debian/changelog +++ b/debian/changelog @@ -32,6 +32,8 @@ byobu (5.127) unreleased; urgency=medium usr/share/byobu/pixmaps/byobu.64.png, usr/share/byobu/pixmaps/byobu.png: - re-render png's, as Chrome started rendering middle color wrong + * usr/bin/byobu-select-profile.in, usr/share/man/man1/byobu-select- + profile.1: LP: #1717746 -- Dustin Kirkland Sun, 27 May 2018 18:07:11 -0500 diff --git a/usr/bin/byobu-select-profile.in b/usr/bin/byobu-select-profile.in index b79b0887..6f88960d 100755 --- a/usr/bin/byobu-select-profile.in +++ b/usr/bin/byobu-select-profile.in @@ -59,13 +59,14 @@ done usage () { cat </dev/null && printf " " || printf " " - echo "$i. $x" - i=$(expr $i + 1) - [ "$simple" = "$x" ] && simple=$i - done - echo - if [ -z "$selected" -a -n "$simple" ]; then - selected="$simple" - elif ! test $selected -gt 0 2>/dev/null; then - printf "`gettext 'Choose'` 1-$i [$simple]: " - selected=`head -n1` - elif ! test $selected -le $i 2>/dev/null; then - printf "`gettext 'Choose'` 1-$i [$simple]: " - selected=`head -n1` - else - i=1 - for color in $COLORS; do - [ "$i" = "$selected" ] && break - i=$(expr $i + 1) - done - echo `gettext "Selected"` "$which [$color]" - case "$BYOBU_BACKEND" in - screen) - setcolor_screen "$which" "$color" - ;; - tmux|*) - setcolor_tmux "$color" - ;; - esac - return 0 - fi - done -} - getletter() { count=$(echo "$1" | wc -c) if [ "$count" = "2" ]; then @@ -214,12 +161,7 @@ setcolor_tmux() { } if [ $# -eq 0 ]; then - prompt "background" - case "$BYOBU_BACKEND" in - screen) - prompt "foreground" - ;; - esac + usage else while true; do case "$1" in @@ -231,11 +173,6 @@ else setcolor_screen "foreground" "$2" shift 2 ;; - -l|--list) - listprofiles - shift - break - ;; -h|--hostname) color=$(hostname | $HASH | head -c 6) setcolor_tmux "$color" diff --git a/usr/share/man/man1/byobu-select-profile.1 b/usr/share/man/man1/byobu-select-profile.1 index 6de5128c..493b27bf 100644 --- a/usr/share/man/man1/byobu-select-profile.1 +++ b/usr/share/man/man1/byobu-select-profile.1 @@ -3,7 +3,23 @@ byobu\-select\-profile \- select your Byobu foreground and background colors .SH DESCRIPTION -\fBbyobu\-select\-profile\fP is an application that lists the available Byobu colors and allows you to select the foreground and background color. +\fBbyobu\-select\-profile\fP is an application that changes Byobu's status bar foreground and background colors + +.SH OPTIONS + + -l,--list list available profiles + + -b,--background COLOR set the background color + + -f,--foreground COLOR set the foreground color + + -h,--hostnmae set the colors based on a hash of the hostname + + -i,--ip set the colors based on a hash of the ip + + -r,--random set the colors randomly + + --help this help .SH "SEE ALSO" .PD 0