From fc232f26f7d9cf4036183a4799613f7e5074994f Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 24 Oct 2024 01:51:27 +0300 Subject: [PATCH] chore(config): update tmux config --- config/tmux/tmux.conf | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index e485447..dcef663 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -28,6 +28,10 @@ bind -n M-Down select-pane -D # Reload tmux config with + r bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux cfg reloaded!" +# Switch to next client with ( and previous with ) +bind -r '(' switch-client -p\; refresh-client -S +bind -r ')' switch-client -n\; refresh-client -S + # Open a new window with + N bind N new-window @@ -112,7 +116,7 @@ set-option -g status-left '' set-option -g window-status-format ' #I:#W ' set-option -g window-status-current-format ' #I:#W#{?window_zoomed_flag, ◈ ,} ' -set-option -g status-right "#{hostname_short}/#S #{tmux_mode_indicator}" +set-option -g status-right "#{hostname_short}/#(tms sessions) #{tmux_mode_indicator}" set -g pane-border-style "fg=#3b4261" set -g pane-active-border-style "fg=#7aa2f7" @@ -138,15 +142,15 @@ set -g @tmux_window_name_max_name_len "20" set -g @tmux_window_name_use_tilde "True" set -g @tmux_window_name_shells "['bash', 'fish', 'sh', 'zsh', 'oh-my-posh']" set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git']" -set -g @tmux_window_name_ignored_programs "['sqlite3', 'x-set-php-aliases', 'oh-my-posh', 'antidot']" # Default is [] -set -g @tmux_window_name_substitute_sets "[('.+ipython2', 'ipython2'), ('.+ipython3', 'ipython3'), ('.+\.local', '.local')]" +set -g @tmux_window_name_ignored_programs "['sqlite3', 'x-set-php-aliases', 'oh-my-posh', 'antidot', 'direnv']" # Default is [] +set -g @tmux_window_name_substitute_sets "[('.+ipython2', 'ipython2'), ('.+ipython3', 'ipython3'), ('.+\.local', '.local'), ('.+asdf', 'asdf')]" ## https://github.com/tmux-plugins/tmux-continuum -set -g @continuum-restore 'on' +# set -g @continuum-restore 'on' ## https://github.com/tmux-plugins/tmux-resurrect -set -g @resurrect-strategy-nvim 'session' -set -g @resurrect-dir '~/.local/state/tmux/tmux-resurrect' +# set -g @resurrect-strategy-nvim 'session' +# set -g @resurrect-dir '~/.local/state/tmux/tmux-resurrect' ## https://github.com/MunifTanjim/tmux-mode-indicator set -g @mode_indicator_prefix_mode_style 'bg=default,fg=#7aa2f7' @@ -160,9 +164,9 @@ set -g @mode_indicator_sync_mode_style 'bg=default,fg=red' run-shell ~/.dotfiles/config/tmux/plugins/tmux-sensible/sensible.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-window-name/tmux_window_name.tmux -run-shell ~/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux -run-shell ~/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux -run-shell ~/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux +# run-shell ~/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux +# run-shell ~/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux +# run-shell ~/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux run-shell ~/.dotfiles/config/tmux/plugins/tmux-yank/yank.tmux