-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.tmux.conf
More file actions
100 lines (88 loc) · 2.84 KB
/
.tmux.conf
File metadata and controls
100 lines (88 loc) · 2.84 KB
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
# Prefix binding {{{
set -g prefix C-g
unbind C-b
bind g send-prefix
bind-key C-g last-window
# }}}
# General {{{
set -sg escape-time 0
setw -g aggressive-resize on
bind R source-file ~/.tmux.conf
bind q kill-window
set -g default-terminal "screen-256color"
set-option -g default-shell /opt/homebrew/bin/bash
# }}}
# Mouse {{{
#set-option -g mouse-select-pane on
#set-option -g mouse-select-window on
#set-window-option -g mode-mouse on
set-option -g mouse on
# make scrolling with wheels work
# http://stackoverflow.com/questions/11832199/tmux-set-g-mouse-mode-on-doesnt-work
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
# }}}
# Status bar {{{
set -g status-bg colour7
set -g status-fg colour12
set -g status-left-length 20
set -g status-left '#[bg=colour1,fg=white] #S #[default]'
set -g status-right '#[fg=colour6] #(cat ~/.pomo_stat) #[bg=colour2,fg=white] #h #(~/.bin/batcharge.py 2>/dev/null)'
set -g status-position 'top'
set -g base-index 1
set-window-option -g window-status-style fg=colour239,bg=colour15
# Highlight current window {{{
set-window-option -g window-status-current-style fg=cyan,bg=colour15
# }}}
# Activity window {{{
set-window-option -g window-status-activity-style fg=colour2,bg=colour7
# }}}
# Content window {{{
#set-window-option -g window-status-content-style fg=colour2,bg=colour2
# }}}
# Highlight active window {{{
set-window-option -g window-status-bell-style fg=colour2,bg=colour9
# }}}
# window format {{{
setw -g window-status-format '#[fg=colour12,bg=colour7,noreverse] #I/#[default,noreverse]#W'
setw -g window-status-current-format ' #[fg=colour2]●#[fg=colour250] #[default,noreverse]#W '
# }}}
# }}}
# Set window notifications {{{
setw -g monitor-activity on
set -g visual-activity on
# Automatically set window title
setw -g automatic-rename
# }}}
# window management {{{
unbind %
unbind s
bind | split-window -h
bind _ split-window -v
bind-key S command-prompt "attach-session -t '%%'"
bind-key s choose-session
# }}}
# Vi style bindings {{{
setw -g mode-keys vi
unbind Escape
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
bind-key -T copy-mode-vi 'Space' send -X halfpage-down
bind-key -T copy-mode-vi 'Bspace' send -X halfpage-up
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key Y run "tmux save-buffer - | xclip -i -selection clipboard &> /dev/null"
# }}}
# Resizing {{{
bind < resize-pane -L 5
bind > resize-pane -R 5
bind - resize-pane -D 5
bind + resize-pane -U 5
# }}}
# https://gist.github.com/admackin/4507371
# # fix ssh agent when tmux is detached
# # See .ssh/rc for socket linking
set -g update-environment -r
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock