This repository has been archived by the owner on Jul 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
tmux.conf
127 lines (115 loc) · 4.36 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
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
# Change prefix key to Ctrl+o
set -g prefix C-o
unbind C-b
bind C-o send-prefix
#set -g default-terminal "screen-256color"
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g history-limit 10000
set -sg escape-time 1
setw -g monitor-activity on
set -g mouse on
# mouse drag copies to tmux buffer, paste with prefix ]
# shift mouse drag just selects, copy with M-w defined below
#bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel "xclip -sel clip -i"
#bind-key -T copy-mode C-y run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
#bind-key -T root M-w send-keys -X copy-pipe-and-cancel "xclip -sel clip -i"
#bind-key -T root C-y run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
# reload tmux config
bind r source-file ~/.tmux.conf
# create window if it doesn't exist
bind-key 0 if-shell 'tmux select-window -t :0' '' 'new-window -t :0'
bind-key 1 if-shell 'tmux select-window -t :1' '' 'new-window -t :1'
bind-key 2 if-shell 'tmux select-window -t :2' '' 'new-window -t :2'
bind-key 3 if-shell 'tmux select-window -t :3' '' 'new-window -t :3'
bind-key 4 if-shell 'tmux select-window -t :4' '' 'new-window -t :4'
bind-key 5 if-shell 'tmux select-window -t :5' '' 'new-window -t :5'
# override defaults to get 24 bit color, https://github.com/syl20bnr/spacemacs/wiki/Terminal
set -g default-terminal "xterm-24bit"
set -g terminal-overrides ",xterm-24bit:Tc"
# cycle pane, same as C-o o
bind ^o select-pane -t :.+
# new window in the same path
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# convert window into a pane
bind-key j command-prompt -p "Create pane from window #:" "join-pane -s ':%%'"
# break-pane is bound to !
#set -g visual-activity off
#set -g visual-bell off
#set -g visual-silence off
#setw -g monitor-activity off
set -g bell-action none
# Theme
#for i in {0..255}; do
# printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\n"
#done
# https://jonasjacek.github.io/colors/
# https://man.openbsd.org/tmux.1#STYLES
#set -g status-bg default
#set -g status-interval 30
#set -g status-style bg='#c6c6c6',fg=blue
#set -g status-left-style bg='#c6c6c6',fg=black
#set -g status-left-length 40
#set -g status-left "#S #[fg=black]» #[fg=magenta]#I #[fg=blue]#P"
#set -g status-right-style bg='#c6c6c6',fg=black
#set -g status-right-length 40
#set -g status-right "#[fg=blue]#H #[fg=black]« #[fg=magenta]%H:%M:%S #[fg=black]%d-%b-%y"
#set -g window-status-format " #I:#W#F "
#set -g window-status-current-format " #I:#W#F "
#set -g window-status-current-style bg=magenta,fg=white
#set -g window-status-activity-style bg=blue,fg=brightyellow
#set -g window-status-separator ""
#set -g status-justify centre
#set -g pane-border-style bg=default,fg=default
#set -g pane-active-border-style bg=default,fg=black
#set -g display-panes-colour default
#set -g display-panes-active-colour default
#set -g clock-mode-style 24
#set -g message-style bg=default,fg=default
#set -g message-command-style bg=default,fg=default
#set -g mode-style bg=yellow,fg=default
#setw -g window-active-style fg=white,bg=black
#setw -g window-style fg=colour255,bg=colour239
# from https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
#######################
#### DESIGN CHANGES ###
#######################
#
## loud or quiet?
#set -g visual-activity off
#set -g visual-bell off
#set -g visual-silence off
#setw -g monitor-activity off
#set -g bell-action none
#
## modes
#setw -g clock-mode-colour colour5
#setw -g mode-style 'fg=colour1 bg=colour18 bold'
#
## panes
#set -g pane-border-style 'fg=colour19 bg=colour0'
#set -g pane-active-border-style 'bg=colour0 fg=colour9'
#
## statusbar
#set -g status-position bottom
#set -g status-justify left
#set -g status-style 'bg=colour18 fg=colour137 dim'
#set -g status-left ''
#set -g status-right '#[fg=colour233,bg=colour19] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S '
#set -g status-right-length 50
#set -g status-left-length 20
#
#setw -g window-status-current-style 'fg=colour1 bg=colour19 bold'
#setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
#
#setw -g window-status-style 'fg=colour9 bg=colour18'
#setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
#
#setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
#
## messages
#set -g message-style 'fg=colour232 bg=colour16 bold'
#