diff --git a/tmux.conf b/tmux.conf index cd069ab..b4ba2f5 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,6 +1,7 @@ # Plugind set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'thewtex/tmux-mem-cpu-load' +set -g @plugin 'tmux-plugins/tmux-yank' # Install `tpm` if needed. if "test ! -d ~/.tmux/plugins/tpm" \ @@ -9,6 +10,14 @@ if "test ! -d ~/.tmux/plugins/tpm" \ # Activate the plugins. run -b "~/.tmux/plugins/tpm/tpm" +set -g mouse on + +# Start windows and panes at 1, not 0 +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + # VIM and FZF navigation bindings is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" is_fzf="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'" @@ -23,6 +32,10 @@ bind -n M-j run "($is_vim && tmux send-keys M-j) || tmux resize-pane -D 1" bind -n M-k run "($is_vim && tmux send-keys M-k) || tmux resize-pane -U 1" bind -n M-l run "($is_vim && tmux send-keys M-l) || tmux resize-pane -R 1" +# Split pane bindings +bind '"' split-window -v -c "#{pane_current_path}" +bind % split-window -h -c "#{pane_current_path}" + set-option -g status-position bottom set-option -g default-terminal "screen-256color" set-option -sa terminal-features ',xterm-256color:RGB' @@ -47,5 +60,3 @@ set -g window-style 'bg=default,fg=#c6c6c6' set -g window-active-style 'bg=default,fg=white' set -g pane-border-style 'bg=default,fg=#0c0c0c' set -g pane-active-border-style 'bg=default,fg=#afd787' - -set -g mouse on