dotfiles/dot_config/tmux/tmux.conf

94 lines
2.5 KiB
Text
Raw Normal View History

2022-07-30 07:17:12 +02:00
# reset ^B to ^S
unbind C-b
set -g prefix C-s
bind-key -r C-s send-prefix
# simple reload key
bind-key r source-file ~/.tmux.conf \; display-message '~/.tmux.conf reloaded'
# vim-like arrows to switch and resize panes
unbind-key Up
unbind-key Down
unbind-key Left
unbind-key Right
unbind-key M-Up
unbind-key M-Down
unbind-key M-Left
unbind-key M-Right
unbind-key C-Up
unbind-key C-Down
unbind-key C-Left
unbind-key C-Right
unbind-key |
unbind-key -
# what the fuck
bind-key \\ split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
# i can't explain this but it makes sense coming from vim
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key -r M-h resize-pane -L
bind-key -r M-j resize-pane -D
bind-key -r M-k resize-pane -U
bind-key -r M-l resize-pane -R
bind-key -r C-h resize-pane -L 5
bind-key -r C-j resize-pane -D 5
bind-key -r C-k resize-pane -U 5
bind-key -r C-l resize-pane -R 5
# start counting tabs and panes at 1
set -g base-index 1
set -g pane-base-index 1
set -g pane-border-format "#{pane_index} #{pane_current_command}"
unbind-key 0
bind-key 0 select-window -t 10
set-option -sg escape-time 0
set-window-option -g mode-keys vi
set-option -g focus-events on
set-option -g default-terminal 'screen-256color'
set-option -g terminal-overrides ',xterm-256color:RGB'
# couple of vi mode keybinds
unbind -T copy-mode-vi Space; #Default for begin-selection
unbind -T copy-mode-vi Enter; #Default for copy-selection
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
set -g @plugin 'jaclu/tmux-menus'
set -g @plugin 'jimeh/tmux-themepack'
set -g @plugin 'schasse/tmux-jump'
set -g @plugin 'spywhere/tmux-now-playing'
set -g @plugin 'tmux-plugins/tmux-cowboy'
set -g @plugin 'tmux-plugins/tmux-maildir-counter'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'tmux-plugins/tpm'
# tmux-menus
set -g @menus_location_x 'C'
set -g @menus_location_y 'C'
set -g @menus_trigger 'm'
# now playing
set -g @now-playing-status-format '{icon} {scrollable}'
set -g @now-playing-scrollable-format '{artist} - {title}'
set -g @now-playing-playing-icon '|>'
# tmux-themepack
set -g @themepack-status-right-area-left-format '#{now_playing}'
set -g @themepack 'powerline/block/blue'
set -g @jump-key 'f'
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins'
run -b '~/.config/tmux/plugins/tpm/tpm'