mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 14:32:13 +02:00
66 lines
1.8 KiB
Bash
66 lines
1.8 KiB
Bash
# Open in current director# Rebind Ctrl-b to Ctrl-a
|
|
unbind C-b
|
|
set-option -g prefix C-a
|
|
bind-key C-a send-prefix
|
|
|
|
# VI-mode
|
|
set-window-option -g mode-keys vi
|
|
|
|
# Enable Vi copy commands
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -selection clipboard'
|
|
|
|
# Vim keybinding for resizing panes
|
|
bind -r C-h resize-pane -L # Control-a Control-h
|
|
bind -r C-j resize-pane -D # Control-a Control-j
|
|
bind -r C-k resize-pane -U # Control-a Control-k
|
|
bind -r C-l resize-pane -R # Control-a Control-l
|
|
|
|
# Vim keybinding for switching between panes
|
|
bind h select-pane -l # Control-a h
|
|
bind j select-pane -D # Control-a j
|
|
bind k select-pane -U # Control-a k
|
|
bind l select-pane -R # Control-a l
|
|
|
|
# split panes using | and -
|
|
bind | split-window -h
|
|
bind - split-window -v
|
|
unbind '"'
|
|
unbind %
|
|
|
|
# Disable completely the mouse
|
|
set -g mouse off
|
|
|
|
# open/split window with current path
|
|
bind '"' split-window -c "#{pane_current_path}"
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
# Longer workspace names
|
|
set -g status-left-length 20
|
|
|
|
# fix for tokyo-night theme
|
|
set -g status-bg "#414868"
|
|
|
|
# List of TPM plugins
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
set -g @plugin "janoamaral/tokyo-night-tmux"
|
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
set -g @plugin 'tmux-plugins/tmux-sessionist'
|
|
|
|
# Install TPM if it is not already installed
|
|
if "test ! -d ~/.tmux/plugins/tpm" "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
|
|
|
|
# Initialize TPM
|
|
run '~/.tmux/plugins/tpm/tpm'
|
|
|
|
# Install plugins on startup
|
|
run '~/.tmux/plugins/tpm/bin/install_plugins'
|
|
|
|
# Update plugins on startup
|
|
run '~/.tmux/plugins/tpm/bin/update_plugins all'
|
|
|
|
# Clean plugins on startup
|
|
run '~/.tmux/plugins/tpm/bin/update_plugins all'
|