summaryrefslogtreecommitdiff
path: root/.config/tmux/linux
blob: d20b1b7d421a0381b354652f26369de795c66a92 (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
153
154
155
######################
# 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

# 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 %

# update titles
set-option -g set-titles on
set-option -g set-titles-string "#W"

# 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"

# Pane-layout
bind K swap-pane -U
bind J swap-pane -D

# 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-pipe-and-cancel 'xclip -in -selection clipboard'
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 "screen-256color"

# 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=colour7,fg=colour0"

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

# default window title colors
set-option -wg window-status-style "bg=colour0,fg=colour246"

# colors for windows with activity
set-option -wg window-status-activity-style "bg=colour0,fg=colour7"

# colors for windows with bells
set-option -wg window-status-bell-style "bg=colour0,fg=colour208"

# active window title colors
set-option -wg window-status-current-style "bg=colour208,fg=colour0"

# pane border
set-option -g pane-active-border-style "fg=colour4"
set-option -g pane-border-style "fg=colour7"

# message info
set-option -g message-style "bg=colour7,fg=colour0"

# writing commands inactive
set-option -g message-command-style "bg=colour7,fg=colour0"

# pane number display
set-option -g display-panes-active-colour "4"
set-option -g display-panes-colour "7"

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

# copy mode highlighting
%if #{>=:#{version},3.2}
    set-option -wg copy-mode-match-style "bg=colour7,fg=colour0"
    set-option -wg copy-mode-current-match-style "bg=colour2,fg=colour0"
%endif

# statusbar formatting
set-option -g status-left "#[bg=7,fg=0]#{?client_prefix,#[bg=2],#[bg=colour247]} #{session_name} "
set-option -g status-right "#[fg=colour233,bg=colour19] %d/%m #[fg=colour233,bg=colour19] %H:%M:%S #[bg=7, fg=0]#{?client_prefix,#[bg=2],#[bg=7]} #{host_short} "

set-option -wg window-status-current-format "#{?window_zoomed_flag,#[fg=default bold],#[fg=default]}#[bg=4] #{window_index}:#{?window_zoomed_flag,*, }#{window_name}#{?window_zoomed_flag,*, }"
set-option -wg window-status-format "#{?window_zoomed_flag,#[fg=15 bold],#[fg=15]}#[bg=236] #{window_index}: #{window_name} "