Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
166 lines (135 sloc) 4.04 KB
#utf setting
set-window-option -g utf8 on
set-window-option -g mode-keys vi
set-window-option -g automatic-rename off
# increase scroll buffer size
set-option -g history-limit 10000
# set -g status-bg white
# set -g status-fg black
set -s escape-time 0
setw -g window-status-current-attr underscore
# 256色ターミナル
set-option -g default-terminal "screen-256color"
set -g pane-active-border-fg white
set -g pane-active-border-bg black
set-window-option -g mode-bg white
set-window-option -g mode-fg black
set-window-option -g window-status-bg black
set-window-option -g window-status-fg white
set-window-option -g window-status-current-bg blue
set-window-option -g window-status-current-fg black
set-window-option -g window-status-current-attr bold
set-window-option -g mode-mouse on
# Set the prefix to ^T.
unbind C-b
set -g prefix ^T
bind t send-prefix
# Bind appropriate commands similar to screen.
# lockscreen ^X x
# unbind ^X
# bind ^X lock-server
# unbind x
# bind x lock-server
# screen ^C c
unbind ^C
bind ^C new-window -n zsh
bind c new-window -n zsh
# detach ^D d
unbind ^D
bind ^D detach
# displays *
unbind *
bind * list-clients
# next ^@ ^N sp n
unbind ^@
bind ^@ next-window
unbind ^N
bind ^N next-window
unbind " "
bind " " next-window
unbind n
bind n next-window
# title A
unbind A
bind A command-prompt "rename-window %%"
# copy-mode ^[
unbind ^"["
bind -r ^"[" copy-mode
unbind ^]
bind -r ^] paste-buffer
# other ^A
unbind ^A
bind ^A last-window
# prev ^H ^P p ^?
unbind BSpace
bind BSpace previous-window
# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows
# quit \
unbind \
bind \ confirm-before "kill-server"
# kill K k
unbind K
bind K confirm-before "kill-window"
unbind k
bind k confirm-before "kill-window"
# redisplay ^R r
unbind ^R
bind ^R refresh-client
unbind r
bind r refresh-client
# split -v |
unbind |
bind | split-window
# :kB: focus up
unbind Tab
bind Tab select-pane -t :.-
unbind BTab
bind BTab select-pane -t :.+
unbind ^H
bind ^H select-pane -t :.-
unbind h
bind ^h select-pane -t :.-
unbind ^L
bind ^L select-pane -t :.+
unbind l
bind l select-pane -t :.+
# " windowlist -b
unbind '"'
bind '"' choose-window
# zshでpbcopy
# set-option -g default-command "reattach-to-user-namespace -l zsh"
# ステータスラインカスタム関連
#
# FYI
# Status Line · zolrath/wemux Wiki : https://github.com/zolrath/wemux/wiki/Status-Line
#
# Macでtmuxのステータスラインに起動時間/ロードアベレージ/メモリ使用率を表示
# よんちゅBlog : http://d.hatena.ne.jp/yonchu/20120414/1334422075
set -g status-attr dim
set -g status-left-length 32
set -g status-right-length 150
set -g status-fg white
set -g status-bg colour234
# set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g status-left '#[fg=colour223,bg=colour202,bold]( ꒪⌓꒪) #20(hostname -s)#[deafult] #S #[fg=colour202,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,bold]⮀"
# set -g status-right "#(wemux status_users)"
#
# 左部:whoami@hostname
# set -g status-left '#[fg=blue,bold][#20(whoami) No.#I-#P]#[default]'
# set -g status-left-length 20
# 右部:[2011/03/06(Sun)20:21]
set -g status-right '#[fg=colour241]#H ⮃ #I:#P #[fg=colour31,bg=colour234,nobold]⮂#[fg=colour12,bg=colour31] Mem #(used-mem)%% ⮃ LAve.[#(loadaverage)] ⮂#[fg=colour31,bg=colour255,bold] %Y/%m/%d(%a)%H:%M#[default]'
set -g message-attr bold
set -g message-fg white
set -g message-bg red
# percol integration, select tmux window throgh percol
bind b split-window "tmux lsw | percol --initial-index $(tmux lsw | awk '/active.$/ {print NR-1}') | cut -d':' -f 1 | xargs tmux select-window -t"
bind B split-window "tmux ls | percol --initial-index $(tmux ls | awk '/attached.$/ {print NR-1}') | cut -d':' -f 1 | xargs tmux switch-client -t"