Bläddra i källkod

modify emacs and tmux title tweaks

pull/1/head
10sr 13 år sedan
förälder
incheckning
49742ba23e
2 ändrade filer med 5 tillägg och 4 borttagningar
  1. +4
    -4
      emacs.el
  2. +1
    -0
      tmux.conf

+ 4
- 4
emacs.el Visa fil

@@ -41,7 +41,7 @@ Each function is called with two args, the filename before changing and after ch


(defun dllib-if-unfound (url &optional bite-compile-p force-download-p) (defun dllib-if-unfound (url &optional bite-compile-p force-download-p)
"If library does not exist, download it from URL and locate it in \"~/emacs.d/lisp/\". "If library does not exist, download it from URL and locate it in \"~/emacs.d/lisp/\".
Return nil if library unfound and downloading failed, otherwise the path where the library installed."
Return nil if library unfound and failed to download, otherwise the path where the library installed."
(let* ((dir (expand-file-name (concat user-emacs-directory "lisp/"))) (let* ((dir (expand-file-name (concat user-emacs-directory "lisp/")))
(lib (file-name-sans-extension (file-name-nondirectory url))) (lib (file-name-sans-extension (file-name-nondirectory url)))
(lpath (concat dir lib ".el")) (lpath (concat dir lib ".el"))
@@ -79,18 +79,18 @@ Return nil if library unfound and downloading failed, otherwise the path where t
"] " "] "
'(:eval (symbol-name last-command)))) '(:eval (symbol-name last-command))))


(setq set-terminal-title-regexp "^\\(xterm\\|screen\\)")
(defun set-terminal-title (&rest args) (defun set-terminal-title (&rest args)
"" ""
(interactive "sString to set as title: ") (interactive "sString to set as title: ")
(let ((tty (frame-parameter nil (let ((tty (frame-parameter nil
'tty-type))) 'tty-type)))
(when (and tty (when (and tty
(eq t (compare-strings "xterm" 0 5
tty 0 5)))
(string-match set-terminal-title-regexp
tty))
(send-string-to-terminal (apply 'concat (send-string-to-terminal (apply 'concat
"\033]0;" "\033]0;"
`(,@args "\007")))))) `(,@args "\007"))))))

(defun my-set-terminal-title () (defun my-set-terminal-title ()
"" ""
(set-terminal-title "[" (set-terminal-title "["


+ 1
- 0
tmux.conf Visa fil

@@ -7,4 +7,5 @@ set -g default-terminal screen-256color
#set -g status-left "" #set -g status-left ""
#set -g status-right "#H | %a, %d %b %Y %T %z #(tmux -V)" #set -g status-right "#H | %a, %d %b %Y %T %z #(tmux -V)"
set -g status-right "#H | #(tmux -V) " set -g status-right "#H | #(tmux -V) "
set -g set-titles on
setw -g mode-keys vi setw -g mode-keys vi

Laddar…
Avbryt
Spara