61 lines
1.8 KiB
Plaintext
61 lines
1.8 KiB
Plaintext
# Plugins
|
|
set -g @plugin 'mrjones2014/smart-splits.nvim'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
|
|
# Settings
|
|
set -ag terminal-overrides ",xterm-256color:RGB"
|
|
setw -g monitor-activity on
|
|
setw -g automatic-rename on
|
|
set-window-option -g xterm-keys on
|
|
|
|
# Setup vi-mode with better keybindings
|
|
# TODO: Escape does not work properly for leaving
|
|
setw -g mode-keys vi
|
|
bind -T copy-mode-vi v send -X begin-selection
|
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
|
|
bind -T copy-mode-vi Escape send-keys -X cancel
|
|
|
|
# Change leader
|
|
unbind C-b
|
|
set -g prefix C-a
|
|
|
|
# Improve navigation between tmux and nvim
|
|
set -g @smart-splits_no_wrap '' # to disable wrapping. (any value disables wrapping)
|
|
|
|
set -g @smart-splits_move_left_key 'M-h' # key-mapping for navigation.
|
|
set -g @smart-splits_move_down_key 'M-j' # --"--
|
|
set -g @smart-splits_move_up_key 'M-k' # --"--
|
|
set -g @smart-splits_move_right_key 'M-l' # --"--
|
|
|
|
set -g @smart-splits_resize_left_key 'M-left' # key-mapping for resizing.
|
|
set -g @smart-splits_resize_down_key 'M-down' # --"--
|
|
set -g @smart-splits_resize_up_key 'M-up' # --"--
|
|
set -g @smart-splits_resize_right_key 'M-right' # --"--
|
|
|
|
# Custom keybinds
|
|
bind s split-window -c "#{pane_current_path}"
|
|
bind v split-window -h -c "#{pane_current_path}"
|
|
bind -n C-j new-window -c "#{pane_current_path}"
|
|
bind -n C-h prev
|
|
bind -n C-l next
|
|
bind -n C-M-l swap-window -t +1 \; next
|
|
bind -n C-M-h swap-window -t -1 \; prev
|
|
|
|
bind -T root F12 \
|
|
set prefix None \;\
|
|
set key-table off \;\
|
|
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
|
|
refresh-client -S \;\
|
|
|
|
bind -T off F12 \
|
|
set -u prefix \;\
|
|
set -u key-table \;\
|
|
refresh-client -S
|
|
|
|
wg_is_keys_off="#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'TRUE' )"
|
|
|
|
# Load theme
|
|
source-file "$DOTFILES/tmux/gruvbox.conf"
|
|
|
|
run "$DOTFILES/tmux/tpm/tpm"
|