From 71416e063a7db9060614085dae8f374abf3b370d Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 4 May 2012 19:00:19 +0900 Subject: [PATCH] update set terminal title prefs --- bashrc | 6 +++--- emacs.el | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bashrc b/bashrc index e221b78..8965636 100755 --- a/bashrc +++ b/bashrc @@ -461,15 +461,15 @@ __my_prompt_function(){ # used by PS1 __my_set_title(){ title="$(echo $@)" case $TERM in - (rxvt*|xterm*|aterm) + (rxvt*|xterm*|aterm|screen*) test -t 1 && test -n "$DISPLAY" && test -z "$EMACS" && - echo -n -e "\033]0;${1}\007" + echo -n -e "\033]0;${title}\007" ;; esac } -# export PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD};${PROMPT_COMMAND}" +export PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD};" # copied from https://wiki.archlinux.org/index.php/X_resources invader(){ diff --git a/emacs.el b/emacs.el index 9154f5e..cb16d7a 100644 --- a/emacs.el +++ b/emacs.el @@ -79,7 +79,7 @@ Return nil if library unfound and failed to download, otherwise the path where t "] " '(:eval (symbol-name last-command)))) -(setq set-terminal-title-regexp "^\\(xterm\\|screen\\)") +(setq set-terminal-title-regexp "^\\(rxvt\\|xterm\\|aterm$\\|screen\\)") (defun set-terminal-title (&rest args) "" (interactive "sString to set as title: ")