fixes and tmux config structure
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
# List of plugins
|
# List of plugins
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
||||||
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
###############################################################################
|
||||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
###############################################################################
|
||||||
set -g @plugin 'tmux-plugins/tmux-open'
|
### general config ###
|
||||||
|
###############################################################################
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
|
||||||
bind r source-file ~/.tmux.conf \; display "Reloaded!" # Reload with ctrl-r
|
bind r source-file ~/.tmux.conf \; display "Reloaded!" # Reload with ctrl-r
|
||||||
set -sg escape-time 1 # quicker responses
|
set -sg escape-time 1 # quicker responses
|
||||||
@@ -18,7 +21,6 @@ set-option -gw xterm-keys on
|
|||||||
bind-key -n C-t new-window
|
bind-key -n C-t new-window
|
||||||
bind-key -n C-S-t new-window -c '#{pane_current_path}'
|
bind-key -n C-S-t new-window -c '#{pane_current_path}'
|
||||||
|
|
||||||
# Pane splits should open to the same path as the current pane
|
|
||||||
bind '"' split-window -v -c "#{pane_current_path}"
|
bind '"' split-window -v -c "#{pane_current_path}"
|
||||||
bind % split-window -h -c "#{pane_current_path}"
|
bind % split-window -h -c "#{pane_current_path}"
|
||||||
|
|
||||||
@@ -27,9 +29,6 @@ bind-key -n C-S-Up previous-window
|
|||||||
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
|
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
|
||||||
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
|
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
|
||||||
|
|
||||||
# Smart pane switching with awareness of Vim splits.
|
|
||||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
|
||||||
|
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
|
|
||||||
set-option -g default-shell $SHELL
|
set-option -g default-shell $SHELL
|
||||||
@@ -40,14 +39,48 @@ set-option -ga terminal-features ",alacritty:usstyle"
|
|||||||
set-option -ga terminal-overrides ',alacritty:Tc'
|
set-option -ga terminal-overrides ',alacritty:Tc'
|
||||||
set -g default-terminal "alacritty"
|
set -g default-terminal "alacritty"
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
###############################################################################
|
||||||
|
### theme and misc plugins ###
|
||||||
|
###############################################################################
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
set -g @plugin 'dracula/tmux'
|
set -g @plugin 'dracula/tmux'
|
||||||
|
|
||||||
|
set -g @dracula-plugins "git weather time continuum battery"
|
||||||
|
set -g @dracula-show-fahrenheit false
|
||||||
|
set -g @dracula-fixed-location "Madrid"
|
||||||
|
set -g @dracula-show-powerline false
|
||||||
|
set -g @dracula-transparent-powerline-bg true
|
||||||
|
set -g @dracula-military-time true
|
||||||
|
set -g @dracula-day-month true
|
||||||
|
|
||||||
|
set -g @plugin 'ofirgall/tmux-window-name'
|
||||||
|
|
||||||
|
set -g @tmux_window_name_substitute_sets "[('.+bash', 'bash'), ('cbonsai.+', 'cbonsai')]"
|
||||||
|
set -g @tmux_window_name_shells "['bash', 'fish', 'sh', 'zsh']"
|
||||||
|
set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git', 'cbonsai']"
|
||||||
|
set -g @tmux_window_name_use_tilde "True"
|
||||||
|
set -g @tmux_window_name_max_name_len "100"
|
||||||
|
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-open'
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
###############################################################################
|
||||||
|
### tmux-continuum ###
|
||||||
|
###############################################################################
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
|
|
||||||
set -g @resurrect-capture-pane-contents 'on'
|
set -g @resurrect-capture-pane-contents 'on'
|
||||||
set -g @resurrect-dir '~/.tmux/resurrect/'
|
set -g @resurrect-dir '~/.tmux/resurrect/'
|
||||||
|
|
||||||
set -g @continuum-save-interval '15'
|
set -g @continuum-save-interval '15'
|
||||||
set -g @continuum-restore 'on'
|
set -g @continuum-restore 'on'
|
||||||
set -g @continuum-boot 'on'
|
set -g @continuum-boot 'on'
|
||||||
|
set -g @dracula-continuum-mode countdown
|
||||||
|
|
||||||
### tmux-resurrect
|
### tmux-resurrect
|
||||||
set -g @resurrect-save 'S' # prefix + Shift-s - save
|
set -g @resurrect-save 'S' # prefix + Shift-s - save
|
||||||
@@ -57,25 +90,15 @@ set -g @resurrect-strategy-nvim 'session'
|
|||||||
|
|
||||||
set -g @continuum-boot-options 'alacritty,fullscreen'
|
set -g @continuum-boot-options 'alacritty,fullscreen'
|
||||||
|
|
||||||
set -g @dracula-plugins "git weather time battery"
|
###############################################################################
|
||||||
set -g @dracula-show-fahrenheit false
|
###############################################################################
|
||||||
set -g @dracula-fixed-location "Madrid"
|
### Nvim-tmux-navigation setup ###
|
||||||
set -g @dracula-show-powerline false
|
###############################################################################
|
||||||
set -g @dracula-transparent-powerline-bg true
|
###############################################################################
|
||||||
set -g @dracula-military-time true
|
|
||||||
set -g @dracula-day-month true
|
|
||||||
|
|
||||||
set -g @plugin 'ofirgall/tmux-window-name'
|
|
||||||
set -g @tmux_window_name_substitute_sets "[('.+bash', 'bash'), ('cbonsai.+', 'cbonsai')]"
|
|
||||||
set -g @tmux_window_name_shells "['bash', 'fish', 'sh', 'zsh']"
|
|
||||||
set -g @tmux_window_dir_programs "['nvim', 'vim', 'vi', 'git', 'cbonsai']"
|
|
||||||
set -g @tmux_window_name_use_tilde "True"
|
|
||||||
set -g @tmux_window_name_max_name_len "100"
|
|
||||||
|
|
||||||
# decide whether we're in a Vim process
|
# decide whether we're in a Vim process
|
||||||
is_vim="~/.is_vim.sh '#{pane_tty}'"
|
is_vim="~/.is_vim.sh '#{pane_tty}'"
|
||||||
|
|
||||||
|
|
||||||
bind-key -n 'S-Left' if-shell "$is_vim" 'send-keys S-Left' 'select-pane -L'
|
bind-key -n 'S-Left' if-shell "$is_vim" 'send-keys S-Left' 'select-pane -L'
|
||||||
bind-key -n 'S-Down' if-shell "$is_vim" 'send-keys S-Down' 'select-pane -D'
|
bind-key -n 'S-Down' if-shell "$is_vim" 'send-keys S-Down' 'select-pane -D'
|
||||||
bind-key -n 'S-Up' if-shell "$is_vim" 'send-keys S-Up' 'select-pane -U'
|
bind-key -n 'S-Up' if-shell "$is_vim" 'send-keys S-Up' 'select-pane -U'
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ unsetopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the histo
|
|||||||
setopt SHARE_HISTORY # Share history between all sessions.
|
setopt SHARE_HISTORY # Share history between all sessions.
|
||||||
|
|
||||||
bindkey '^R' history-incremental-search-backward
|
bindkey '^R' history-incremental-search-backward
|
||||||
|
bindkey '^A' beginning-of-line
|
||||||
|
bindkey '^E' end-of-line
|
||||||
|
bindkey '^K' kill-line
|
||||||
|
|
||||||
setopt AUTO_PUSHD # Push the current directory visited on the stack.
|
setopt AUTO_PUSHD # Push the current directory visited on the stack.
|
||||||
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
||||||
|
|||||||
Reference in New Issue
Block a user