tmux: Add different bindings

Add bindings:
 - Resource config
 - Toggle fullscreen on pane
 - Better vim emulation (WIP)
This commit is contained in:
2022-03-30 03:41:00 +02:00
parent b16b230e99
commit 4ebc729c99

View File

@@ -31,6 +31,23 @@ bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Resource config
bind-key -T prefix R source-file "$XDG_CONFIG_HOME/tmux/tmux.conf" \; display-message "Sourced $XDG_CONFIG_HOME/tmux/tmux.conf"
# Fullscreen pane (toggle)
bind-key -T prefix F resize-pane -Z
# Vim-bindings
# Enter copy-mode with Escape
bind-key -T prefix Escape copy-mode
# Start selection (e.g. visual mode) with `v`
unbind -T copy-mode-vi v
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Yank into system clipboard
bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -selection clipboard"
# Navigate panes with hjkl
unbind -T prefix l
bind -T prefix h select-pane -L
bind -T prefix j select-pane -D
@@ -41,9 +58,17 @@ bind -T prefix C-h select-pane -L
bind -T prefix C-j select-pane -D
bind -T prefix C-k select-pane -U
bind -T prefix C-l select-pane -R
# Resize panes with Alt-Shift-[hjkl]
bind -n M-H resize-pane -L
bind -n M-J resize-pane -D
bind -n M-K resize-pane -U
bind -n M-L resize-pane -R
# Resize panes with Alt-Shift-<arrow>
bind -n M-S-Left resize-pane -L
bind -n M-S-Up resize-pane -D
bind -n M-S-Down resize-pane -U
bind -n M-S-Right resize-pane -R
# Change installation location of plugins
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins/'