-if [ "$TERM" == "xterm" ]; then
- prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')"
+which xprop &>/dev/null
+if [ $? -eq 0 ]; then
+ if [ "$TERM" == "xterm" ]; then
+ prior_title="$(xprop -id $WINDOWID | perl -nle 'print $1 if /^WM_NAME.+= \"(.*)\"$/')"
+ fi