From b8550dd4b7d60fb05911807fb798f87e10dafa5a Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 25 Sep 2017 10:22:11 -0500 Subject: [PATCH] * usr/bin/byobu.in: - add support for a BYOBU_ALT_TITLE variable, which enables users to set an alternate window title for their byobu session - https://github.com/dustinkirkland/byobu/pull/23 --- debian/changelog | 6 ++++++ usr/bin/byobu.in | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 28e574b0..8e2cb536 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,12 @@ byobu (5.123) unreleased; urgency=medium - use iw and ip rather than ifconfig and iwconfig, which are deprecated - https://github.com/dustinkirkland/byobu/pull/24 + [ Javier Merino ] + * usr/bin/byobu.in: + - add support for a BYOBU_ALT_TITLE variable, which enables users to + set an alternate window title for their byobu session + - https://github.com/dustinkirkland/byobu/pull/23 + -- Dustin Kirkland Thu, 17 Aug 2017 18:44:26 -0500 byobu (5.122-0ubuntu1) artful; urgency=medium diff --git a/usr/bin/byobu.in b/usr/bin/byobu.in index a9998970..78bdf551 100755 --- a/usr/bin/byobu.in +++ b/usr/bin/byobu.in @@ -100,7 +100,8 @@ byobu-janitor --force if [ -t 1 ]; then [ -r "$BYOBU_CONFIG_DIR/statusrc" ] && . "$BYOBU_CONFIG_DIR/statusrc" . $BYOBU_PREFIX/lib/$PKG/ip_address - [ -n "$BYOBU_NO_TITLE" ] || printf "\033]0;${USER}@$(hostname) ($(__ip_address t)) - ${PKG}\007" + BYOBU_TITLE=${BYOBU_ALT_TITLE:-'${USER}@${HOSTNAME:-$(hostname)} ($(__ip_address t)) - ${PKG}'} + [ -n "$BYOBU_NO_TITLE" ] || eval printf \"\\033\]0\;${BYOBU_TITLE}\\007\" fi # Drop a symlink to the ssh socket in $HOME, since we can ensure that exists