projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
63fc946
)
fixed for cases without WINDOWID
author
Chris Koeritz
<fred@gruntose.com>
Sun, 22 Jan 2017 21:26:30 +0000
(16:26 -0500)
committer
Chris Koeritz
<fred@gruntose.com>
Sun, 22 Jan 2017 21:26:30 +0000
(16:26 -0500)
scripts/tty/terminal_titler.sh
patch
|
blob
|
history
diff --git
a/scripts/tty/terminal_titler.sh
b/scripts/tty/terminal_titler.sh
index 3751ba24f781dfab48fa63dd481fc89722645ed2..e4262498080b5f89d688d2efbd15c2fa00985e65 100644
(file)
--- a/
scripts/tty/terminal_titler.sh
+++ b/
scripts/tty/terminal_titler.sh
@@
-81,7
+81,8
@@
function save_terminal_title()
# save the former terminal title if we're running in X with xterm.
which xprop &>/dev/null
if [ $? -eq 0 ]; then
# save the former terminal title if we're running in X with xterm.
which xprop &>/dev/null
if [ $? -eq 0 ]; then
- if [[ "$TERM" =~ .*"xterm".* ]]; then
+ # make sure we're actually using xterm *and* that we have a window ID.
+ if [[ "$TERM" =~ .*"xterm".* && ! -z "$WINDOWID" ]]; then
local prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')"
if [ ! -z "$prior_title" ]; then
#echo "saving prior terminal title as '$prior_title'"
local prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')"
if [ ! -z "$prior_title" ]; then
#echo "saving prior terminal title as '$prior_title'"