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
|
# Configured by claw0ry <claw0ry@proton.me>
# change default meta key
unbind C-b
unbind C-a
set -g prefix C-b
# use a different prefix for nested
bind-key -n C-y send-prefix
# allow mouse
set -g mouse on
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
# tmux-sessioniser
bind-key -r f run-shell "tmux neww ~/.local/scripts/tmux-sessionizer"
# escape time
set-option -sg escape-time 10
# focus-events
set-option -g focus-events on
# avoid cursor movement messing with resize
set -g repeat-time 200
set -g base-index 1
setw -g pane-base-index 1
# true-color (24bit)
set -g default-terminal "tmux-256color"
set -sg terminal-overrides ",*:RGB"
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# add double-tap meta key to toggle last window
bind-key C-b last-window
# create more intuitive split key combos (same as modern screen)
unbind "'"
bind "'" split-window -h -c "#{pane_current_path}"
bind '\' split-window -h -c "#{pane_current_path}"
bind 'C-\' split-window -h -c "#{pane_current_path}"
unbind -
bind - split-window -v -c "#{pane_current_path}"
unbind _
bind _ split-window -v -c "#{pane_current_path}"
# vi for copy mode
setw -g mode-keys vi
# vi for command status
set -g status-keys vi
# vi keys to resize
bind -r C-k resize-pane -U 5
bind -r C-j resize-pane -D 5
bind -r C-h resize-pane -L 5
bind -r C-l resize-pane -R 5
# vi keys to navigate panes
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
# reload configuration
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# Reorder windows
bind R move-window -r;
# Fix Home/End keys
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
# very unique Mac bug
if-shell "type 'reattach-to-user-namespace' >/dev/null" "set -g default-command 'reattach-to-user-namespace -l $SHELL'"
# === STATUSBAR
set-option -g status-justify left
set-option -g status-left-length 20
setw -g automatic-rename on
set -g base-index 1
# -- Gruber Darker
set -g status-bg "#181818"
set -g status-fg "#f4f4ff"
set -g status-style "bg=#181818,none,align=left"
set -g message-style "fg=#aeafb0,bg=#181818"
set -g message-command-style "fg=#aeafb0,bg=#181818"
set -g pane-border-style "fg=#57575e,bg=#181818"
set -g pane-active-border-style "fg=#57575e,bg=#181818"
set -g pane-border-status bottom
set -g pane-border-format '─'
set -g mode-style "fg=#dfdfe5,bg=#2f0e82"
set -g window-style "bg=#181818"
set -g window-active-style "bg=#181818"
setw -g window-status-style "fg=#aeafb0,bg=black,none"
setw -g window-status-activity-style "fg=magenta,bg=#181818,none"
setw -g window-status-separator ""
set-window-option -g window-status-format ' #[fg=white,dim]#I:#W#F '
set-window-option -g window-status-current-format ' #[bg=#ffdd33,fg=black] #I#[bg=#ffdd33,fg=black]:#[fg=black]#W#[fg=dim]#F '
set -g status-left-style "none"
set -g status-right-style "none"
set -g status-left-length "100"
set -g status-right-length "100"
set-option -g status-left ' #[fg=blue]•#[fg=green]•#[fg=yellow]•#[fg=red]•#[fg=#57575e]'
set -g status-right '[%d-%m-%Y %H:%M]'
|