dotfiles/tmux.conf

72 lines
2.1 KiB
Plaintext
Raw Normal View History

2020-06-26 12:19:50 +00:00
# https://gist.github.com/spicycode/1229612
2021-01-15 13:46:24 +00:00
set -g default-terminal "screen-256color"
2021-03-12 09:37:10 +00:00
set -ga terminal-overrides ',*256col*:Tc'
2020-06-26 12:19:50 +00:00
2021-03-12 09:37:10 +00:00
set -g base-index 1
2020-06-26 12:19:50 +00:00
set-window-option -g automatic-rename off
set-window-option -g allow-rename off
set-option -g set-titles on
2021-10-08 12:27:22 +00:00
set-option -g focus-events on
2021-01-11 09:05:25 +00:00
set -g status-style 'fg=white, bg=colour8'
set -g window-status-current-style 'fg=black, bg=green'
2023-05-31 04:52:57 +00:00
set -g status-right '#(batinfo) #[fg=black, bg=colour2] #(sysinfo) #[default] #[fg=white, bg=colour238] %H:%M #[default]'
2021-01-15 13:46:24 +00:00
set -g status-justify centre
2020-06-26 12:19:50 +00:00
2021-01-06 13:34:33 +00:00
set-window-option -g mode-keys vi
2020-06-26 12:19:50 +00:00
set -g status-keys vi
set -g history-limit 10000
set -g escape-time 0
2020-07-01 09:51:53 +00:00
set -g repeat-time 1000
2021-01-11 09:05:25 +00:00
setw -g mouse on
2020-06-26 12:19:50 +00:00
bind-key v split-window -h
bind-key s split-window -v
2021-01-11 09:05:25 +00:00
bind-key p new-window \; set window-status-style fg=white,bg=red
2021-03-29 09:39:20 +00:00
bind-key c new-window -n 'cli'
2021-06-22 04:24:37 +00:00
bind-key e new-window -n 'vim' nvim
2021-03-29 09:39:20 +00:00
bind-key C rename-window 'cli'
bind-key E rename-window 'vim'
2020-06-26 12:19:50 +00:00
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind-key M-j resize-pane -D
bind-key M-k resize-pane -U
bind-key M-h resize-pane -L
bind-key M-l resize-pane -R
# Vim style pane selection
2021-04-08 15:54:44 +00:00
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
2020-06-26 12:19:50 +00:00
# Use Alt-vim keys without prefix key to switch panes
2021-04-08 15:54:44 +00:00
bind-key -n M-h select-pane -L
bind-key -n M-j select-pane -D
bind-key -n M-k select-pane -U
bind-key -n M-l select-pane -R
2020-06-26 12:19:50 +00:00
# Use Alt-arrow keys without prefix key to switch panes
2021-04-08 15:54:44 +00:00
bind-key -n M-Left select-pane -L
bind-key -n M-Right select-pane -R
bind-key -n M-Up select-pane -U
bind-key -n M-Down select-pane -D
2020-06-26 12:19:50 +00:00
# Shift arrow to switch windows
2022-07-14 15:26:49 +00:00
bind-key -n M-S-Left previous-window
bind-key -n M-S-Right next-window
2021-04-08 15:54:44 +00:00
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
2020-06-26 12:19:50 +00:00
2021-04-08 15:54:44 +00:00
# TODO: this breaks stuff, why?
#bind-key -n C-[ copy-mode
2021-04-08 15:54:44 +00:00
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind-key -n C-S-K send-keys -R \; clear-history
bind-key r source-file ~/.tmux.conf \; display "Reloading config..."