From f073685a5e2beeb56fd0548f00085469a9870abd Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 3 Oct 2012 01:51:27 +0900 Subject: [PATCH] update title format for xterm --- emacs.el | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/emacs.el b/emacs.el index 4e8eeb5..e22913c 100644 --- a/emacs.el +++ b/emacs.el @@ -249,20 +249,27 @@ drill-instructor.el" `(,@args "\007")))))) (defun my-set-terminal-title () "" - (set-terminal-title (abbreviate-file-name (or buffer-file-name + (set-terminal-title "[" + user-login-name + "@" + system-name + ":" + (abbreviate-file-name (or buffer-file-name default-directory)) - " | " - (number-to-string (length - (buffer-list-not-start-with-space))) - " buffers in " - (frame-parameter nil 'name) - " [" + "][" invocation-name " " emacs-version " " (symbol-name system-type) - "] ")) + "][" + "FRAME:" + (frame-parameter nil 'name) + ":" + (number-to-string (length + (buffer-list-not-start-with-space))) + "]" + )) (add-hook 'buffer-file-changed-functions (lambda (p c) (my-set-terminal-title)))