# File: tmux.conf # Author: Zakhary Kaplan # Created: 18 Jun 2019 # SPDX-License-Identifier: MIT # Vim: set fdl=0 fdm=marker: # -- Bindings -- {{{ # Synchronize panes bind-key S set-window-option synchronize-panes # Panes 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 s split-window -v bind-key v split-window -h # Rebind choose-tree with sessions collapsed bind-key w choose-tree -Zs # Clear scrollback buffer history bind-key M-k clear-history # set-option working directory bind-key M-c attach-session -t . -c "#{pane_current_path}" # Vim-like bindings set-window-option -g mode-keys vi set-window-option -g status-keys vi bind-key -T copy-mode-vi 'v' send -X begin-selection bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel # }}} # -- Mouse -- {{{ set-option -g mouse on # Enhanced scrolling bind-key -T root WheelUpPane if -F '#{?mouse_any_flag,1,#{pane_in_mode}}' 'send -M' 'if -F "#{alternate_on}" "send Up" "copy-mode -e"' bind-key -T root WheelDownPane if -F '#{?mouse_any_flag,1,#{pane_in_mode}}' 'send -M' 'if -F "#{alternate_on}" "send Down" "copy-mode -e"' # }}} # -- Plugins -- {{{ set-option -g @plugin 'tmux-plugins/tpm' set-option -g @plugin 'tmux-plugins/tmux-prefix-highlight' # }}} # -- Prefix -- {{{ unbind M-a set-option -g prefix M-a bind-key a send-prefix # }}} # -- Terminal -- {{{ set-option -g default-terminal 'tmux-256color' set-option -g focus-events on set-option -a terminal-overrides ',*256col*:RGB' set-window-option -g xterm-keys on # }}} # -- Theme -- {{{ source "~/.config/tmux/themes/playtime.tmux" # }}} # -- Various -- {{{ set-option -g display-time 4000 set-option -sg escape-time 0 # }}} # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run-shell -b '~/.config/tmux/plugins/tpm/tpm'