-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
151 lines (99 loc) · 5.68 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
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ DEFAULTS I think? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
set-option -g default-terminal 'screen-256color'
set-option -g terminal-overrides ',xterm-256color:RGB'
set-option -g focus-events on # TODO: learn how this works
set -g base-index 1 # start indexing windows at 1 instead of 0
set -g detach-on-destroy off # don't exit from tmux when closing a session
set -g escape-time 0 # zero-out escape time delay
set -g history-limit 1000000 # increase history size (from 2,000)
set -g mouse off # enable mouse support
set -g renumber-windows on # renumber all windows when any window is closed
set -g set-clipboard on # use system clipboard
set -g status-interval 3 # update the status bar every 3 seconds
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ........... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PANES STUFF ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
unbind '"'
bind-key - split-window -h
unbind '{'
unbind '}'
bind-key _ split-window -v
bind '|' split-window -c '#{pane_current_path}' -h
bind '-' split-window -c '#{pane_current_path}'
bind c new-window -c '#{pane_current_path}'
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ........... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
bind g new-window -n '' lazygit
bind G new-window -n '' gh dash
# vim style pane switching
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
# Rename session
bind-key . command-prompt -p "Rename session to:" "rename-session '%%'"
# refresh/ reload new changes
unbind r
bind r source-file ~/.config/tmux/tmux.conf
bind v killw
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt (cmd+w)
bind-key e send-keys "tmux capture-pane -p -S - | nvim -c 'set buftype=nofile' +" Enter
# Use { and } to switch between windows
bind '{' previous-window
bind '}' next-window
################################# CUSTOM BAR #####################################################
set-option -g status-style bg=default,fg=default # Default statusbar color
set -g status-position top # macOS / darwin style
set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # Default window with an activity alert
set-window-option -g clock-mode-colour colour109 # Clock
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # Bell
set-option -g message-style bg=colour239,fg=colour223 # Message info
set-option -g message-command-style bg=colour239,fg=colour223 # Writing commands inactive
set-option -g allow-rename on # idk if this works?
setw -g history-limit 50000000 # Set the history limit so we get lots of scrollback.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ TABS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
set-window-option -g window-status-current-style bg=default,fg=red # ACTIVE
set-window-option -g window-status-style bg=default,fg=#7d7db2 # NON-ACTIVE
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ TABS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PANES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
set-option -g pane-active-border-style fg=yellow # ACTIVE
set-option -g pane-border-style fg=black # NON-ACTIVE
set-option -g display-panes-active-colour colour1 # dont think it works
set-option -g display-panes-colour color124 # dont think it works
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PANES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ BANNER LEFT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
set-option -g status-left "\
#[fg=#6A8AEA, bg=default]#{?client_prefix,#[bg=colour167],} ❐ #S \
#[fg=default, bg=default]#{?client_prefix,#[fg=colour167],}#{?window_zoomed_flag, 🔍,}"
#set -ga status-left " #[fg=red,bg=black,nobold]#(gitmux -cfg $HOME/.config/tmux/gitmux.conf)"
# ACTIVE
set-window-option -g window-status-current-format "\
#[fg=default, bg=default, bold] #{=-25:pane_current_path} \
"
#[fg=default, bg=default] #{d:pane_current_path} \
# NON-ACTIVE
set-window-option -g window-status-format "\
#[fg=#7d7db2, bg=default] \
|#I| #{b:pane_current_path} \
"
#[fg=default, bg=default] #{=-20:pane_current_path} \
#[fg=default, bg=default] #I #{b:pane_current_path} \
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ........... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ BANNER RIGHT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
set-option -g status-right "\
#[fg=#7d7db2] \
#[fg=red]%I:%M %p | %B %d, %Y\
#[fg=#7d7db2] \
#[fg=#7d7db2, bg=default] #(~/.config/tmux/scripts/music.sh)\
"
#[fg=default, bg=default] #(~/.config/tmux/scripts/uptime.sh) \
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ........... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
#########################################################################################################
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PLUGINS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
set -g @plugin 'fcsonline/tmux-thumbs'
set -g @plugin 'joshmedeski/t-smart-tmux-session-manager'
set -g @plugin 'joshmedeski/tmux-fzf-url'
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
set -g @plugin 'mskelton/tmux-last'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
# ~~~~~~~~~~~~~~~~~~~~~~~~~ ........... ~~~~~~~~~~~~~~~~~~~~~~~~~~ #
run "~/.config/tmux/plugins/tpm/tpm" # always at end of file