feat(all): move to Nord theme

This commit is contained in:
minhtrannhat
2022-07-11 21:35:34 -04:00
parent 9d9fdee9cb
commit fbfeefd849
23 changed files with 555 additions and 196 deletions

View File

@@ -1,4 +1,6 @@
# remap prefix from 'C-b' to 'C-a'
set-environment -g PATH "/usr/local/bin:/bin:/usr/bin"
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
@@ -12,8 +14,9 @@ unbind %
set-option -g default-shell /usr/bin/fish
# index number starts at 1
# window and pane index number starts at 1
set -g base-index 1
setw -g pane-base-index 1
# vi-mode
set-window-option -g mode-keys vi
@@ -23,17 +26,34 @@ bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'wl-copy'
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file /home/minhradz/.tmux.conf
# switch panes using Alt-arrow without prefix
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
is_vim="ps -o state= -o comm= -t '#{pane_tty}'| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|[ln]?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' { if -F '#{pane_at_left}' '' 'select-pane -L' }
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' { if -F '#{pane_at_bottom}' '' 'select-pane -D' }
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' { if -F '#{pane_at_top}' '' 'select-pane -U' }
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' { if -F '#{pane_at_right}' '' 'select-pane -R' }
bind-key -T copy-mode-vi 'C-h' if -F '#{pane_at_left}' '' 'select-pane -L'
bind-key -T copy-mode-vi 'C-j' if -F '#{pane_at_bottom}' '' 'select-pane -D'
bind-key -T copy-mode-vi 'C-k' if -F '#{pane_at_top}' '' 'select-pane -U'
bind-key -T copy-mode-vi 'C-l' if -F '#{pane_at_right}' '' 'select-pane -R'
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?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
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# Neovim escape time
set-option -sg escape-time 10
set-option -sg escape-time 1
set-option -g focus-events on
######################
@@ -49,11 +69,9 @@ set -g bell-action none
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'egel/tmux-gruvbox'
set -g @plugin "arcticicestudio/nord-tmux"
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @tmux-gruvbox 'dark' # or 'light'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'