From 999ba7a69b3a307586f723d198d2a975393bcf04 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Tue, 17 Jan 2017 22:19:12 -0500 Subject: [PATCH] debugging still non-working labeller --- customize/fred/scripts/ssh.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/customize/fred/scripts/ssh.sh b/customize/fred/scripts/ssh.sh index 2730baa3..3dc6caf5 100644 --- a/customize/fred/scripts/ssh.sh +++ b/customize/fred/scripts/ssh.sh @@ -6,11 +6,14 @@ source "$FEISTY_MEOW_LOADING_DOCK/custom/scripts/pick_credentials.sh" if [ -z "$PRIOR_TERMINAL_TITLE" ]; then # save the former terminal title if we're running in X with xterm. - PRIOR_TERMINAL_TITLE= +# PRIOR_TERMINAL_TITLE= which xprop &>/dev/null if [ $? -eq 0 ]; then if [[ "$TERM" =~ .*"xterm".* ]]; then PRIOR_TERMINAL_TITLE="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')" + +echo "no prior title existed, so setting prior title to '$PRIOR_TERMINAL_TITLE'" + fi fi fi @@ -42,7 +45,7 @@ if [ $? -eq 0 ]; then echo prior title nil new label bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh else -echo "using old prior title of '$PRIOR_TERMINAL_TITLE'" +echo "using prior title of '$PRIOR_TERMINAL_TITLE'" bash $FEISTY_MEOW_SCRIPTS/tty/set_term_title.sh "$PRIOR_TERMINAL_TITLE" # remove the value for this, since we did our job on it. unset PRIOR_TERMINAL_TITLE -- 2.34.1