Browse Source

fix terminal-title prefs

undefined
10sr 11 years ago
parent
commit
7896c121d7
2 changed files with 25 additions and 8 deletions
  1. +21
    -4
      emacs.el
  2. +4
    -4
      shrc

+ 21
- 4
emacs.el View File

@@ -304,10 +304,27 @@ found, otherwise returns nil."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; title and mode-line ;; title and mode-line


;; (when (fetch-library
;; "https://raw.github.com/10sr/emacs-lisp/master/terminal-title.el"
;; t)
;; (require 'terminal-title nil t))
(when (fetch-library
"https://raw.github.com/10sr/emacs-lisp/master/terminal-title.el"
t)
(require 'terminal-title nil t)
;; if TERM is not screen use default value
(when (equal (car (split-string (frame-parameter nil
'tty-type)
"-"))
"screen")
(setq terminal-title-format
(if (getenv "SSH_CONNECTION")
'("em:"
user-login-name
"@"
system-name
":"
(file-name-nondirectory (directory-file-name
default-directory)))
'((file-name-nondirectory (directory-file-name
default-directory))))))
(terminal-title-mode))


(setq eol-mnemonic-dos "\\r\\n") (setq eol-mnemonic-dos "\\r\\n")
(setq eol-mnemonic-mac "\\r") (setq eol-mnemonic-mac "\\r")


+ 4
- 4
shrc View File

@@ -551,10 +551,10 @@ datestr(){
date +"$dfmt" date +"$dfmt"
} }


ssh(){
__my_set_screen_title ssh
command ssh "$@"
}
# ssh(){
# # __my_terminal_title ssh
# command ssh "$@"
# }


__ssh_with_cd(){ __ssh_with_cd(){
# __ssh_with_cd <host> <directory> [<arg> ...] # __ssh_with_cd <host> <directory> [<arg> ...]


Loading…
Cancel
Save