Skip to content

Instantly share code, notes, and snippets.

@kenkoooo
Last active April 27, 2018 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenkoooo/66f4aff153e8e88d24ecd045aa2fbbcf to your computer and use it in GitHub Desktop.
Save kenkoooo/66f4aff153e8e88d24ecd045aa2fbbcf to your computer and use it in GitHub Desktop.
SESSION_NAME=ope
if [[ -z "$TMUX" && -z "$STY" ]] && type tmux >/dev/null 2>&1; then
option=""
if tmux has-session -t ${SESSION_NAME}; then
option="attach -t ${SESSION_NAME}"
else
option="new -s ${SESSION_NAME}"
fi
tmux $option && exit
fi
GIT_PS1_SHOWDIRTYSTATE=true
export PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\n\$ '
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# Tmux Config
# Escape codes for status bars and titles
# #H Hostname of local host
# #F Current window flag
# #I Current window index
# #P Current pane index
# #S Session name
# #T Current window title
# #W Current window name
# 設定ファイルをリロードする
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# prefixキーをC-sに変更する
set -g prefix C-s
# C-bのキーバインドを解除する
unbind C-b
# ウィンドウリストの色を設定する
setw -g window-status-fg default
setw -g window-status-bg default
setw -g window-status-attr dim
# アクティブなウィンドウを目立たせる
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
# ウインドウの切り替え
bind-key -r Space next-window
# ウインドウの分割
bind-key -r s split-window
# ウィンドウの切り替え
bind-key -r a select-pane -t :.+
setw -g window-status-format "#I #W"
setw -g window-status-current-format "#I #W"
setw -g status-interval 1
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment