77 lines
2.7 KiB
Bash
77 lines
2.7 KiB
Bash
# Plugind
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
set -g @plugin 'mrjones2014/smart-splits.nvim'
|
|
|
|
# Install `tpm` if needed.
|
|
if "test ! -d ~/.tmux/plugins/tpm" \
|
|
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
|
|
|
|
# Activate the plugins.
|
|
run "~/.tmux/plugins/tpm/tpm"
|
|
|
|
set -g mouse on
|
|
|
|
# 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 -g @smart-splits_no_wrap '' # to disable wrapping. (any value disables wrapping)
|
|
|
|
set -g @smart-splits_move_left_key 'C-h' # key-mapping for navigation.
|
|
set -g @smart-splits_move_down_key 'C-j' # --"--
|
|
set -g @smart-splits_move_up_key 'C-k' # --"--
|
|
set -g @smart-splits_move_right_key 'C-l' # --"--
|
|
|
|
set -g @smart-splits_resize_left_key 'M-h' # key-mapping for resizing.
|
|
set -g @smart-splits_resize_down_key 'M-j' # --"--
|
|
set -g @smart-splits_resize_up_key 'M-k' # --"--
|
|
set -g @smart-splits_resize_right_key 'M-l' # --"--
|
|
|
|
set -g @smart-splits_resize_step_size '3' # change the step-size for resizing.
|
|
|
|
bind -n C-M-h split-window -h -b -c "#{pane_current_path}"
|
|
bind -n C-M-l split-window -h -c "#{pane_current_path}"
|
|
bind -n C-M-j split-window -v -c "#{pane_current_path}"
|
|
bind -n C-M-k split-window -v -b -c "#{pane_current_path}"
|
|
|
|
bind -n M-1 select-window -t 1
|
|
bind -n M-2 select-window -t 2
|
|
bind -n M-3 select-window -t 3
|
|
bind -n M-4 select-window -t 4
|
|
bind -n M-5 select-window -t 5
|
|
bind -n M-n select-window -n
|
|
|
|
bind -n M-c new-window
|
|
bind -n M-x confirm kill-pane
|
|
|
|
bind -n C-g display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "lazygit"
|
|
|
|
set-option -g status-position top
|
|
set-option -g default-terminal "tmux-256color"
|
|
set-option -sa terminal-features ',xterm-256color:RGB'
|
|
set-option -sg escape-time 1
|
|
set-option -g focus-events on
|
|
set-option -g status-right-length 100
|
|
set-option -g set-clipboard on
|
|
|
|
set -g status-interval 2
|
|
set -g status-bg "#303030"
|
|
set -g status-fg "#c6c6c6"
|
|
set -g status-left ''
|
|
set -g status-right '#[fg=#87afd7,bg=#303030]#[fg=#c6c6c6,bg=#303030] #{pane_current_path} #[bg=#87afd7,fg=#000000] %d-%b-%Y %H:%M '
|
|
|
|
# Use normal and bright monochrome colors to show a tab line on the left.
|
|
set -g status-justify left
|
|
set-window-option -g window-status-separator ''
|
|
set-window-option -g window-status-format '#[bg=#303030,fg=#c6c6c6] #I '
|
|
set-window-option -g window-status-current-format '#[bg=#87afd7,fg=#000000] #I '
|
|
|
|
# Switching panes should change the foreground color but not border colors.
|
|
set -g window-style 'bg=default,fg=#c6c6c6'
|
|
set -g window-active-style 'bg=default,fg=white'
|
|
set -g pane-border-style 'bg=#000000,fg=#262626'
|
|
set -g pane-active-border-style 'bg=#000000,fg=#000000'
|