# tmux.conf # bindings {{{1 bind-key a send-prefix bind-key r source-file ~/.tmux.conf \; display-message 'Reloaded ~/tmux.conf' bind-key G set status bind-key T run-shell 'for i in {1..$(tmux list-windows | wc -l)}; do tmux next-window; done' bind-key , command-prompt "rename-window '%%'" bind-key s command-prompt -p 'Send pane to:' 'join-pane -ht "%%"' bind-key j command-prompt -p 'Join pane from:' 'join-pane -hs "%%"' bind-key B break-pane bind-key c new-window bind-key C new-window -c "#{pane_current_path}" bind-key | split-window -h -c "#{pane_current_path}" bind-key - split-window -v -c "#{pane_current_path}" bind-key -r n next-window bind-key -r p previous-window bind-key -r o last-window bind-key -r Left swap-window -t {previous} bind-key -r Right swap-window -t {next} 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 -n M-h if-shell '[[ #{pane_current_command} =~ vim ]]' 'send-keys M-h' 'select-pane -L' bind-key -n M-j if-shell '[[ #{pane_current_command} =~ vim ]]' 'send-keys M-j' 'select-pane -D' bind-key -n M-k if-shell '[[ #{pane_current_command} =~ vim ]]' 'send-keys M-k' 'select-pane -U' bind-key -n M-l if-shell '[[ #{pane_current_command} =~ vim ]]' 'send-keys M-l' 'select-pane -R' bind-key -r C-h resize-pane -L 3 bind-key -r C-j resize-pane -D 3 bind-key -r C-k resize-pane -U 3 bind-key -r C-l resize-pane -R 3 bind-key + choose-buffer "delete-buffer -b '%%'" bind-key > save-buffer ~/.tmux-exchange \; display-message 'tmux: buffer saved' bind-key < load-buffer ~/.tmux-exchange \; display-message 'tmux: buffer loaded' bind-key v copy-mode bind-key -r P paste-buffer bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel pbcopy bind-key -T copy-mode-vi v send -X begin-selection bind-key -T copy-mode-vi C-v send -X rectangle-toggle # options {{{1 set-option -g prefix C-a set-option -g default-terminal 'tmux-256color' set-option -ga update-environment ' ITERM_PROFILE' set-option -ga terminal-overrides ',xterm-256color:Tc' set-option -ga terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colors in kitty set-option -g mode-keys vi set-option -g mouse on set-option -gs escape-time 1 set-option -g repeat-time 1000 set-option -g base-index 1 set-option -g focus-events on set-option -g history-limit 1000 set-option -g status-position top set-option -g monitor-activity off set-option -g renumber-windows on set-option -g set-titles on set-option -g visual-activity off # statusline {{{1 set-option -g status-justify centre set-option -g status-interval 60 set-option -g window-status-current-format ' #W ' set-option -g window-status-format ' #W ' set-option -g status-left '' set-option -g status-right '#{?window_zoomed_flag, #[fg=colour16]#[bg=colour214] ZOOM ,}#[default] ' set-option -ga status-right '#[fg=colour15]#[bg=colour245] ' # set-option -ga status-right '#(cat ~/todo)' set-option -ga status-right "#(pmset -g batt | awk 'NR==2 { gsub(/;/, \"\"); print $3 }') #[default]" set-option -ga status-right ' #[bg=colour245] %H:%M ' # colors {{{1 set-option -g status-style fg=colour15,bg=default set-option -g window-status-current-style fg=colour15,bg=colour161 set-option -g window-status-style fg=colour15,bg=colour24 set-option -g pane-border-style fg=colour240 set-option -g pane-active-border-style fg=colour240 set-option -g window-status-activity-style fg=colour111 set-option -g message-style fg=colour15,bg=colour161 set-option -g message-command-style fg=colour15,bg=colour24