From 0b317a0652e7f5eeb29247a313412829f92df8ea Mon Sep 17 00:00:00 2001 From: Javier Merino Date: Wed, 30 Aug 2017 13:41:41 +0200 Subject: [PATCH] Allow ALTERNATE title on terminal I like byobu to set my terminal title for me, but I would like to be allowed to set the title I want. This way, if I call byobu from ".profile" the way I wrote down, I will get HOSTNAME as title. :-) BYOBU_ALT_TITLE='$(echo ${HOSTNAME:-$(hostname)} | /usr/bin/tr '\''[:lower:]'\'' '\''[:upper:]'\'')' . /usr/bin/byobu-launch Hope it could be interesting for someone. --- usr/bin/byobu.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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