-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
108 lines (76 loc) · 3.06 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
99
100
101
102
103
104
105
106
107
108
#
# ZeroKnight's .tmux.conf
#
### Options
set -g prefix C-e ; bind C-e send-prefix ; unbind C-b
# 24-bit colors
set -s default-terminal 'tmux-256color'
set -sa terminal-overrides ',xterm-kitty:Tc,xterm-termite:Tc,xterm-256color:Tc'
# Undercurl
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# Disable Escape-timeout
set -s escape-time 0
# Set number of scrollback lines
set -g history-limit 5000
# Duration of status line messages and various indicators
set -g display-time 2000
set -g display-panes-time 2000
# Zero-based indexing is great in programming; not so much in tmux when 0 is all
# the way at the other end of the keyboard :p
set -g base-index 1
setw -g pane-base-index 1
# Automatically re-number other windows when one is closed
set -g renumber-windows on
# Resize a window based on the smallest client actually viewing it, not just the
# smallest one attached
setw -g aggressive-resize on
# Enable focus events and extended keys
set -g focus-events on
set -g extended-keys on
# Automatic window renaming through tmux; manual rename will still override
setw -g automatic-rename on
# Set terminal title
set -g set-titles on
set -g set-titles-string 'tmux #S:#W | #T'
# Copy Mode
setw -g mode-keys vi
# Fun lock screen
set -g lock-command 'nice -n19 cmatrix -bs'
### Key-bindings
# Better split bindings
bind | split-window -h ; unbind '"'
bind - split-window -v ; unbind '%'
# Reload Configuration
bind R source-file ~/.tmux.conf \; display-message 'Config Reloaded!'
# Create new window with name
bind C command-prompt -p 'New window:' "new-window -n '%%'"
# Open a pane with glances
# bind '~' split-window 'exec glances'
# Switch Panes
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# Last Window (default overwritten by above)
bind C-l last-window
bind 'M-m' show-messages
# Copy-Mode
bind -T copy-mode-vi 'v' begin-selection
bind -T copy-mode-vi 'y' copy-pipe 'xsel -i -o -p | xsel -i -b'
### Theme Configuration
source -q $HOME/.config/tmux/theme.tmux
set -g status-interval 10
set -g status-justify 'centre'
# Left/Right Status Line and Messages
set -g status-left " #[fg=yellow]#h#[fg=default] :: #[fg=#{?client_prefix,magenta,green}]#[bold]#S#[nobold]#{?session_grouped,#[fg=default].#[fg=cyan]#{session_group},} #[fg=cyan]╱#[fg=default] "
set -g status-left-length 50
set -g status-right "#[fg=cyan]╱#[fg=default] #(~/.config/tmux/loadavg) :: #[fg=blue]Up #(~/.config/tmux/uptime.py) #[fg=cyan]╱#[fg=blue] %a %b %d • %H:%M#[fg=default]"
set -g status-right-length 70
# Windows
setw -g window-status-format ' #[fg=colour011]#I:#[fg=#{?window_bell_flag,colour009,default}]#W#[fg=colour011]#F#[fg=default] '
setw -g window-status-current-format ' #[fg=cyan]#I:#[fg=colour015]#W#[fg=cyan]#F#[fg=default] '
setw -g window-status-bell-style 'bg=default'
set -g clock-mode-colour 'blue'
### Load default sessions
source -q $HOME/.config/tmux/sessions.tmux