* 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
This commit is contained in:
Dustin Kirkland 2011-06-29 01:00:06 +00:00
commit 2313a192c5
7 changed files with 15 additions and 10 deletions

4
debian/changelog vendored
View file

@ -42,6 +42,10 @@ byobu (4.17) unreleased; urgency=low
usr/share/byobu/profiles/byoburc, usr/share/byobu/profiles/common, usr/share/byobu/profiles/byoburc, usr/share/byobu/profiles/common,
usr/share/byobu/profiles/screenrc, usr/share/man/man1/byobu.1: usr/share/byobu/profiles/screenrc, usr/share/man/man1/byobu.1:
- fix up a few more references to BYOBU_CONFIG_DIR - 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 <kirkland@ubuntu.com> Mon, 27 Jun 2011 14:14:17 +0000 -- Dustin Kirkland <kirkland@ubuntu.com> Mon, 27 Jun 2011 14:14:17 +0000

View file

@ -21,7 +21,7 @@ PKG="byobu"
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
. "${BYOBU_PREFIX}/lib/${PKG}/.common" . "${BYOBU_PREFIX}/lib/${PKG}/.common"
keybindings="$HOME/.$PKG/keybindings" keybindings="$BYOBU_CONFIG_DIR/keybindings"
touch "$keybindings" touch "$keybindings"
while true; do while true; do
@ -57,7 +57,7 @@ while true; do
;; ;;
esac esac
done 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 "To modify this behavior again later, run 'byobu-ctrl-a'"
echo echo

View file

@ -24,15 +24,15 @@ PKG="byobu"
FLAG="$BYOBU_CONFIG_DIR/status.disable" FLAG="$BYOBU_CONFIG_DIR/status.disable"
# Clean up environment # Clean up environment
sed -i "/hardstatus/d" "$HOME/.$PKG/keybindings" || true sed -i "/hardstatus/d" "$BYOBU_CONFIG_DIR/keybindings" || true
if [ "$1" = "--undo" ]; then if [ "$1" = "--undo" ]; then
rm -f "$FLAG" rm -f "$FLAG"
else else
touch "$FLAG" touch "$FLAG"
# BUG: Need to make this dynamic and following # BUG: Need to make this dynamic and following
status="$USER@$(hostname)" status="$USER@$(hostname)"
echo "hardstatus lastline '$status'" >> "$HOME/.$PKG/keybindings" echo "hardstatus lastline '$status'" >> "$BYOBU_CONFIG_DIR/keybindings"
fi fi
screen -X at 0 source "$HOME/.$PKG/profile" screen -X at 0 source "$BYOBU_CONFIG_DIR/profile"
# vi: syntax=sh ts=4 noexpandtab # vi: syntax=sh ts=4 noexpandtab

View file

@ -61,7 +61,7 @@ EOT
} }
# Initialize variables # Initialize variables
FILE="$HOME"/."$PKG"/color FILE="$BYOBU_CONFIG_DIR/color"
PROFILE="$BYOBU_CONFIG_DIR/profile" PROFILE="$BYOBU_CONFIG_DIR/profile"
[ -r "$PROFILE" ] || ln -sf $BYOBU_PREFIX/share/$PKG/profiles/common "$PROFILE" [ -r "$PROFILE" ] || ln -sf $BYOBU_PREFIX/share/$PKG/profiles/common "$PROFILE"
selected=-1 selected=-1

View file

@ -23,6 +23,7 @@ import commands, os, re, sys
PKG = "byobu" PKG = "byobu"
SHELL = os.getenv("SHELL", "/bin/bash") SHELL = os.getenv("SHELL", "/bin/bash")
HOME=os.getenv("HOME") HOME=os.getenv("HOME")
BYOBU_CONFIG_DIR=os.getenv("BYOBU_CONFIG_DIR")
choice = "" choice = ""
sessions = [] sessions = []
text = [] text = []
@ -39,7 +40,7 @@ if output:
sessions.append(items[1]) sessions.append(items[1])
i += 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: if i>1 or show_shell:
sessions.append("NEW") sessions.append("NEW")
text.append("Create a new Byobu session") text.append("Create a new Byobu session")

View file

@ -24,12 +24,12 @@ PKG="byobu"
FLAG="$BYOBU_CONFIG_DIR/status.disable" FLAG="$BYOBU_CONFIG_DIR/status.disable"
# Clean up environment # Clean up environment
sed -i "/caption/d" "$HOME/.$PKG/keybindings" || true sed -i "/caption/d" "$BYOBU_CONFIG_DIR/keybindings" || true
if [ "$1" = "--undo" ]; then if [ "$1" = "--undo" ]; then
rm -f "$FLAG" rm -f "$FLAG"
else else
touch "$FLAG" touch "$FLAG"
echo "caption splitonly ''" >> "$HOME/.$PKG/keybindings" echo "caption splitonly ''" >> "$BYOBU_CONFIG_DIR/keybindings"
fi fi
exec byobu-quiet "$@" exec byobu-quiet "$@"

View file

@ -90,7 +90,7 @@ case "$P" in
printf "$ESC{= $BACKGROUND$FOREGROUND}" printf "$ESC{= $BACKGROUND$FOREGROUND}"
;; ;;
*) *)
[ -f "$HOME/.$PKG/status.disable" ] && exit 0 [ -f "$BYOBU_CONFIG_DIR/status.disable" ] && exit 0
eval x="\$$P" || exit 1 eval x="\$$P" || exit 1
[ "$x" = "1" ] || exit 0 [ "$x" = "1" ] || exit 0
shift shift