-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
162 lines (133 loc) · 4.82 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
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
156
157
158
159
160
161
162
# ----------------------------------- mine -----------------------------------
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# form vim/tmux d/y buffer sync
set -g focus-events
# Change the prefix key to C-a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# add double-tap meta key to toggle last window
bind-key C-a last-window
# vi keys to navigate panes
bind k select-pane -U
bind j select-pane -D
bind h select-pane -L
bind l select-pane -R
# vi keys to resize
bind -r C-k resize-pane -U 1
bind -r C-j resize-pane -D 1
bind -r C-h resize-pane -L 1
bind -r C-l resize-pane -R 1
# create more intuitive split key combos (same as modern screen)
unbind |
bind | split-window -h
bind '\' split-window -h
bind 'C-\' split-window -h
unbind -
bind - split-window -v
unbind _
bind _ split-window -v
# vi for copy mode
# setw -g mode-keys vi
# colors, clock, and stuff
set -g default-terminal "xterm-256color" # works, but oh so wrong
#set -ga terminal-overrides ",xterm-256color*:Tc"
# set -g default-terminal "screen-256color"
set -g clock-mode-style 12
setw -g clock-mode-colour cyan
# set -g base-index 1
# -------------------------------- status bar --------------------------------
# defaults
# set -g status on
# set -g status-interval 1
# set -g status-justify left
# set -g status-left "[#S]"
# set -g status-left-length 10
# set -g status-left-style default
# set -g status-position bottom
# set -g status-right " "#{=21:pane_title" %H:%M %d-%b-%y"
# set -g status-right-length 40
# set -g status-right-style default
# set -g status-fg=black
# set -g status-bg=green
# my stuff
set -g status on
set -g status-interval 1
set -g status-justify left
set -g status-keys vi
set -g status-position bottom
set -g status-left "[#S]: "
set -g status-left-length 10
set -g status-right "#(pomo) %A, %B %-e, %Y, %-l:%M%p %Z"
set -g status-right-length 50
set -g window-status-current-style "underscore"
set -g automatic-rename on
# -------------------------------- mouse stuff -------------------------------
# set -g mouse on
# look, idk what these two lines do, but they break the fancy stuff
# unbind -n MouseDrag1Pane
# unbind -Tcopy-mode MouseDrag1Pane
# macOS only
set -g mouse on
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
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will automatically be available in clibboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# ----------------------------------- other ----------------------------------
# If running inside tmux ($TMUX is set), then change the status line to red
%if #{TMUX}
set -g status-bg red
%endif
# Enable RGB colour if running in xterm(1)
set-option -sa terminal-overrides ",xterm*:Tc"
# Change the default $TERM to tmux-256color
# set -g default-terminal "tmux-256color"
# No bells at all
set -g bell-action none
# Keep windows around after they exit
set -g remain-on-exit on
# Some extra key bindings to select higher numbered windows
bind F1 selectw -t:10
bind F2 selectw -t:11
bind F3 selectw -t:12
bind F4 selectw -t:13
bind F5 selectw -t:14
bind F6 selectw -t:15
bind F7 selectw -t:16
bind F8 selectw -t:17
bind F9 selectw -t:18
bind F10 selectw -t:19
bind F11 selectw -t:20
bind F12 selectw -t:21
# A key to toggle between smallest and largest sizes if a window is visible in
# multiple places
# bind F set -w window-size
# Keys to toggle monitoring activity in a window and the synchronize-panes option
bind m set monitor-activity
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
# if run as "tmux attach", create a session if one does not already exist
# new-session -n $HOST
# Create a single default session - because a session is created here, tmux
# should be started with "tmux attach" rather than "tmux new"
# OR FUCKING DONT THIS IS A STRAIGHT UP NIGHTMARE
# new -d -s0 -nirssi 'exec irssi'
# set -t0:0 monitor-activity on
# set -t0:0 aggressive-resize on
# neww -d -ntodo 'exec emacs ~/TODO'
# setw -t0:1 aggressive-resize on
# neww -d -nmutt 'exec mutt'
# setw -t0:2 aggressive-resize on
# neww -d
# neww -d
# neww -d