diff options
Diffstat (limited to 'home/.config/tmux')
-rw-r--r-- | home/.config/tmux/tmux.conf | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/home/.config/tmux/tmux.conf b/home/.config/tmux/tmux.conf index b3ebcfb..9520d26 100644 --- a/home/.config/tmux/tmux.conf +++ b/home/.config/tmux/tmux.conf @@ -1,11 +1,20 @@ +set -ga update-environment EDITOR + # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-pain-control' set -g @plugin 'tmux-plugins/tmux-copycat' +set -g @plugin 'tmux-plugins/tmux-open' +set -g @plugin 'tmux-plugins/tmux-sessionist' set -g @plugin 'tmux-plugins/tmux-yank' -set -g @plugin 'tmux-plugins/tmux-urlview' -set -g @plugin 'lawabidingcactus/tmux-gruvbox-truecolor' +set -g @plugin 'nhdaly/tmux-better-mouse-mode' +set -g @plugin 'rickstaa/tmux-notify' +set -g @plugin 'egel/tmux-gruvbox' +set -g @plugin 'artemave/tmux_super_fingers' +set -g @plugin 'aserowy/tmux.nvim' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' unbind C-b set -g prefix ` @@ -14,6 +23,7 @@ set -g prefix2 C-Space set -g base-index 1 setw -g mode-keys vi +set-option -g mouse on bind-key R run-shell 'tmux source-file ~/.config/tmux/tmux.conf > /dev/null; \ tmux display-message "Sourced tmux.conf!"' @@ -29,24 +39,11 @@ bind-key -T copy-mode-vi 'y' send -X copy-selection bind-key -T copy-mode-vi 'C-e' send -X end-of-line bind-key -T copy-mode-vi 'C-a' send -X start-of-line -is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" - -bind -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'resize-pane -L 1' -bind -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'resize-pane -D 1' -bind -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'resize-pane -U 1' -bind -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'resize-pane -R 1' - -bind-key -T copy-mode-vi M-h resize-pane -L 1 -bind-key -T copy-mode-vi M-j resize-pane -D 1 -bind-key -T copy-mode-vi M-k resize-pane -U 1 -bind-key -T copy-mode-vi M-l resize-pane -R 1 - set-option -g default-shell $SHELL -#set -g default-terminal tmux-256color -#set -sa terminal-overrides ",tmux-256color:Tc" -set -g default-terminal "alacritty" -set-option -sa terminal-overrides ",alacritty*:Tc" +set -g default-terminal "tmux-256color" +set -as terminal-features ",alacritty*:RGB" +set -ga terminal-features "*:hyperlinks" ## update the TERM variable of terminal emulator when creating a new session or attaching a existing session set -g update-environment 'DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM COLORTERM' @@ -57,10 +54,21 @@ set -g set-titles-string "#T" set -g automatic-rename-format "#{?pane_in_mode,[tmux],#{?#{==:#{pane_current_command},zsh}, #{b:pane_current_path}, #{b:pane_current_path}:#{pane_current_command}}}#{?pane_dead,[dead],}" set-option -g renumber-windows on -#https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed -set -sg escape-time 0 -set -g focus-events on +set -g @tmux-gruvbox 'dark' +set -g @tmux-gruvbox-statusbar-alpha 'true' +set -g @tmux-gruvbox-right-status-z '#h C:#{continuum_status}' + +set -g @yank_selection_mouse 'clipboard' +set -g @yank_action 'copy-pipe' + +set -g @tmux-nvim-condition "ps -t '#{pane_tty}' -o state= -o args= | grep -iqE '^[^TXZ ]+ .*g?(view|n?vim?x?|fzf)(diff)?'" + +set -g @continuum-restore 'on' +set -g @continuum-save-interval '5' +set -g @resurrect-strategy-nvim 'session' +set -g @resurrect-capture-pane-contents 'on' +set -g @resurrect-processes 'ssh "git log" "just n" "just nvim" "just e" "just edit" lf aerc bat difft delta' set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.local/share/tmux/plugins' if "test ! -d ~/.local/share/tmux/plugins/tpm" \ |