forked from din982/dotfiles-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
60 lines (44 loc) · 2.19 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
#set-option -g default-shell /usr/local/bin/fish
set-option -g default-command "fish"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g status-left-length 20
set -g status-right-length 50
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg brightcyan
set -g message-fg colour16
set -g message-bg colour221
# set -g status-left '#[fg=colour235,bg=colour252] #S #[fg=colour252,bg=colour240] #(~/bin/tmux-cpu-info)#[fg=colour240,bg=colour236] #(~/bin/tmux-weather) #[fg=colour236,bg=colour234]'
set -g status-left '#[fg=colour235,bg=colour252] #S #[fg=colour252,bg=colour240] #(~/bin/tmux-cpu-info)#[fg=colour240,bg=colour236] #[fg=colour236,bg=colour234]'
set -g window-status-format "#[fg=white,bg=colour234] #W "
set -g window-status-current-format "#[fg=colour234,bg=brightcyan]#[fg=black,bg=brightcyan,noreverse] #W #[fg=brightcyan,bg=colour234]"
set -g status-right '#[fg=colour236,bg=colour234]#[fg=brightcyan,bg=colour236] #(~/bin/tmux-spotify-info)'
set -sa terminal-overrides ",*:dim=\\E[2m"
set -g prefix C-a
unbind C-b
bind C-a send-prefix
set -g default-terminal "screen-256color"
set-option -g history-limit 10000
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
set -s escape-time 0
set -g escape-time 0
# Act like vim
set -g status-keys vi
setw -g mode-keys vi
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
set -g mouse on
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Bring back clear screen under tmux prefix
bind C-l send-keys 'C-l'
bind -n C-\ send-keys C-l \; send-keys -R \; clear-history
run '~/.tmux/plugins/tpm/tpm'