-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
42 lines (33 loc) · 1.3 KB
/
tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Set vim-like key bindings
set-window-option -g mode-keys vi
# Set the history-limit to 10,000,000
set-option -g history-limit 10000000
# Fix terminal colors
set -g default-terminal "screen-256color"
set -ag terminal-overrides ",alacritty:RGB"
# Control + k to clear the history
bind -n C-k send-keys -R \; clear-history
# <Leader> r to reload the tmux configurations
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# <Leader> s to edit tmux configurations
bind-key s split-window -h "nvim ~/.tmux.conf"
# Save history to file
bind-key C-p command-prompt -p "Save to file:" \
-I "~/tmux.history" \
"capture-pane -S - ; save-buffer %1 ; delete-buffer"
# Disable login shells
set -g default-command "${SHELL}"
# Copy selection to clipboard
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# Reorder windows
bind R \
set -g renumber-windows on\; \
new-window\; kill-window\; \
set -g renumber-windows off\; \
display-message "Windows reordered..."
# Install plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'dracula/tmux'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @dracula-plugins 'git battery'
run '~/.tmux/plugins/tpm/tpm'