49 lines
1.6 KiB
Plaintext
Executable File
49 lines
1.6 KiB
Plaintext
Executable File
set-option -g status on
|
|
set-option -g status-interval 2
|
|
set-option -g renumber-windows on
|
|
set-option -g history-limit 10000
|
|
set -s escape-time 0
|
|
|
|
### Reload the config with r
|
|
bind-key r source-file ~/.tmux.conf\; display-message "Reloaded config"
|
|
|
|
### Toggle Mouse Mode
|
|
bind-key m set-window-option mouse\; display-message "mouse support is now #{?mouse,on,off}"
|
|
|
|
# New panes and windows have same cwd as the one opening it
|
|
bind c new-window -c "#{pane_current_path}"
|
|
bind '"' split-window -c "#{pane_current_path}"
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
|
|
### vim/tmux navigation
|
|
set -g focus-events on
|
|
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
|
|
bind -n C-Left if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
|
bind -n C-Down if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
|
bind -n C-Up if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
|
bind -n C-Right if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
|
|
|
# change windows
|
|
bind -n S-Right next-window
|
|
bind -n S-Left previous-window
|
|
|
|
set -g base-index 1 # Windows start at index 1
|
|
setw -g pane-base-index 1 # Panes start at index 1
|
|
|
|
#### Color Scheme
|
|
set-option -g status-justify "centre"
|
|
set-option -g status-bg colour238 #grey
|
|
set-option -g status-fg yellow #yellow
|
|
set-option -g window-status-current-style bold
|
|
set-option -g display-panes-colour brightred #orange
|
|
|
|
# clock
|
|
set-window-option -g clock-mode-colour green #green
|
|
set -g status-right '#(date "+%%Y-%m-%d %%H:%%M:%%S")'
|
|
|
|
# bell
|
|
set-window-option -g window-status-bell-style fg=white,bg=red #base2, red
|
|
|
|
|
|
set-option -g terminal-overrides ',xterm*:Cr=\E]12;gray\007'
|