From 05a1523173903b70ea63d7e3eb5c213fb6b460e0 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 17 Mar 2014 09:26:26 +0900 Subject: [PATCH] * usr/bin/byobu-janitor.in, usr/lib/byobu/include/colors, usr/lib/byobu/include/constants, usr/lib/byobu/include/Makefile.am, usr/lib/byobu/include/shutil, usr/share/byobu/profiles/tmux: - split the color definitions into their own file - have the constants source that file - use that file when creating the user's local color palette - use a bit more orange --- debian/changelog | 7 +++++++ usr/bin/byobu-janitor.in | 2 +- usr/lib/byobu/include/Makefile.am | 2 +- usr/lib/byobu/include/colors | 29 +++++++++++++++++++++++++++++ usr/lib/byobu/include/constants | 10 +--------- usr/lib/byobu/include/shutil | 2 +- usr/share/byobu/profiles/tmux | 6 +++--- 7 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 usr/lib/byobu/include/colors diff --git a/debian/changelog b/debian/changelog index 140af6c5..1dc4eb7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,13 @@ byobu (5.75) unreleased; urgency=medium * usr/share/byobu/profiles/bashrc: LP: #1259621 - add a visual queue in the PS1 command prompt when running as the root user; prepend "!" in front of "root" + * usr/bin/byobu-janitor.in, usr/lib/byobu/include/colors, + usr/lib/byobu/include/constants, usr/lib/byobu/include/Makefile.am, + usr/lib/byobu/include/shutil, usr/share/byobu/profiles/tmux: + - split the color definitions into their own file + - have the constants source that file + - use that file when creating the user's local color palette + - use a bit more orange -- Dustin Kirkland Sun, 16 Mar 2014 12:46:36 -0700 diff --git a/usr/bin/byobu-janitor.in b/usr/bin/byobu-janitor.in index 071d0955..20ae685d 100755 --- a/usr/bin/byobu-janitor.in +++ b/usr/bin/byobu-janitor.in @@ -67,7 +67,7 @@ MC=0 # Seed the configuration # Setup initial local user configuration [ -r "$BYOBU_CONFIG_DIR/color" ] || printf "BACKGROUND=k\nFOREGROUND=w\nMONOCHROME=$MC" > "$BYOBU_CONFIG_DIR/color" -[ -r "$BYOBU_CONFIG_DIR/color.tmux" ] || printf "BYOBU_DARK=black\nBYOBU_LIGHT=white\nBYOBU_ACCENT=magenta\nBYOBU_HIGHLIGHT=red\nMONOCHROME=$MC" > "$BYOBU_CONFIG_DIR/color.tmux" +[ -r "$BYOBU_CONFIG_DIR/color.tmux" ] || sed -e "s/^#.*//" -e "/^\s*$/d" "$BYOBU_PREFIX/lib/$PKG/include/colors" > "$BYOBU_CONFIG_DIR/color.tmux" [ -r "$BYOBU_CONFIG_DIR/datetime.tmux" ] || printf 'BYOBU_DATE="%%Y-%%m-%%d "\nBYOBU_TIME="%%H:%%M:%%S"\n' > "$BYOBU_CONFIG_DIR/datetime.tmux" [ -r "$BYOBU_CONFIG_DIR/profile" ] || echo "source \$BYOBU_PREFIX/share/$PKG/profiles/common" > "$BYOBU_CONFIG_DIR/profile" [ -r "$BYOBU_CONFIG_DIR/profile.tmux" ] || echo "source \$BYOBU_PREFIX/share/$PKG/profiles/tmux" > "$BYOBU_CONFIG_DIR/profile.tmux" diff --git a/usr/lib/byobu/include/Makefile.am b/usr/lib/byobu/include/Makefile.am index 87e9b8a5..a2d2f16a 100644 --- a/usr/lib/byobu/include/Makefile.am +++ b/usr/lib/byobu/include/Makefile.am @@ -1,2 +1,2 @@ inclibdirdir = $(prefix)/lib/@PACKAGE@/include -inclibdir_SCRIPTS = common config.py constants cycle-status dirs icons mondrian notify_osd shutil ec2instancespricing.py select-session.py tmux-detach-all-but-current-client tmux-send-command-to-all-panes tmux-send-command-to-all-windows toggle-utf8 +inclibdir_SCRIPTS = common colors config.py constants cycle-status dirs icons mondrian notify_osd shutil ec2instancespricing.py select-session.py tmux-detach-all-but-current-client tmux-send-command-to-all-panes tmux-send-command-to-all-windows toggle-utf8 diff --git a/usr/lib/byobu/include/colors b/usr/lib/byobu/include/colors new file mode 100644 index 00000000..45f8934a --- /dev/null +++ b/usr/lib/byobu/include/colors @@ -0,0 +1,29 @@ +#!/bin/sh +# +# colors: some color values needed by all library status scripts +# +# Copyright (C) 2014 Dustin Kirkland +# +# Authors: Dustin Kirkland +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Default colors +# Inspired by http://design.ubuntu.com/brand/colour-palette +export BYOBU_DARK="\#333333" # Cool grey +export BYOBU_LIGHT="\#EEEEEE" # Warm white +export BYOBU_ACCENT="\#75507B" # Aubergine +export BYOBU_HIGHLIGHT="\#DD4814" # Ubuntu orange +export BYOBU_WINDOW_NAME="-" +export BYOBU_DATE="%Y-%m-%d " +export BYOBU_TIME="%H:%M:%S" diff --git a/usr/lib/byobu/include/constants b/usr/lib/byobu/include/constants index 143195c3..ebd457d9 100755 --- a/usr/lib/byobu/include/constants +++ b/usr/lib/byobu/include/constants @@ -21,6 +21,7 @@ PKG="byobu" . "${BYOBU_PREFIX}/lib/${PKG}/include/icons" +. "${BYOBU_PREFIX}/lib/${PKG}/include/colors" PCT="%" @@ -63,12 +64,3 @@ if [ -z "$BYOBU_PYTHON" ]; then export BYOBU_PYTHON="python" fi fi - -# Default colors -export BYOBU_DARK="black" -export BYOBU_LIGHT="white" -export BYOBU_ACCENT="#75507B" # AUBERGINE -export BYOBU_HIGHLIGHT="#DD4814" # UBUNTU ORANGE -export BYOBU_WINDOW_NAME="-" -export BYOBU_DATE="%Y-%m-%d " -export BYOBU_TIME="%H:%M:%S" diff --git a/usr/lib/byobu/include/shutil b/usr/lib/byobu/include/shutil index ba2e1129..895f2089 100755 --- a/usr/lib/byobu/include/shutil +++ b/usr/lib/byobu/include/shutil @@ -69,7 +69,7 @@ color_map() { "M") _RET="brightmagenta" ;; "C") _RET="brightcyan" ;; "W") _RET="brightwhite" ;; - *) _RET= ;; + *) _RET="$1" ;; esac } diff --git a/usr/share/byobu/profiles/tmux b/usr/share/byobu/profiles/tmux index 6d4e0761..9f3a9fe3 100644 --- a/usr/share/byobu/profiles/tmux +++ b/usr/share/byobu/profiles/tmux @@ -39,9 +39,9 @@ set-window-option -g xterm-keys on #set-option -g set-titles on #set-option -g set-titles-string '#(whoami)@#H - byobu (#S)' -set-option -g pane-active-border-bg $BYOBU_ACCENT -set-option -g pane-active-border-fg $BYOBU_ACCENT -set-option -g pane-border-fg $BYOBU_LIGHT +set-option -g pane-active-border-bg $BYOBU_HIGHLIGHT +set-option -g pane-active-border-fg $BYOBU_HIGHLIGHT +set-option -g pane-border-fg $BYOBU_HIGHLIGHT set-option -g history-limit 10000 set-option -g display-panes-time 150 set-option -g display-panes-colour $BYOBU_ACCENT