forked from pinktrink/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
105 lines (77 loc) · 3.26 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
# I use C-a in vim a lot so I prefer the default C-b as my prefix
bind C-b send-prefix
# 256 colors
set-option -g default-terminal "screen-256color"
# Reattach tmux sessions to the user namespace so pbcopy, etc work, also use the
# _current_ user shell (using $SHELL it will open with the shell tmux was opened
# in)
set-option -g default-command "reattach-to-user-namespace -l $(dscacheutil -q user -a name $USER | grep \"^shell\" | tail -c +8)"
# Increase the history size
set-option -g history-limit 999999
# I don't use the escape key for key sequences, nor meta (damnit vim)
set-option -g escape-time 0
# Start window indexing at 1 (so the first window number is on the left of the
# keyboard)
set-option -g base-index 1
# Pass window titles to the encapsulating terminal
set-option -g set-titles on
set-option -g set-titles-string '#T :: #(pwd) :: #W'
set-window-option -g automatic-rename on
# Colors (Original 206 and 45)
pink='colour206'
blue='colour45'
# Left status
set-option -g status-left-length 1000
set-option -g status-left-bg $pink
set-option -g status-left "#[bg=$blue] #[bg=$pink] #{pane_current_path} "
# Right status
set-option -g status-right-length 1000
set-option -g status-right-bg $pink
SEPARATOR="#[bg=$blue] #[bg=$pink]"
PANE_SIZE="#{pane_width}x#{pane_height}"
USER_HOST="$USER@#H"
TIME_STAMP="%I:%M %p"
DATE_STAMP="%a, %b %d, %Y"
BATTERY='#($HOME/.dotfiles/bin/getbat)'
GAY_PRIDE="#[bg=colour0] #[bg=colour9] #[bg=colour208] #[bg=colour11] #[bg=colour10] #[bg=colour21] #[bg=colour93] #[bg=colour0] "
TRANS_PRIDE="#[bg=colour51] #[bg=colour225] #[bg=colour15] #[bg=colour225] #[bg=colour51] #[bg=colour0] "
set-option -g status-right "$SEPARATOR $PANE_SIZE $SEPARATOR $USER_HOST $SEPARATOR $TIME_STAMP $SEPARATOR $DATE_STAMP $SEPARATOR $BATTERY $SEPARATOR$GAY_PRIDE$TRANS_PRIDE$SEPARATOR"
# Monitor window activity
set-window-option -g monitor-activity on
# Update the status every second
set-option -g status-interval 1
# All windows
set-window-option -g window-status-format ' #I: #W '
set-window-option -g window-status-separator '|'
# Current window
set-window-option -g window-status-current-format ' #I: #W '
set-window-option -g window-status-current-bg colour0
set-window-option -g window-status-current-fg $blue
# Windows with a bell
set-window-option -g window-status-bell-bg $pink
# Windows with activity
set-window-option -g window-status-activity-fg colour43
set-window-option -g window-status-activity-bg colour0
# Use the mouse to select the pane
set-option -g mouse-select-pane on
# Use the mouse to resize panes
set-option -g mouse-resize-pane on
# Use the mouse to select windows
set-option -g mouse-select-window on
# Allow for scrolling inside of panes
set-option -g mode-mouse on
# Bubblegum
set-option -g pane-active-border-fg $blue
set-option -g pane-border-fg $pink
set-option -g status-bg $blue
# Start pane indexing at 1
set-window-option -g pane-base-index 1
# C-b m to open a temporary manpage pane
bind m command-prompt "split-window -h -l 80 'man %%'"
# Reload the file
bind r source-file ~/.tmux.conf
bind -t emacs-copy c copy-selection
bind C-c send-keys c \;\
save-buffer /tmp/tmux-buffer\;\
run-shell "reattach-to-user-namespace pbcopy < /tmp/tmux-buffer"
if-shell "[[ -f $HOME/.tmux-default.conf ]]" "source-file ~/.tmux-default.conf"