From faf5f96e38b7da408065d1a619f8ce1110cc854f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 13 Dec 2012 20:10:56 +0900 Subject: [PATCH 1/6] add pref about sql --- emacs.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emacs.el b/emacs.el index e3214d9..b018870 100644 --- a/emacs.el +++ b/emacs.el @@ -644,6 +644,9 @@ found, otherwise returns nil." (require 'session nil t) +(lazy-load-eval 'sql '(sql-mode) + (require 'sql-indent nil t)) + (and (fetch-library "https://raw.github.com/10sr/emacs-lisp/master/gtkbm.el" t) (lazy-load-eval 'gtkbm) From 18f2d67e1bf8e4b866ccad28b22fb64c73b431e9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 19 Dec 2012 17:27:23 +0900 Subject: [PATCH 2/6] test with grep -o not works as expected, use usual null redirect --- bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 041743d..3c46032 100755 --- a/bashrc +++ b/bashrc @@ -54,7 +54,8 @@ export VISUAL="$EDITOR" export GIT_PAGER="less -F" export GIT_EDITOR="$EDITOR" if test -n "$TMUX" && \ - test -n "tmux display -p '#{client_termname}' | grep -o 256color" + echo $TERM | grep screen >/dev/null 2>&1 && \ + tmux display -p '#{client_termname}' | grep 256color >/dev/null 2>&1 then TERM=screen-256color fi From 987cbac71908149b54b53503fce4d497c964e57b Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 19 Dec 2012 21:09:33 +0900 Subject: [PATCH 3/6] fix emacs color name --- emacs.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index e3214d9..9a69905 100644 --- a/emacs.el +++ b/emacs.el @@ -368,7 +368,7 @@ found, otherwise returns nil." (:background "color-234")) (((min-colors 256) (background light)) - (:background "gainsboro")) + (:background "color-234")) (t (:underline "black"))) "*Face used by hl-line.") From 9a86fb2c4e3b298dc0eeeb2dec77fc7b70e80248 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 20 Dec 2012 13:32:48 +0900 Subject: [PATCH 4/6] do not show battery status when 100% --- bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 041743d..be7059e 100755 --- a/bashrc +++ b/bashrc @@ -678,7 +678,8 @@ __my_ps1_bttry(){ if test -z "$DISPLAY" && ! iswindows then test -f $bst && local bstr="$(cat $bst)" - test -n "$bstr" && echo "[Battery:$bstr]" + test -n "$bstr" && ! echo $bstr | grep 100 >/dev/null 2>&1 && \ + echo "[Battery:$bstr]" __my_battery_status %s >$bst & fi return $last From 6c98c6efb747e0de804c837e319888d377e28758 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 20 Dec 2012 14:53:10 +0900 Subject: [PATCH 5/6] update g command --- bashrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index be7059e..7043005 100755 --- a/bashrc +++ b/bashrc @@ -217,7 +217,14 @@ if iscygwin; then alias ls="ls -CFG $(iswindows || test "$TERM" = dumb || echo --color=auto)" fi -alias g=git +g(){ + if test $# -eq 0 && null type git-info + then + git info + else + git "$@" + fi +} if null type _git then # enable programmable completion for g From cc7f3a7abc44f9c2b5b134a88b350c2abc265531 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 20 Dec 2012 17:37:18 +0900 Subject: [PATCH 6/6] fix envval TMP --- profile | 10 ++++++++-- tmux.conf | 4 ---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/profile b/profile index cf6adbe..fe27db4 100755 --- a/profile +++ b/profile @@ -17,7 +17,8 @@ test -f "${HOME}/.dotfiles/rc.py" && \ __add_to_path(){ for p in "$@" do - echo $PATH | grep -E "^$p:|:$p:|:$p$" >/dev/null 2>&1 || PATH="${PATH}:$p" + echo $PATH | grep -E "^$p:|:$p:|:$p$" >/dev/null 2>&1 || \ + PATH="${PATH}:$p" done } # export PATH="${PATH}:${HOME}/bin" @@ -30,6 +31,11 @@ export LD_LIBRARY_PATH="$HOME/.local/lib:$LD_LIBRARY_PATH" type setterm >/dev/null 2>&1 && setterm -blank 30 -powersave on # -powerdown 10 # in my environment powerdown does not work -export TMP="/tmp/${USER}-tmp" +if test -n $TMPDIR +then + export TMP=$TMPDIR +else + export TMP=/tmp/ +export TMP="${TMP}${USER}-tmp" export TEMP="$TMP" mkdir -p "$TMP" diff --git a/tmux.conf b/tmux.conf index 6ecc53c..90c054e 100644 --- a/tmux.conf +++ b/tmux.conf @@ -45,7 +45,3 @@ if "test `hostname` = newkiwi" \ setw -g window-status-current-fg black setw -g window-status-current-bg white setw -g window-status-current-attr bold - -# this does not work because it runs asyncly -# if "test -n \"tmux display -p '#{client_termname}' | grep -o 256color\"" \ -# "set -g default-terminal screen-256color" "set -g default-terminal screen"