linux

profile

export PATH=$HOME/bin:/opt/local/bin:/opt/local/sbin:$PATH

AGENTENV=${HOME}/bin/agent-env
if [ "x" == "x`ps -x -u ${USER} | egrep [s]sh-agent`" ] ; then 
  ssh-agent | sed -e "/^echo/d" > ${AGENTENV}
fi
test -f ${AGENTENV} && source ${AGENTENV}

AGENTENV=${HOME}/bin/agent-env
if [ "x" == "x`ps -x -u ${USER} | egrep [s]sh-agent`" ] ; then 

  ssh-agent | sed -e "/^echo/d" > ${AGENTENV}
  ssh-add ~/.ssh/priv.rsa
fi
test -f ${AGENTENV} && source ${AGENTENV}

export PS1='[\u@\h:\W](${SHLVL}) \$ '

viw () { test -f "`which $1`" && vim `which $1`; }

screeners

escape ^Tt
vbell off
autodetach on
startup_message off
defscrollback 1000
hardstatus alwayslastline "%{= gk}[%m/%d %02c:%s] %{gW} %-w%{= wk}%n %t%{-}%+w %=%{gk}$USER@$HOSTNAME[$LANG] (%l) "
defbce "on"
shelltitle '% |zsh'
term xterm

bind s colon 'screen ssh '
bind k
bind ^k
bind .
bind ^\
bind \\
bind ^h
bind h

bind ^E eval 'command -c sencoding' 'echo "switch window encoding to: [u]tf8 [e]ucjp [s]jis / with env [U]tf8 [E]ucjp [S]jis"'
bind -c sencoding ^U eval 'encoding utf8'  'info'
bind -c sencoding u  eval 'encoding utf8'  'info'
bind -c sencoding ^E eval 'encoding eucjp' 'info'
bind -c sencoding e  eval 'encoding eucjp' 'info'
bind -c sencoding ^S eval 'encoding sjis'  'info'
bind -c sencoding s  eval 'encoding sjis'  'info'
bind -c sencoding U  eval 'encoding utf8'  '!!!echo "LANG=ja_JP.UTF-8; export LANG"' 'info'
bind -c sencoding E  eval 'encoding eucjp' '!!!echo "LANG=ja_JP.eucJP; export LANG"' 'info'
bind -c sencoding S  eval 'encoding sjis'  '!!!echo "LANG=ja_JP.sjis; export LANG"'  'info'