-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
88 lines (72 loc) · 3.42 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
# custom configs
set -gq allow-passthrough on # enable images
#set -g assume-paste-time 0
#set -g base-index 1
setw -g main-pane-width 100
#setw -g mouse off
setw -g aggressive-resize off
setw -g window-status-current-style fg=black,bg=white
set -s escape-time 0
set -g mouse on
setw -g mode-keys vi
#set -g status on
set -g history-limit 10000
#set -g pane-border-format "#P: #{pane_current_command}"
# nvim compatibility
set -sa terminal-features ',alacritty:RGB'
set-option -g default-terminal "screen-256color"
set-option -g default-shell /usr/bin/zsh
set-option -g focus-events on
# custom bindings
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key j select-pane -t :.+ # Select the preview pane
bind-key k select-pane -t :.- # Select the preview pane
bind-key a swap-pane -t :.0 \; select-pane -t :.0 # Swap current pane with the 0 pane
bind-key C-m select-pane -t :.1 \; swap-pane -t :.0 \; select-pane -t :.0 # Go to pane 0
bind-key x kill-pane \; select-layout main-vertical # Close current pante
bind-key v split-window -c "#{pane_current_path}" -v \; select-layout main-vertical \; swap-pane -t :.0 \; select-pane -t :.0 # Create new pane at left
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
#bind-key r run-shell "~/.tmux/scripts/resize-adaptable.sh -l main-vertical -p 60"
#bind-key R source-file ~/.tmux.conf \; display-message "Config reloaded"
#bind-key p paste-buffer
#bind-key c copy-mode
# status bar
# set-window-option -g window-status-format ""
# got from: https://medium.com/hackernoon/customizing-tmux-b3d2a5050207
set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
set-option -g status-left-length 30
set-option -g status-left "\
#[fg=colour7, bg=colour241]#{?client_prefix,#[bg=colour167],} ❐ #S >> "
set-option -g status-right "\
#[fg=colour246, bg=colour237] %b %d '%y\
#[fg=colour109] %H:%M:%S \
#[fg=colour248, bg=colour239]"
set-window-option -g window-status-current-format "\
#[fg=colour237, bg=colour214]\
#[fg=colour239, bg=colour214] #I*:\
#[fg=colour239, bg=colour214, bold] #W \
#[fg=colour214, bg=colour237]"
set-window-option -g window-status-format "\
#[fg=colour223,bg=colour239] #I:\
#[fg=colour223, bg=colour239] #W "
# set-window-option -g window-status-current-format ""
# set color for status bar
#set-option -g status-bg colour235 #base02
#set-option -g status-fg yellow #yellow
#set-option -g status-attr dim
# show IP addresses on left side of status bar
#set -g status-left-length 120
#DEFAULT_GW="$(route -n get default|grep gateway |cut -f2 -d\":\")"
#set -g status-left "#[fg=green][#P] #[fg=brightblue]#(curl icanhazip.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"lan \"$2}')#[fg=red]#(ifconfig utun0 | grep 'inet ' | awk '{print \"vpn \" $2}') #[fg=red]#(ifconfig utun1 | grep 'inet ' | awk '{print \"vpn \" $2}') #[fg=white]8.8.8.8 (#(ping -c1 8.8.8.8 | grep time |cut -f4 -d'='))#[fg=white]#(route -n get default|grep gateway |cut -f2 -d\":\") (#(ping -c1 $DEFAULT_GW | grep time |cut -f4 -d'='))"
#set -g status-right-length 60
#set -g status-right "#[fg=yellow]%d %b %Y #[fg=green]%H:%M"
# TMUX plugin manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'jimeh/tmuxifier'
run '~/.config/tmux/plugins/tpm/tpm'
new -s personal -n programs