From 838aa65d5782fadce86533d84d8b57e61f71cc19 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 28 Jul 2011 00:49:27 -0500 Subject: [PATCH] * usr/bin/byobu-janitor, usr/bin/byobu-status, usr/lib/byobu/.constants, usr/share/byobu/profiles/tmux: - use new color methods, better tmux support - quiet killing of statusd --- debian/changelog | 4 ++++ usr/bin/byobu-janitor | 2 +- usr/bin/byobu-status | 22 ---------------------- usr/lib/byobu/.constants | 2 ++ usr/share/byobu/profiles/tmux | 6 +++--- 5 files changed, 10 insertions(+), 26 deletions(-) diff --git a/debian/changelog b/debian/changelog index 92472d99..8ade19a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,10 @@ byobu (4.23) unreleased; urgency=low - use python's default parameter for os.getenv(), LP: #816026 * usr/bin/byobu-config: - simple var name updates + * usr/bin/byobu-janitor, usr/bin/byobu-status, + usr/lib/byobu/.constants, usr/share/byobu/profiles/tmux: + - use new color methods, better tmux support + - quiet killing of statusd -- Dustin Kirkland Sun, 24 Jul 2011 14:23:38 -0500 diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index b3b06388..28b66faf 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -120,7 +120,7 @@ if grep -qs " shell$" "$BYOBU_CONFIG_DIR/windows"; then fi # Affects: Upgrades from <= byobu 4.22 -killall -u $USER byobu-statusd || true +killall -u $USER byobu-statusd >/dev/null 2>&1 || true # Clean up flag rm -f "$FLAG" diff --git a/usr/bin/byobu-status b/usr/bin/byobu-status index b579f400..1cb9f1ec 100755 --- a/usr/bin/byobu-status +++ b/usr/bin/byobu-status @@ -21,28 +21,6 @@ PKG="byobu" [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX . "${BYOBU_PREFIX}/lib/${PKG}/.common" -# Define colors -ESC="\005" -color() { - case "$1" in - "") return 0 ;; - -) printf "$ESC{-}" ;; - --) printf "$ESC{-} " ;; - esc) printf "$ESC" ;; - bold1) printf "$ESC{=b }" ;; - bold2) printf "$ESC{+b }" ;; - none) printf "$ESC{= }" ;; - invert) printf "$ESC{=r }" ;; - *) - if [ "$#" = "2" ]; then - [ "$MONOCHROME" = "1" ] && printf "$ESC{= }" || printf "$ESC{= $1$2}" - else - [ "$MONOCHROME" = "1" ] && printf "$ESC{=$1 }" || printf "$ESC{=$1 $2$3}" - fi - ;; - esac -} - # Source configurations for i in "${BYOBU_PREFIX}/share/$PKG/status/status" "${BYOBU_PREFIX}/share/$PKG/status/statusrc" "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc" "$BYOBU_CONFIG_DIR/color"; do [ -r "$i" ] && . "$i" diff --git a/usr/lib/byobu/.constants b/usr/lib/byobu/.constants index 9198dede..e249ee11 100755 --- a/usr/lib/byobu/.constants +++ b/usr/lib/byobu/.constants @@ -52,10 +52,12 @@ case "$BYOBU_BACKEND" in tmux) export BYOBU_BACKEND BYOBU_ARG_VERSION="-V" + ESC= ;; *) export BYOBU_BACKEND="screen" BYOBU_ARG_VERSION="-v" + ESC="\005" ;; esac diff --git a/usr/share/byobu/profiles/tmux b/usr/share/byobu/profiles/tmux index 313293dd..b749fc92 100644 --- a/usr/share/byobu/profiles/tmux +++ b/usr/share/byobu/profiles/tmux @@ -62,10 +62,10 @@ set -g terminal-overrides 'xterm*:smcup@:rmcup@' set -g default-command /bin/bash set -g status-bg black set -g status-fg white -set -g status-interval 1 +set -g status-interval 10 set -g status-left-length 256 set -g status-right-length 256 -set -g status-left '#(byobu-status-print 3)[' -set -g status-right ']#(byobu-status-print 4)' +set -g status-left '#(byobu-status logo)#(byobu-status release)[' +set -g status-right ']#(byobu-status date)#(byobu-status time)' set -g message-bg magenta set -g message-fg white