59 lines
1.3 KiB
Plaintext
59 lines
1.3 KiB
Plaintext
# plugins
|
|
set -g @plugin 'alexghergh/nvim-tmux-navigation'
|
|
|
|
run '~/.tmux/plugins/tpm/tpm'
|
|
|
|
|
|
# remap prefix from 'C-b' to 'C-a'
|
|
unbind C-b
|
|
set-option -g prefix C-a
|
|
bind-key C-a send-prefix
|
|
|
|
# Enable mouse control (clickable windows, panes, resizable panes)
|
|
set -g mouse on
|
|
|
|
# Initialize sesions
|
|
bind W source-file ~/.tmux/work
|
|
|
|
# reload config
|
|
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
|
|
|
|
# spliting windoww
|
|
unbind %
|
|
unbind '"'
|
|
bind | split-window -h -c "#{pane_current_path}"
|
|
bind - split-window -v -c "#{pane_current_path}"
|
|
|
|
# sync panes
|
|
unbind b
|
|
bind b setw synchronize-panes
|
|
|
|
# reset working dir for session
|
|
unbind h
|
|
bind h attach-session -t . -c "#{pane_current_path}"
|
|
|
|
# status bar
|
|
set -g status-right '%H:%m %d-%b-%y '
|
|
if-shell 'test "$(acpi -t)"' {
|
|
set -g status-right '♥#(acpi | cut -d ',' -f 2) | %H:%m %d-%b-%y '
|
|
}
|
|
|
|
# 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
|
|
|
|
# navigation
|
|
bind-key -r j select-pane -D
|
|
bind-key -r k select-pane -U
|
|
bind-key -r l select-pane -R
|
|
bind-key -r h select-pane -L
|
|
|
|
# resize
|
|
bind-key -r -T prefix M-k resize-pane -U
|
|
bind-key -r -T prefix M-j resize-pane -D
|
|
bind-key -r -T prefix M-h resize-pane -L
|
|
bind-key -r -T prefix M-l resize-pane -R
|
|
|