-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_tmux.conf
139 lines (109 loc) · 4.42 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# @mudiarto tmux configs
#
# I copied/pasted these from multiple sources that looks cool, but I don't
# remember a lot of what they do anymore. I will try to document them as much as I can
#
# NOTE:
# - use "`?", "`:list-keys" or "tmux list-keys" to list all keys
#
#
# improve colors
set -g default-terminal 'screen-256color'
# use backtick as prefix instead of Ctrl-b
unbind C-b
set-option -g prefix `
bind ` send-prefix
# start window numbers at 1 to match keyboard order with tmux window order
set -g base-index 1
set-window-option -g pane-base-index 1
# renumber windows sequentially after closing any of them
set -g renumber-windows on
# act like vim
setw -g mode-keys vi
# <prefix>-h to move to pane on the left
# <prefix>-j to move to pane below
# <prefix>-k to move to pane above
# <prefix>-l to move to pane on the right
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
set -g prefix2 C-s
# soften status bar color from harsh green to light gray
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
# remove administrative debris (session name, hostname, time) in status bar
set -g status-left ''
set -g status-right ''
# increase scrollback lines # original is 2000
# set -g history-limit 10000
set -g history-limit 100000
# prefix -> back-one-character
bind-key C-b send-prefix
# prefix-2 -> forward-incremental-history-search
bind-key C-s send-prefix -2
# don't suspend-client
unbind-key C-z
# Local config - if there is extra for specific computer
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
################################################################################
# my custom tmux config
################################################################################
# activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# invalid - set-window-option -g window-status-current-bg yellow
# <prefix>-r force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# my linux wayland setup
# set -g @custom_copy_command 'wl-copy'
################################################################################
# color scheme (styled as vim-powerline)
################################################################################
set -g status-left-length 52
set -g status-right-length 451
set -g status-fg white
set -g status-bg colour234
# invalid - set -g pane-border-fg colour245
# invalid - set -g pane-active-border-fg colour39
# invalid - set -g message-fg colour16
# invalid - set -g message-bg colour221
# invalid - set -g message-attr bold
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
set -g window-status-format "#[fg=colour235,bg=colour252,bold] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour39,bg=colour234,nobold]⮀"
################################################################################
# reorder window
# from: https://superuser.com/questions/343572/how-do-i-reorder-tmux-windows
# use prefix < & > to move window left & right
################################################################################
bind < swap-window -t -1
bind > swap-window -t +1
################################################################################
# NOTE: i'll use git submodules for now, it seems to be more consistent
# tmux plugin manager: https://github.com/tmux-plugins/tpm
# install: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
#
# prefix+I -> install
# prefix+U -> update
# prefix+alt+u -> uninstall (after it is removed from the list
################################################################################
# List of plugins
#sensible
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'christoomey/vim-tmux-navigator'
# disabled plugin
# tmux-plugins/tmux-resurrect \
# tmux-plugins/tmux-continuum \
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'