From ca98778c9c40a42d1cfdf8d87645e3dba6ede7d7 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 23 Nov 2011 13:36:48 -0600 Subject: [PATCH] * usr/bin/byobu-janitor: LP: #867746 - create a whitelist of distros carrying the LP: #315871 fix - default to monochrome for other distros on initial profile creation --- debian/changelog | 3 +++ usr/bin/byobu-janitor | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 47127a3f..60a81aef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,9 @@ byobu (4.50) unreleased; urgency=low usr/share/man/man1/byobu.1: LP: #888248 - add Alt-Insert in tmux for "paste" - document scrollback/copy/paste procedures + * usr/bin/byobu-janitor: LP: #867746 + - create a whitelist of distros carrying the LP: #315871 fix + - default to monochrome for other distros on initial profile creation -- Dustin Kirkland Fri, 18 Nov 2011 15:41:36 -0600 diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index 3f404ef6..e03866d4 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -52,10 +52,20 @@ if ! grep -qs "^screen_upper_left=" "$BYOBU_CONFIG_DIR/status"; then rm -f "$BYOBU_CONFIG_DIR/status" "$BYOBU_CONFIG_DIR/statusrc" fi +# NOTE: Older version of Screen have an arbitrary limit of only being able +# to change colors 16 times in this 'hardstatus string'. +# Whitelist Debian and Ubuntu where the fix has been released. +# Also committed in Upstream git, but not yet released. +# * http://savannah.gnu.org/bugs/?22146 +MC=1 +if command -v egrep >/dev/null; then + egrep -qsi "ubuntu|debian" /etc/issue 2>/dev/null && MC=0 || true +fi + # Affects: First runs with no configuration # Seed the configuration # Setup initial local user configuration -[ -r "$BYOBU_CONFIG_DIR/color" ] || printf "BACKGROUND=k\nFOREGROUND=w\nMONOCHROME=0" > "$BYOBU_CONFIG_DIR/color" +[ -r "$BYOBU_CONFIG_DIR/color" ] || printf "BACKGROUND=k\nFOREGROUND=w\nMONOCHROME=$MC" > "$BYOBU_CONFIG_DIR/color" [ -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" [ -r "$BYOBU_CONFIG_DIR/keybindings" ] || echo "source \$BYOBU_PREFIX/share/$PKG/keybindings/common" > "$BYOBU_CONFIG_DIR/keybindings"