# change prefix key from Ctrl+b to Ctrl+o
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
unbind v
unbind h
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Bind appropriate commands similar to screen.
#up
bind-key k select-pane -U
#down
bind-key j select-pane -D
#left
bind-key h select-pane -L
#right
bind-key l select-pane -R
# lockscreen ^X x
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server
# screen ^C c
unbind ^C
bind ^C new-window
unbind c
bind c new-window
# detach ^D d
unbind ^D
bind ^D detach
# displays *
unbind *
bind * list-clients
# rename windows
unbind A
bind A command-prompt "rename-window %%"
bind a command-prompt "rename-window %%"
#other ^A
unbind ^A
bind ^A last-window
# windows ^W w
unbind ^W
bind ^W list-windows
unbind w
bind w list-windows
# redisplay ^L l
unbind ^L
bind ^L refresh-client
unbind l
bind l refresh-client
# More straight forward key bindings for splitting
unbind %
bind | split-window -h
#bind v split-window -h
unbind '"'
bind - split-window -v
#bind h split-window -v
# windowlist -b
unbind '"'
bind '"' choose-window
# History
set -g history-limit 1000
# reload tmux.conf file
#bind r source-file ~/.tmux.conf; display-message "Config reloaded..."
# set the base index of window to be 1
#set-option -g base-index 1
# switch on utf8 support for both window and statusbar
set -g status-utf8 on
setw -g utf8 on
# specify statusbar
# color: bright or dim
# color zyyar:[fd=?,bg=?,bright or dim]
set -g status-justify left # center align window list
set -g status-left-length 30
set -g status-left '[ #H ]'
set -g status-right-length 40
set -g status-right '#(tmux-mem-cpu-load 1) #(date +"%Y-%m-%d %H:%M") Load:#(uptime | cut -d: -f5)'
set -g display-time 3000
set -g status-bg black
set -g status-fg green
set-window-option -g window-status-current-attr bright
# Highlight active window
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg red
# Notifying if other windows has activities
setw -g monitor-activity on
set -g visual-activity on
setw -g clock-mode-colour red
setw -g clock-mode-style 24
# Automatically set window title
setw -g automatic-rename
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize pane
unbind ^h
bind -r ^h resizep -L
unbind ^l
bind -r ^l resizep -R
unbind ^j
bind -r ^j resizep -D
unbind ^k
bind -r ^k resizep -U
#copy mode use vim style
setw -g mode-keys vi
#zoom your screen
bind-key z run "tmux-zoom"