-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
97 lines (77 loc) · 3.24 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
# TMUX CONFIGURATION
# Use C-s (control and s key at the same time) as the prefix key
unbind C-b
set -g prefix C-s
# Use C-s + r to reload configuration file
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# Automatically set window title
# set-window-option -g automatic-rename on
set-option -g allow-rename on
set-option -g set-titles on
set -g default-terminal "screen-256color"
set -g status-bg '#666666'
set -g status-fg '#aaaaaa'
bind-key - split-window -v -c '#{pane_current_path}'
# Fine adjustment (1 or 2 cursor cells per bump)
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
# Coarse adjustment (5 or 10 cursor cells per bump)
bind -n C-Left resize-pane -L 10
bind -n C-Right resize-pane -R 10
bind -n C-Down resize-pane -D 5
bind -n C-Up resize-pane -U 5
# configuration of the status line
bind-key b set-option status
bind / set -g status
if-shell "[[ $(tmux lsw | wc -l) -le 1 ]]" 'set -g status'
set -g status-left-length 32
set -g status-right-length 150
set -g status-fg white
set -g status-bg colour234
# set -g pane-border-fg colour245
# set -g pane-active-border-fg colour39
# set -g message-fg black
# set -g message-bg brightwhite
# set -g message-attr bold
# set -g window-status-bell-attr bold
# set -g window-status-bell-bg yellow
# set -g window-status-activity-bg red
# set -g window-status-bell-fg brightred
# set -g base-index 1
# setw -g pane-base-index 1
#set -g status-left '#[fg=colour15,bg=colour11,bold] #S #[fg=white,bg=black] '
#defaultdispfg="#[fg=colour15]"
#defaultdispbg="#[bg=colour0]"
#prefixdispfg="#[fg=colour25]"
#prefixdispbg="#[bg=colour39]"
#plaindisp="#[fg=white,bg=black]"
#set -g status-left "#[bold]#{?client_prefix,$prefixdispbg,$defaultdispbg}#{?client_prefix,$prefixdispfg,$defaultdispfg} #S $plaindisp "
#set -g status-left "#{?client_prefix,#[reverse],} #S #[noreverse]$plaindisp "
set -g status-left "#(if [[ $(tmux ls | wc -l) -gt 1 ]]; then tmux display-message -p '#[bg=colour15]#[fg=colour67]#[bold] #S #[bg=black] '; fi)"
set -g window-status-format "#(if [[ $(tmux display-message -p '#{window_panes}') -gt 1 ]]; then echo '#[fg=brightwhite]'; fi) #W "
#set -g window-status-format "#[fg=white]#[bg=colour234] #W "
set -g window-status-separator "#[bg=black] "
set -g window-status-current-format "#[fg=colour25]#{?client_prefix,#[bg=colour45],#[bg=colour39]}#[noreverse]#[bold] #W "
set -g status-right "#[bg=black] #[bg=colour234]#(battery -t) %a %d %b, %I:%M %p"
# position the status bar at top of screen
set-option -g status-position top
set -g mouse on
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'robhurring/tmux-spotify'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# set -g @continuum-restore 'on'
# local customisation
if-shell "[ -f ~/.tmux_local.conf ]" 'source ~/.tmux_local.conf'
# Initialize TMUX plugin manager
# keep this line at the very bottom of tmux.conf
run '~/.tmux/plugins/tpm/tpm'