From acea7888ebcd1e4e8e7ad457b49dac07b94ea375 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 20 Mar 2014 16:24:35 +0900 Subject: [PATCH 1/2] emacs.el: fix terminal-title setups --- emacs.el | 62 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/emacs.el b/emacs.el index 03baa65..c170051 100644 --- a/emacs.el +++ b/emacs.el @@ -321,37 +321,37 @@ found, otherwise returns nil." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; title and mode-line -(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 - (if (getenv "TMUX") - ;; if use tmux locally just basename of current dir - (setq terminal-title-format - '((file-name-nondirectory (directory-file-name - default-directory)))) - (when (equal (car (split-string (frame-parameter nil - 'tty-type) - "-")) - "screen") - (if (getenv "SSH_CONNECTION") - ;; TMUX is not set but TERM is screen: - ;; it seems that TMUX is used by locally and ssh to remote host - (setq terminal-title-format - `("em:" - ,user-login-name - "@" - ,(car (split-string system-name - "\\.")) - ":" - (file-name-nondirectory (directory-file-name - default-directory)))) - ;; this wont happen? (TMUX is not set, TERM is screen, not ssh-ed) - (setq terminal-title-format - '((file-name-nondirectory (directory-file-name - default-directory))))))) - (terminal-title-mode)) +(and (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 + (if (getenv "TMUX") + ;; if use tmux locally just basename of current dir + (setq terminal-title-format + '((file-name-nondirectory (directory-file-name + default-directory)))) + (when (equal (car (split-string (frame-parameter nil + 'tty-type) + "-")) + "screen") + (if (getenv "SSH_CONNECTION") + ;; TMUX is not set but TERM is screen: + ;; it seems that TMUX is used by locally and ssh to remote host + (setq terminal-title-format + `("em:" + ,user-login-name + "@" + ,(car (split-string system-name + "\\.")) + ":" + (file-name-nondirectory (directory-file-name + default-directory)))) + ;; this wont happen? (TMUX is not set, TERM is screen, not ssh-ed) + (setq terminal-title-format + '((file-name-nondirectory (directory-file-name + default-directory))))))) + (terminal-title-mode)) (setq eol-mnemonic-dos "\\r\\n") (setq eol-mnemonic-mac "\\r") From e303ad415f83578d65cacd2e3f415bd72227ce88 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 6 Apr 2014 17:19:40 +0900 Subject: [PATCH 2/2] update msg --- shrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shrc b/shrc index 7c67bcd..729c9e3 100755 --- a/shrc +++ b/shrc @@ -445,7 +445,7 @@ __my_pacman_update_mirrorlist_with_reflector(){ then cmd="reflector --verbose -l 5 --sort rate --save $ml" fi - echo "Running $cmd ..." 1>&2 + echo ">>> $cmd ..." 1>&2 sudo sh -c "$cmd" } null type reflector && test -f /etc/pacman.d/mirrorlist && \