-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
128 lines (102 loc) · 4.04 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
128
# TMUX CONFIG
# Resources
# https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# https://github.com/tmux/tmux/wiki/Recipes
# https://cassidy.codes/blog/2019-08-03-tmux-colour-theme/
# https://i.stack.imgur.com/e63et.png
# Shortcuts
# https://gist.github.com/MohamedAlaa/2961058
# Bind prefix trigger to Command + A
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Start window and pane indexes at 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# Use vim keys to move around
setw -g mode-keys vi
set-option -g mouse on
# Make scrolling with wheels work
# https://stackoverflow.com/questions/11832199/tmux-set-g-mouse-mode-on-not-scrolling
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
#
# # Configure copy and paste via pbcopy
# set-option -g default-command "reattach-to-user-namespace -l $SHELL"
#
# # Bind trigger to clear history in pane
# bind -n C-k clear-history
# # Reload tmux confik
unbind r
bind r source-file ~/.tmux.conf
# Status bar message display time
set-option -g display-time 2000
# Navigation
#
# # smart pane switching with awareness of vim splits
# bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
# bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
# bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
# bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# Switch panes using Option-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
# Design Theme
# ------------
# text_light '#f8f8f8'
# text_dim '#d8d8d8'
# text_dark '#242424'
# gray_light '#dddddd'
# gray_medium '#555555'
# gray_dark '#333333'
# gray_darker '#242424'
# cyan '#8be9fd'
# green '#50fa7b'
# green_dark '#00703E'
# orange '#ffb86c'
# pink '#ff79c6'
# purple '#bd93f9'
# red '#ff5555'
# yellow '#f1fa8c'
# set -g default-terminal "xterm-256color"
# set -g default-terminal "xterm-256color"
# Fix borders
# https://github.com/tmux/tmux/issues/224
set -ag terminal-overrides ',*:cud1=\E[1B'
# Panes
# set -g pane-border-style 'fg=#50fa7b bg=default'
set -g pane-border-style 'bg=default'
# set -g pane-active-border-style 'bg=default fg=#50fa7b'
set -g pane-active-border-style 'fg=#50fa7b'
set -g window-style 'bg=terminal,fg=terminal'
set -g window-active-style 'bg=terminal,fg=terminal'
set -g pane-border-lines heavy
# set -g pane-border-lines number
# set -g pane-border-indicators both # Displays arrows pointing to the current pane.
# Status panels
set -g status-style 'bg=#242424 fg=#fafa8c' # yellow on gray
set -g status-interval 1 # refresh status every second
set -g status-left '#[bg=#333333]#[fg=#282a36]#{?client_prefix,#[bg=#00703E],} ⚡ #[bg=#333333] '
# https://linux.die.net/man/3/strftime
set -g status-right '#[bg=#555555,fg=#d8d8d8] %a %l:%M %p ' # Time
set -ga status-right '🇨🇦 '
set -ga status-right '#[bg=#555555,fg=#d9d8d8] %b %d, %Y ' # Date
# set -g status-position bottom
# set -g status-justify left
# set -g status-right-length 60
# set -g status-left-length 20
# Windows
set -g window-status-current-format "#[fg=#555555]#[bg=#bd93f9]#[fg=#333333]#[bg=#ff79c6] (#I) #W #[fg=#8be9fd]"
set -g window-status-format "#[fg=#dddddd]#[bg=#555555] (#I) #W #[bg=#555555]"
setw -g window-status-style fg='#bd93f9',bg=default
setw -g window-status-current-style fg='#ff80c6',bg='#282a36'
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# Messages (e.g errors)
set -g message-style bg='#ff5555 fg=#ffffff'