From 85a5d32eb91ea164fd387ff0f394fd65f1aeb683 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 30 Jun 2011 09:16:41 +0000 Subject: [PATCH] * etc/byobu/backend, usr/lib/byobu/.constants: - add support for storing byobu backend configuration (screen|tmux) * debian/control: start suggesting tmux --- debian/changelog | 3 +++ debian/control | 2 +- etc/byobu/backend | 2 ++ usr/lib/byobu/.constants | 9 ++++++++- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 etc/byobu/backend diff --git a/debian/changelog b/debian/changelog index 39a271ea..ad7474cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,9 @@ byobu (4.18) unreleased; urgency=low * === removed directory usr/sbin, usr/sbin/byobu-classroom => experimental/byobu-classroom: - move the classroom to experimental (about to be an ensemble formula) + * etc/byobu/backend, usr/lib/byobu/.constants: + - add support for storing byobu backend configuration (screen|tmux) + * debian/control: start suggesting tmux -- Dustin Kirkland Wed, 29 Jun 2011 02:26:28 +0000 diff --git a/debian/control b/debian/control index 2d20c25a..b5d52cdf 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Vcs-Bzr: http://bazaar.launchpad.net/~kirkland/byobu/trunk Package: byobu Architecture: all Depends: ${misc:Depends}, debconf (>= 0.5) | debconf-2.0, screen, gettext-base, python, python-newt (>= 0.52.2-11) -Suggests: apport, vim, w3m, po-debconf, update-notifier-common, lsb-release +Suggests: apport, vim, w3m, po-debconf, update-notifier-common, lsb-release, tmux Provides: screen-profiles, screen-profiles-extras, byobu-extras Replaces: screen-profiles (<< 2.0), screen-profiles-extras (<< 2.0), byobu-extras (<< 2.17) Breaks: screen-profiles (<< 2.0), screen-profiles-extras (<< 2.0), byobu-extras (<< 2.17) diff --git a/etc/byobu/backend b/etc/byobu/backend new file mode 100644 index 00000000..27ee2ae7 --- /dev/null +++ b/etc/byobu/backend @@ -0,0 +1,2 @@ +# BYOBU_BACKEND can currently be "screen" or "tmux" +BYOBU_BACKEND="screen" diff --git a/usr/lib/byobu/.constants b/usr/lib/byobu/.constants index 92c5707b..0780bc0d 100755 --- a/usr/lib/byobu/.constants +++ b/usr/lib/byobu/.constants @@ -21,7 +21,14 @@ PKG="byobu" # Support two different backends (screen/tmux) -[ -z "$BYOBU_BACKEND" ] && export BYOBU_BACKEND="screen" || export BYOBU_BACKEND +if [ -z "$BYOBU_BACKEND" ]; + [ -r "/etc/byobu/backend" ] && . "/etc/byobu/backend" + [ -r "$BYOBU_CONFIG_DIR/backend" ] && . "$BYOBU_CONFIG_DIR/backend" +fi +case "$BYOBU_BACKEND" in + screen|tmux) export BYOBU_BACKEND ;; + *) export BYOBU_BACKEND="screen" ;; +esac # Create and set the user configuration directory if [ -d "$XDG_CONFIG_HOME" ] && mkdir -p "$XDG_CONFIG_HOME/$PKG"; then