summaryrefslogtreecommitdiff
path: root/xxx/tmux.conf.old
blob: 39178ccc1009fb4c3a2f19f087c904247b695f12 (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
# show status bar when we have multiple windows
# https://www.reddit.com/r/tmux/comments/6lwb07/is_it_possible_to_hide_the_status_bar_in_only_a/
#if -F "#{==:#{session_windows},1}" "set -g status off" "set -g status on"
#set-hook -g window-linked 'if -F "#{==:#{session_windows},1}" "set -g status off" "set -g status on"'
#set-hook -g window-unlinked 'if -F "#{==:#{session_windows},1}" "set -g status off" "set -g status on"'
#set-hook -g window-linked 'set -g status on'
bind-key 'b' set -g status on
bind-key 'B' set -g status off
set -g status on

# set window title
set -g set-titles on
#set -g set-titles-string "~ H:#H h:#h D:#D P:#P T:#T S:#S F:#F I:#I W:#W ~"
set -g set-titles-string "#W"

# hide status bar
# set -g status off

# remap prefix to Control + a
set -g prefix C-a

# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
bind C-b send-prefix
unbind C-b

# vi mode
set-window-option -g mode-keys vi

# terminal
# set -g default-terminal "tmux-256color"  # this makes problems in mc
#set -g default-terminal "xterm-256color"
set -g default-terminal "screen-256color"
set -g base-index 1 # ADDED AT WORK

# escape timeout
set -s escape-time 0

# copy and paste
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-pipe "xclip > /dev/null"
bind-key 'P' run "xclip -o | tmux load-buffer - ; tmux paste-buffer"

# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf

# switch panes using Alt-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

# Enable mouse control (clickable windows, panes, resizable panes)

if-shell -b '[ "$(echo "$TMUX_VERSION < 2.1" | bc)" = 1 ]' " \
    set -g mouse-select-window on; \
    set -g mouse-select-pane on; \
    set -g mouse-resize-pane on"

if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.1" | bc)" = 1 ]' "set -g mouse on"

# don't rename windows automatically
set-option -g allow-rename off

bind | split-window -h


######################
### DESIGN CHANGES ###
######################

# 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

#  modes
setw -g clock-mode-colour colour3
setw -g mode-attr bold
setw -g mode-fg colour7
setw -g mode-bg colour4

# panes
set -g pane-border-bg colour0
set -g pane-border-fg colour10
set -g pane-active-border-bg colour0
set -g pane-active-border-fg colour4

# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-bg colour10
set -g status-fg colour0
set -g status-attr dim
set -g status-left ''
set -g status-right ''
set -g status-right-length 50
set -g status-left-length 20

setw -g window-status-current-fg colour10
setw -g window-status-current-bg colour4
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '

setw -g window-status-fg colour0
setw -g window-status-bg colour10
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '

setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour2
setw -g window-status-bell-bg colour1

# messages
set -g message-attr bold
set -g message-fg colour4
set -g message-bg colour0