From 2313a192c5e98858e0030731dc8fcf897fdfe1b7 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 29 Jun 2011 01:00:06 +0000 Subject: [PATCH] * usr/bin/byobu-ctrl-a, usr/bin/byobu-quiet, usr/bin/byobu-select- profile, usr/bin/byobu-select-session, usr/bin/byobu-silent, usr/bin/byobu-status: - fix up a few more $HOME/.$PKG refs to $BYOBU_CONFIG_DIR --- debian/changelog | 4 ++++ usr/bin/byobu-ctrl-a | 4 ++-- usr/bin/byobu-quiet | 6 +++--- usr/bin/byobu-select-profile | 2 +- usr/bin/byobu-select-session | 3 ++- usr/bin/byobu-silent | 4 ++-- usr/bin/byobu-status | 2 +- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9b017700..2b9c8057 100644 --- a/debian/changelog +++ b/debian/changelog @@ -42,6 +42,10 @@ byobu (4.17) unreleased; urgency=low usr/share/byobu/profiles/byoburc, usr/share/byobu/profiles/common, usr/share/byobu/profiles/screenrc, usr/share/man/man1/byobu.1: - fix up a few more references to BYOBU_CONFIG_DIR + * usr/bin/byobu-ctrl-a, usr/bin/byobu-quiet, usr/bin/byobu-select- + profile, usr/bin/byobu-select-session, usr/bin/byobu-silent, + usr/bin/byobu-status: + - fix up a few more $HOME/.$PKG refs to $BYOBU_CONFIG_DIR -- Dustin Kirkland Mon, 27 Jun 2011 14:14:17 +0000 diff --git a/usr/bin/byobu-ctrl-a b/usr/bin/byobu-ctrl-a index 80881daf..fb704211 100755 --- a/usr/bin/byobu-ctrl-a +++ b/usr/bin/byobu-ctrl-a @@ -21,7 +21,7 @@ PKG="byobu" [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX . "${BYOBU_PREFIX}/lib/${PKG}/.common" -keybindings="$HOME/.$PKG/keybindings" +keybindings="$BYOBU_CONFIG_DIR/keybindings" touch "$keybindings" while true; do @@ -57,7 +57,7 @@ while true; do ;; esac done -screen -X at 0 source "$HOME/.$PKG/profile" +screen -X at 0 source "$BYOBU_CONFIG_DIR/profile" echo "To modify this behavior again later, run 'byobu-ctrl-a'" echo diff --git a/usr/bin/byobu-quiet b/usr/bin/byobu-quiet index 28935ab9..8acdd239 100755 --- a/usr/bin/byobu-quiet +++ b/usr/bin/byobu-quiet @@ -24,15 +24,15 @@ PKG="byobu" FLAG="$BYOBU_CONFIG_DIR/status.disable" # Clean up environment -sed -i "/hardstatus/d" "$HOME/.$PKG/keybindings" || true +sed -i "/hardstatus/d" "$BYOBU_CONFIG_DIR/keybindings" || true if [ "$1" = "--undo" ]; then rm -f "$FLAG" else touch "$FLAG" # BUG: Need to make this dynamic and following status="$USER@$(hostname)" - echo "hardstatus lastline '$status'" >> "$HOME/.$PKG/keybindings" + echo "hardstatus lastline '$status'" >> "$BYOBU_CONFIG_DIR/keybindings" fi -screen -X at 0 source "$HOME/.$PKG/profile" +screen -X at 0 source "$BYOBU_CONFIG_DIR/profile" # vi: syntax=sh ts=4 noexpandtab diff --git a/usr/bin/byobu-select-profile b/usr/bin/byobu-select-profile index d4e17379..8930d6f7 100755 --- a/usr/bin/byobu-select-profile +++ b/usr/bin/byobu-select-profile @@ -61,7 +61,7 @@ EOT } # Initialize variables -FILE="$HOME"/."$PKG"/color +FILE="$BYOBU_CONFIG_DIR/color" PROFILE="$BYOBU_CONFIG_DIR/profile" [ -r "$PROFILE" ] || ln -sf $BYOBU_PREFIX/share/$PKG/profiles/common "$PROFILE" selected=-1 diff --git a/usr/bin/byobu-select-session b/usr/bin/byobu-select-session index 500502c0..1ea14ae3 100755 --- a/usr/bin/byobu-select-session +++ b/usr/bin/byobu-select-session @@ -23,6 +23,7 @@ import commands, os, re, sys PKG = "byobu" SHELL = os.getenv("SHELL", "/bin/bash") HOME=os.getenv("HOME") +BYOBU_CONFIG_DIR=os.getenv("BYOBU_CONFIG_DIR") choice = "" sessions = [] text = [] @@ -39,7 +40,7 @@ if output: sessions.append(items[1]) i += 1 -show_shell = os.path.exists("%s/.%s/.always-select" % (HOME, PKG)) +show_shell = os.path.exists("%s/.always-select" % (BYOBU_CONFIG_DIR)) if i>1 or show_shell: sessions.append("NEW") text.append("Create a new Byobu session") diff --git a/usr/bin/byobu-silent b/usr/bin/byobu-silent index a4f26db5..cbe652e5 100755 --- a/usr/bin/byobu-silent +++ b/usr/bin/byobu-silent @@ -24,12 +24,12 @@ PKG="byobu" FLAG="$BYOBU_CONFIG_DIR/status.disable" # Clean up environment -sed -i "/caption/d" "$HOME/.$PKG/keybindings" || true +sed -i "/caption/d" "$BYOBU_CONFIG_DIR/keybindings" || true if [ "$1" = "--undo" ]; then rm -f "$FLAG" else touch "$FLAG" - echo "caption splitonly ''" >> "$HOME/.$PKG/keybindings" + echo "caption splitonly ''" >> "$BYOBU_CONFIG_DIR/keybindings" fi exec byobu-quiet "$@" diff --git a/usr/bin/byobu-status b/usr/bin/byobu-status index c7971353..c8aaf274 100755 --- a/usr/bin/byobu-status +++ b/usr/bin/byobu-status @@ -90,7 +90,7 @@ case "$P" in printf "$ESC{= $BACKGROUND$FOREGROUND}" ;; *) - [ -f "$HOME/.$PKG/status.disable" ] && exit 0 + [ -f "$BYOBU_CONFIG_DIR/status.disable" ] && exit 0 eval x="\$$P" || exit 1 [ "$x" = "1" ] || exit 0 shift