From 1c0932beb42f1962a2abbd3479594b30708cdc66 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Tue, 23 Apr 2013 11:24:41 +0900 Subject: [PATCH 1/6] change tmux color scheme --- tmux.conf.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmux.conf.pl b/tmux.conf.pl index 0494e7c..36ee220 100755 --- a/tmux.conf.pl +++ b/tmux.conf.pl @@ -86,9 +86,9 @@ sub set_colors { set("message-bg", "white"); set("message-fg", "black"); - setw("window-status-current-bg", "default"); - setw("window-status-current-fg", "default"); - setw("window-status-current-attr", "reverse"); + setw("window-status-current-bg", "white"); + setw("window-status-current-fg", "black"); + setw("window-status-current-attr", "bold"); } sub main { From 89a55cecfa15373d54f826083040adcc7213a5dd Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 27 Apr 2013 16:40:36 +0900 Subject: [PATCH 2/6] remove func _colors --- bashrc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/bashrc b/bashrc index 564ed14..0cd0565 100755 --- a/bashrc +++ b/bashrc @@ -595,28 +595,6 @@ convmv-sjis2utf8-notest(){ convmv -r -f sjis -t utf8 * --notest } -_colors(){ - echo -e \ - "\e[30mBlack" \ - "\e[31mRed" \ - "\e[32mGreen" \ - "\e[33mYellow" \ - "\e[34mBlue" \ - "\e[35mMagenta" \ - "\e[36mCyan" \ - "\e[37mWhite" - echo -e \ - "\e[30;1mBright Black" \ - "\e[31;1mBright Red" \ - "\e[32;1mBright Green" \ - "\e[33;1mBright Yellow" \ - "\e[34;1mBright Blue" \ - "\e[35;1mBright Magenta" \ - "\e[36;1mBright Cyan" \ - "\e[37;1mBright White\n" \ - "\e[0m" -} - winln(){ # for windose make link (actually junction) if test $# -eq 0 From f634dc3590c777ba737c6e856823cd08c8a856f8 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 27 Apr 2013 16:48:12 +0900 Subject: [PATCH 3/6] enter to exit in clk --- bashrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 0cd0565..e49d697 100755 --- a/bashrc +++ b/bashrc @@ -282,10 +282,13 @@ ssh(){ clk(){ local tformat="%Y/%m/%d %H:%M:%S %z" cal - while true + REPLY= + printf "\\r`date "+${tformat}"`" + read -t 1 + while test $? -ne 0 do printf "\\r`date "+${tformat}"`" - sleep 1 + read -t 1 done } From 7f8103cf7ea99d5cc506dc43dae6bb8d3d98c5fb Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 27 Apr 2013 16:48:27 +0900 Subject: [PATCH 4/6] add flycheck prefs --- emacs.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/emacs.el b/emacs.el index 6a547cc..dfbbda3 100644 --- a/emacs.el +++ b/emacs.el @@ -655,6 +655,10 @@ found, otherwise returns nil." (lazy-load-eval 'sudoku) +;; https://github.com/lunaryorn/flycheck +(when (require 'flycheck nil t) + (add-hook 'after-init-hook #'global-flycheck-mode)) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; window From a2fc457a73c250ba3b3a5cf00329c8a5e27d7cb3 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 3 May 2013 17:41:12 +0900 Subject: [PATCH 5/6] add my-grep --- emacs.el | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/emacs.el b/emacs.el index dfbbda3..aadedf3 100644 --- a/emacs.el +++ b/emacs.el @@ -659,6 +659,9 @@ found, otherwise returns nil." (when (require 'flycheck nil t) (add-hook 'after-init-hook #'global-flycheck-mode)) +(defun my-install-packages () + nil) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; window @@ -722,11 +725,6 @@ found, otherwise returns nil." (fset 'makefile-warn-suspicious-lines 'ignore) )) -(defun make () - "Run \"make -k\" in current directory." - (interactive) - (compile "make -k")) - (add-hook 'verilog-mode-hook (lambda () (define-key verilog-mode-map ";" 'self-insert-command))) @@ -1786,6 +1784,34 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; misc funcs +(defun my-grep () + "Use git-grep if avaliable.." + (interactive) + (require 'grep) + (let ((--grep-command-bak grep-command) + (--grep-use-null-device-bak grep-use-null-device) + (grep-command (if (eq 0 + (shell-command "git rev-parse --git-dir")) + "git --no-pager grep -nH -e " + grep-command + ))) + (grep-apply-setting 'grep-command + grep-command) + (grep-apply-setting 'grep-use-null-device + nil) + (if (called-interactively-p 'any) + (call-interactively 'grep) + (message "my-grep only allow interactive call.")) + (grep-apply-setting 'grep-command + --grep-command-bak) + (grep-apply-setting 'grep-use-null-device + --grep-use-null-device-bak))) + +(defun make () + "Run \"make -k\" in current directory." + (interactive) + (compile "make -k")) + (defvar sed-in-place-history nil "History of `sed-in-place'") From 79bcb1d2eabe76f790ffa5093ddd2238fbbf1a0a Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 3 May 2013 18:13:57 +0900 Subject: [PATCH 6/6] update my-grep --- emacs.el | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/emacs.el b/emacs.el index aadedf3..8c1063e 100644 --- a/emacs.el +++ b/emacs.el @@ -1789,23 +1789,21 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer." (interactive) (require 'grep) (let ((--grep-command-bak grep-command) - (--grep-use-null-device-bak grep-use-null-device) - (grep-command (if (eq 0 - (shell-command "git rev-parse --git-dir")) - "git --no-pager grep -nH -e " - grep-command - ))) - (grep-apply-setting 'grep-command - grep-command) - (grep-apply-setting 'grep-use-null-device - nil) + (--grep-use-null-device-bak grep-use-null-device)) (if (called-interactively-p 'any) - (call-interactively 'grep) - (message "my-grep only allow interactive call.")) - (grep-apply-setting 'grep-command - --grep-command-bak) - (grep-apply-setting 'grep-use-null-device - --grep-use-null-device-bak))) + (progn + (when (eq 0 + (shell-command "git rev-parse --git-dir")) + (grep-apply-setting 'grep-command + "git --no-pager grep -nH -e ") + (grep-apply-setting 'grep-use-null-device + nil)) + (call-interactively 'grep) + (grep-apply-setting 'grep-command + --grep-command-bak) + (grep-apply-setting 'grep-use-null-device + --grep-use-null-device-bak)) + (message "my-grep only allow interactive call.")))) (defun make () "Run \"make -k\" in current directory."