-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
98 lines (73 loc) · 3.04 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Tmux plugins {{{
# Move the plugin manager path
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins/'
# Install tmux plugin manager if not installed
if "test ! -d ~/.config/tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm && ~/.config/tmux/plugins/tpm/bin/install_plugins'"
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-yank'
run -b '~/.config/tmux/plugins/tpm/tpm'
# Tmux plugins }}}
# General {{{ ------------------------------------------------------------------
set -g default-terminal "tmux-256color" # Set default terminal
set-option -sa terminal-features ',XXX:RGB'
set -as terminal-overrides ",alacritty*:Tc"
set-option -sa terminal-overrides ",xterm*:Tc" # Enable True Color Support
set -g mouse on # Enable the mouse
# Instead of copying to primary, make `MouseDragEnd1Pane` go to clipboard
set -g @yank_selection_mouse 'clipboard'
# Start non-login shell
set -g default-command "${SHELL}"
# General }}} ------------------------------------------------------------------
# Colorscheme {{{
# Set to base16 - monokai
source-file "${HOME}/.config/tmux/colors/base16-molokai.tmuxtheme"
# Colorscheme }}}
# Display {{{ ------------------------------------------------------------------
# Start windows numbering at 1
set -g base-index 1
setw -g pane-base-index 1
# # Auto rename/renumber windowso
setw -g automatic-rename on
set -g renumber-windows on
# Enable aggressive-resize
setw -g aggressive-resize on
# Allow for a longer left status info
set -g status-left-length 32
set -g status-right '#{prefix_highlight} │ %a %Y-%m-%d %H:%M'
set -g @prefix_highlight_fg '#191919'
set -g @prefix_highlight_bg '#66D9EF'
set -g @prefix_highlight_prefix_prompt 'Prefix'
# Display }}} ------------------------------------------------------------------
# Key Bindings {{{
# EXPERIMENTAL
set-window-option -g status-keys vi
set-window-option -g mode-keys vi
# Set Default prefix key to Ctrl-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Clear screen with Ctrl-l
unbind C-l
bind-key -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history
# Reload config by pressing prefix + r
unbind S-r
bind-key S-r source-file ~/.tmux.conf \; display-message "Tmux configs reloaded"
# bind-key -T prefix r refresh-client
# unbind r
# bind-key r run-shell -b '$HOME/.config/tmux/scripts/rename.sh'
# Make copying more vim-like
bind-key -T prefix v copy-mode # Go into copy mode. Alias to prefix+[
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# bind S command-prompt -p "New Session:" "new-session -A -s '%%'"
bind -T prefix S new-session
bind -T prefix K confirm-before -p "kill-session #W? (y/n)" kill-session
# Key Bindings }}}