chore(tmux): drop unused plugins, update config

This commit is contained in:
2023-09-08 00:29:32 +03:00
parent c3d4b51927
commit 1d851708eb
10 changed files with 80 additions and 137 deletions

18
.gitmodules vendored
View File

@@ -26,24 +26,12 @@
[submodule "tmux/catppuccin"]
path = config/tmux/plugins/tmux
url = https://github.com/catppuccin/tmux.git
[submodule "tmux/tmux-1password"]
path = config/tmux/plugins/tmux-1password
url = https://github.com/yardnsm/tmux-1password.git
[submodule "tmux/tmux-autoreload"]
path = config/tmux/plugins/tmux-autoreload
url = https://github.com/b0o/tmux-autoreload.git
[submodule "tmux/tmux-continuum"]
path = config/tmux/plugins/tmux-continuum
url = https://github.com/tmux-plugins/tmux-continuum
[submodule "tmux/tmux-fzf"]
path = config/tmux/plugins/tmux-fzf
url = https://github.com/sainnhe/tmux-fzf.git
[submodule "tmux/tmux-menus"]
path = config/tmux/plugins/tmux-menus
url = https://github.com/jaclu/tmux-menus.git
[submodule "tmux/tmux-notify"]
path = config/tmux/plugins/tmux-notify
url = https://github.com/ChanderG/tmux-notify.git
[submodule "tmux/tmux-resurrect"]
path = config/tmux/plugins/tmux-resurrect
url = https://github.com/tmux-plugins/tmux-resurrect
@@ -53,12 +41,6 @@
[submodule "tmux/tmux-sessionist"]
path = config/tmux/plugins/tmux-sessionist
url = https://github.com/tmux-plugins/tmux-sessionist.git
[submodule "tmux/tmux-suspend"]
path = config/tmux/plugins/tmux-suspend
url = https://github.com/MunifTanjim/tmux-suspend.git
[submodule "tmux/tmux-yank"]
path = config/tmux/plugins/tmux-yank
url = https://github.com/tmux-plugins/tmux-yank.git
[submodule "tmux/vim-tmux-navigator"]
path = config/tmux/plugins/vim-tmux-navigator
url = https://github.com/christoomey/vim-tmux-navigator.git

View File

@@ -10,27 +10,15 @@ git submodule add --name tmux/tpm \
-f https://github.com/tmux-plugins/tpm.git config/tmux/plugins/tpm
git submodule add --name tmux/catppuccin \
-f https://github.com/catppuccin/tmux.git config/tmux/plugins/tmux
git submodule add --name tmux/tmux-1password \
-f https://github.com/yardnsm/tmux-1password.git config/tmux/plugins/tmux-1password
git submodule add --name tmux/tmux-autoreload \
-f https://github.com/b0o/tmux-autoreload.git config/tmux/plugins/tmux-autoreload
git submodule add --name tmux/tmux-continuum \
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
git submodule add --name tmux/tmux-fzf \
-f https://github.com/sainnhe/tmux-fzf.git config/tmux/plugins/tmux-fzf
git submodule add --name tmux/tmux-menus \
-f https://github.com/jaclu/tmux-menus.git config/tmux/plugins/tmux-menus
git submodule add --name tmux/tmux-notify \
-f https://github.com/ChanderG/tmux-notify.git config/tmux/plugins/tmux-notify
git submodule add --name tmux/tmux-resurrect \
-f https://github.com/tmux-plugins/tmux-resurrect config/tmux/plugins/tmux-resurrect
git submodule add --name tmux/tmux-sensible \
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
git submodule add --name tmux/tmux-sessionist \
-f https://github.com/tmux-plugins/tmux-sessionist.git config/tmux/plugins/tmux-sessionist
git submodule add --name tmux/tmux-suspend \
-f https://github.com/MunifTanjim/tmux-suspend.git config/tmux/plugins/tmux-suspend
git submodule add --name tmux/tmux-yank \
-f https://github.com/tmux-plugins/tmux-yank.git config/tmux/plugins/tmux-yank
git submodule add --name tmux/vim-tmux-navigator \
-f https://github.com/christoomey/vim-tmux-navigator.git config/tmux/plugins/vim-tmux-navigator

View File

@@ -61,9 +61,11 @@ scheduler()
# Defines default antigen bundles
x-default-antigen-bundles()
{
export ZSH_TMUX_AUTOSTART=true
export ZSH_TMUX_AUTOSTART=false
export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf"
export ZSH_TMUX_UNICODE=true
export ZSH_TMUX_AUTOQUIT=false
export ZSH_TMUX_DEFAULT_SESSION_NAME=main
# these should be always available
antigen bundle tmux

View File

@@ -4,34 +4,9 @@
# - https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
# - https://github.com/dreamsofcode-io/tmux/blob/main/tmux.conf
# Set plugins install dir
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.dotfiles/config/tmux/plugins'
## Install plugins, starting with plugin manager
set -g @tpm_plugins ' \
tmux-plugins/tpm \
b0o/tmux-autoreload \
catppuccin/tmux \
ChanderG/tmux-notify \
christoomey/vim-tmux-navigator \
yardnsm/tmux-1password \
jaclu/tmux-menus \
sainnhe/tmux-fzf \
MunifTanjim/tmux-suspend \
tmux-plugins/tmux-continuum \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-sessionist \
tmux-plugins/tmux-yank \
'
set-option -sa terminal-overrides ",xterm*:Tc"
# Mouse support
set -g mouse on
# Make delay shorter
set -sg escape-time 0
# ╭──────────────────────────────────────────────────────────╮
# │ Bindings │
# ╰──────────────────────────────────────────────────────────╯
# Set <prefix> to Control + Space
unbind C-b
@@ -44,92 +19,27 @@ bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# 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
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Control-Tab & Control-Shift-Tab to switch windows
bind -n C-Tab previous-window
bind -n C-S-Tab next-window
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
# Reload tmux config with <prefix> + r
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux cfg reloaded!"
# Open a new window with <prefix> + N
bind N new-window
# Plugins related configurations
# Set default directory for new windows in this session to current directory:
bind M-c attach-session -c "#{pane_current_path}"
## https://github.com/jaclu/tmux-menus
set -g @menus_trigger 'm'
## https://github.com/jaclu/tmux-1password
set -g @1password-key 'x'
## https://github.com/catppuccin/tmux
set -g @catppuccin_flavour 'mocha' # latte/frappe/macchiato/mocha
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
set -g @catppuccin_window_status_enable "yes"
set -g @catppuccin_window_right_separator "█ "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_middle_separator " | "
set -g @catppuccin_window_default_fill "none"
set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_status_modules "application session date_time"
set -g @catppuccin_status_left_separator "█"
set -g @catppuccin_status_right_separator "█"
set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M"
## https://github.com/MunifTanjim/tmux-mode-indicator
set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}'
set -g @mode_indicator_prefix_prompt ' WAIT '
set -g @mode_indicator_copy_prompt ' COPY '
set -g @mode_indicator_sync_prompt ' SYNC '
set -g @mode_indicator_empty_prompt ' TMUX '
set -g @mode_indicator_prefix_mode_style 'bg=blue,fg=black'
set -g @mode_indicator_copy_mode_style 'bg=yellow,fg=black'
set -g @mode_indicator_sync_mode_style 'bg=red,fg=black'
set -g @mode_indicator_empty_mode_style 'bg=cyan,fg=black'
## https://github.com/MunifTanjim/tmux-suspend
set -g @suspend_key 'F12'
set -g @suspend_suspended_options " \
@mode_indicator_custom_prompt:: ---- , \
@mode_indicator_custom_mode_style::bg=brightblack\\,fg=black, \
"
## https://github.com/tmux-plugins/tmux-continuum
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'
## https://github.com/tmux-plugins/tmux-resurrect
set -g @resurrect-strategy-nvim 'session'
## https://github.com/b0o/tmux-autoreload
set-option -g @tmux-autoreload-configs '~/.dotfiles/config/tmux/tmux.conf'
## https://github.com/sainnhe/tmux-fzf
TMUX_FZF_LAUNCH_KEY="l"
## https://github.com/ChanderG/tmux-notify
set -g @tnotify-verbose 'on'
# set vi-mode
set-window-option -g mode-keys vi
# Open a new window in the current directory
bind C new-window -c "#{pane_current_path}"
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
@@ -153,5 +63,72 @@ bind Escape copy-mode
unbind p
bind p paste-buffer
# ╭──────────────────────────────────────────────────────────╮
# │ Settings │
# ╰──────────────────────────────────────────────────────────╯
# Mouse support
set -g mouse on
# Make delay shorter
set -sg escape-time 0
# 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
# set vi-mode
set-window-option -g mode-keys vi
# ╭──────────────────────────────────────────────────────────╮
# │ Plugins │
# ╰──────────────────────────────────────────────────────────╯
# Set plugins install dir
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.dotfiles/config/tmux/plugins'
## Install plugins, starting with plugin manager
set -g @tpm_plugins ' \
catppuccin/tmux \
tmux-plugins/tmux-continuum \
jaclu/tmux-menus \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-sessionist \
tmux-plugins/tmux-yank \
tmux-plugins/tpm \
'
# ╭──────────────────────────────────────────────────────────╮
# │ Plugins related configurations │
# ╰──────────────────────────────────────────────────────────╯
## https://github.com/jaclu/tmux-menus
set -g @menus_trigger 'm'
## https://github.com/catppuccin/tmux
set -g @catppuccin_flavour "mocha" # latte/frappe/macchiato/mocha
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
set -g @catppuccin_window_status_enable "yes"
## set -g @catppuccin_window_right_separator "█"
set -g @catppuccin_window_number_position "left"
set -g @catppuccin_window_middle_separator ": "
set -g @catppuccin_window_default_fill "none"
set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_status_modules "application session date_time"
set -g @catppuccin_status_left_separator "█"
set -g @catppuccin_status_right_separator "█"
set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M"
## https://github.com/tmux-plugins/tmux-continuum
set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
## https://github.com/tmux-plugins/tmux-resurrect
set -g @resurrect-strategy-nvim 'session'
# Finally run the tmux plugin manager
run '~/.dotfiles/config/tmux/plugins/tpm/tpm'