@@ -54,7 +54,8 @@ export VISUAL="$EDITOR" | |||||
export GIT_PAGER="less -F" | export GIT_PAGER="less -F" | ||||
export GIT_EDITOR="$EDITOR" | export GIT_EDITOR="$EDITOR" | ||||
if test -n "$TMUX" && \ | 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 | then | ||||
TERM=screen-256color | TERM=screen-256color | ||||
fi | fi | ||||
@@ -217,7 +218,14 @@ if iscygwin; then | |||||
alias ls="ls -CFG $(iswindows || test "$TERM" = dumb || echo --color=auto)" | alias ls="ls -CFG $(iswindows || test "$TERM" = dumb || echo --color=auto)" | ||||
fi | fi | ||||
alias g=git | |||||
g(){ | |||||
if test $# -eq 0 && null type git-info | |||||
then | |||||
git info | |||||
else | |||||
git "$@" | |||||
fi | |||||
} | |||||
if null type _git | if null type _git | ||||
then | then | ||||
# enable programmable completion for g | # enable programmable completion for g | ||||
@@ -678,7 +686,8 @@ __my_ps1_bttry(){ | |||||
if test -z "$DISPLAY" && ! iswindows | if test -z "$DISPLAY" && ! iswindows | ||||
then | then | ||||
test -f $bst && local bstr="$(cat $bst)" | 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 & | __my_battery_status %s >$bst & | ||||
fi | fi | ||||
return $last | return $last | ||||
@@ -368,7 +368,7 @@ found, otherwise returns nil." | |||||
(:background "color-234")) | (:background "color-234")) | ||||
(((min-colors 256) | (((min-colors 256) | ||||
(background light)) | (background light)) | ||||
(:background "gainsboro")) | |||||
(:background "color-234")) | |||||
(t | (t | ||||
(:underline "black"))) | (:underline "black"))) | ||||
"*Face used by hl-line.") | "*Face used by hl-line.") | ||||
@@ -644,6 +644,9 @@ found, otherwise returns nil." | |||||
(require 'session nil t) | (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" | (and (fetch-library "https://raw.github.com/10sr/emacs-lisp/master/gtkbm.el" | ||||
t) | t) | ||||
(lazy-load-eval 'gtkbm) | (lazy-load-eval 'gtkbm) | ||||
@@ -19,7 +19,8 @@ test -f "${HOME}/.dotfiles/rc.py" && \ | |||||
__add_to_path(){ | __add_to_path(){ | ||||
for p in "$@" | for p in "$@" | ||||
do | 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 | done | ||||
} | } | ||||
# export PATH="${PATH}:${HOME}/bin" | # export PATH="${PATH}:${HOME}/bin" | ||||
@@ -32,6 +33,11 @@ export LD_LIBRARY_PATH="$HOME/.local/lib:$LD_LIBRARY_PATH" | |||||
type setterm >/dev/null 2>&1 && setterm -blank 30 -powersave on # -powerdown 10 | type setterm >/dev/null 2>&1 && setterm -blank 30 -powersave on # -powerdown 10 | ||||
# in my environment powerdown does not work | # 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" | export TEMP="$TMP" | ||||
mkdir -p "$TMP" | mkdir -p "$TMP" |
@@ -45,7 +45,3 @@ if "test `hostname` = newkiwi" \ | |||||
setw -g window-status-current-fg black | setw -g window-status-current-fg black | ||||
setw -g window-status-current-bg white | setw -g window-status-current-bg white | ||||
setw -g window-status-current-attr bold | 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" |