set-option -g default-shell /bin/zsh set-option -g default-terminal "tmux-256color" set -s escape-time 0 set-option -g detach-on-destroy off set -g status-left-length 200 set -g status-style fg=blue,bg=black set-window-option -g visual-bell on set-window-option -g bell-action other set -g mouse on set -g base-index 1 set -g prefix C-Space unbind C-b bind-key C-Space send-prefix unbind % bind - split-window -h -c "#{pane_current_path}" bind "'" split-window -v -c "#{pane_current_path}" unbind c bind -r c neww -c "#{pane_current_path}" unbind r bind r source-file ~/.tmux.conf \; display-message "Re-sourced." bind -r C-Down resize-pane -D 5 bind -r C-Up resize-pane -U 5 bind -r C-Right resize-pane -R 5 bind -r C-Left resize-pane -L 5 bind -r m resize-pane -Z # Smart pane switching with awareness of Vim splits. # From https://github.com/christoomey/vim-tmux-navigator is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" bind-key -n 'C-Left' if-shell "$is_vim" "send-keys C-Left" "select-pane -L" bind-key -n 'C-Down' if-shell "$is_vim" "send-keys C-Down" "select-pane -D" bind-key -n 'C-Up' if-shell "$is_vim" "send-keys C-Up" "select-pane -U" bind-key -n 'C-Right' if-shell "$is_vim" "send-keys C-Right" "select-pane -R" set-window-option -g mode-keys vi bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v" bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y" unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode when dragging with mouse bind f display-popup -E "~/.local/bin/tmux-sessionizer" bind s display-popup -E -w 70% -h 70% "ncmpcpp -s playlist" bind g display-popup -E -w 70% -h 70% "lazygit" bind e neww "aerc"