-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_tmux.conf
102 lines (80 loc) · 3.01 KB
/
dot_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
# Bootstrapped with: https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
################################################################################
# Key Bindings
################################################################################
# Remap prefix from "C-b" to "C-a"
set-option -g prefix C-a
unbind C-b
bind-key C-a send-prefix
# Split panes using | and -
unbind '"'
unbind "%"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# New window retains current working directory
bind c new-window -c "#{pane_current_path}"
# Switch panes using META-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Quickly reload config file
bind r source-file ~/.tmux.conf \; display "Reloaded "~/.tmux.conf""
# Enable mouse control
set -g mouse on
################################################################################
# Settings
################################################################################
# Don't automatically rename windows
set-option -g allow-rename off
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Theme
# Thease are named colors, just for convenience
color_red="colour160"
color_black="colour232"
################################################################################
# Look and Feel
################################################################################
# Status bar
set-option -g status-position top
# Quiet mode
set -g visual-activity off
set -g visual-bell off
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action none
################################################################################
# Handle nested sessions
# Source: https://gist.github.com/samoshkin/05e65f7f1c9b55d3fc7690b59d678734
################################################################################
# Session is considered to be remote when we ssh into host
if-shell 'test -n "$SSH_CLIENT"' \
'source-file ~/.tmux.remote.conf'
bind -T root F12 \
set status-style "fg=$color_black,bg=$color_red" \;\
set prefix None \;\
set key-table off \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off F12 \
set -u status-style \;\
set -u prefix \;\
set -u key-table \;\
refresh-client -S
################################################################################
# Plugins
################################################################################
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'dracula/tmux'
# Dracula theme settings
set -g @dracula-plugins "cpu-usage ram-usage"
set -g @dracula-show-powerline true
set -g @dracula-show-flags true
set -g @dracula-show-left-icon session
#set -g @dracula-show-timezone false
#set -g @dracula-day-month true
#set -g @dracula-military-time true
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'