summaryrefslogtreecommitdiff
path: root/.config/tmux/config
blob: 0c134327046174b3a7eab234513985bd7b6dceca (plain)
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
140
141
142
143
144
145
146
147
148
149
150
151
152
######################
# Key Bindings
######################

# Save your poor pinky
unbind C-b
set-option -g prefix `
bind-key ` send-prefix

# Stay in the vi world
setw -g mode-keys vi

# Use mouse
set -g mouse on

# Change split creation tools
bind | split-window -h
bind _ split-window -v

# Allow for resize mode (-r)
bind -r j resize-pane -D 2 
bind -r k resize-pane -U 2
bind -r l resize-pane -R 2
bind -r h resize-pane -L 2

unbind '"'
unbind %

# Clear screen
bind C-L send-keys 'C-L'

# Reload tmux
bind R source-file ~/.config/tmux/config

# Pane-switching (interfaces with vim)
bind -n C-j run "tmux-send down"
bind -n C-k run "tmux-send up"
bind -n C-h run "tmux-send left"
bind -n C-l run "tmux-send right"

# Layout rotation
bind-key C-o rotate-window

# Creation/Annihilation operators
bind-key a last-pane
bind-key q display-panes
bind-key c new-window
bind-key t next-window
bind-key T previous-window
bind-key f resize-pane -Z

bind-key [ copy-mode
bind-key ] paste-buffer

bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle

# URL view
bind-key u capture-pane \;\
           save-buffer /tmp/tmux-buffer \;\
           split-window -l 10 "urlview /tmp/tmux-buffer"

######################
# Design Changes 
######################

set -g default-terminal "tmux-256color"
set -sa terminal-overrides ",xterm*:Tc:sitm=\E[3m:ritm=\E[23m:Smulx=\E[4::%p1%dm:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m"

# UTF-8
set -q -g status-utf8 on 

# Address vim mode switching
set -sg escape-time 0 

set -g base-index 1
setw -g pane-base-index 1

# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none

######################
# colors
######################

### theme settings ###

# window separators
set-option -wg window-status-separator ""

# monitor window changes
set-option -wg monitor-activity on
set-option -wg monitor-bell on

# set statusbar update interval
set-option -g status-interval 1

### colorscheme ###

# change window screen colors
set-option -wg mode-style bg="#A89984",fg="#3C3836"

# default statusbar colors (terminal bg should be #282828)
set-option -g status-style bg=terminal,fg="#A89984"

# default window title colors
set-option -wg window-status-style bg="#3C3836",fg="#7C6F64"

# colors for windows with activity
set-option -wg window-status-activity-style bg="#3C3836",fg="#A89984"

# colors for windows with bells
set-option -wg window-status-bell-style bg="#3C3836",fg="#FE8019"

# active window title colors
set-option -wg window-status-current-style bg="#FE8019",fg="#3C3836"

# pane border
set-option -g pane-active-border-style fg="#83a598"
set-option -g pane-border-style fg="#504945"

# message info
set-option -g message-style bg="#A89984",fg="#3C3836"

# writing commands inactive
set-option -g message-command-style bg="#A89984",fg="#3C3836"

# pane number display
set-option -g display-panes-active-colour "#83a598"
set-option -g display-panes-colour "#A89984"

# clock
set-option -wg clock-mode-colour "#FE8019"

# copy mode highlighting
%if #{>=:#{version},3.2}
    set-option -wg copy-mode-match-style "bg=#A89984,fg=#3C3836"
    set-option -wg copy-mode-current-match-style "bg=#A9b665,fg=#3C3836"
%endif

# statusbar formatting
# "#fe8019" MUST be in lowercase here (conflicts with statusline alias otherwise)
set-option -g status-left "#[bg=#A89984, fg=#3C3836]#{?client_prefix,#[bg=#bbc585],#[bg=#A89984]} #{session_name} "
set-option -g status-right "#[bg=#A89984, fg=#3C3836]#{?client_prefix,#[bg=#bbc585],#[bg=#A89984]} #{host_short} "

set-option -wg window-status-current-format "#{?window_zoomed_flag,#[fg=default bold],#[fg=default]}#[bg=#83a598] #{window_index}:#{?window_zoomed_flag,*, }#{window_name}#{?window_zoomed_flag,*, }"
set-option -wg window-status-format "#{?window_zoomed_flag,#[fg=#fbf1c7 bold],#[fg=#fbf1c7]}#[bg=#504945] #{window_index}: #{window_name} "