From fc212349154de55af022ddc3003402b5c60e6efe Mon Sep 17 00:00:00 2001 From: aristocratos Date: Fri, 12 Jun 2020 16:17:32 +0200 Subject: [PATCH] Changed terminal title to include original title if $TERMINAL_TITLE is set --- bashtop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bashtop b/bashtop index e3977bc..3723e4c 100755 --- a/bashtop +++ b/bashtop @@ -317,7 +317,7 @@ init_() { #? Collect needed information and set options before startig main loop #* Set terminal options, save and clear screen saved_stty="$(${stty} -g)" echo -en "${alt_screen}${hide_cursor}${clear_screen}" - echo -en "\033]0;BashTOP\a" + echo -en "\033]0;${TERMINAL_TITLE} BashTOP\a" ${stty} -echo #* Wait for resize if terminal size is smaller then 80x24 @@ -620,7 +620,7 @@ sleep_() { #? Restore terminal options, stop and send to background if caught SI resume_() { #? Set terminal options and resume if caught SIGCONT ('fg' from terminal) sleepy=0 echo -en "${alt_screen}${hide_cursor}${clear_screen}" - echo -en "\033]0;BashTOP\a" + echo -en "\033]0;${TERMINAL_TITLE} BashTOP\a" ${stty} -echo if [[ -n $pause_screen ]]; then