-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
134 lines (106 loc) · 3.82 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
# Themeing
# ----------------------------=== Colors ===--------------------------
thm_bg="#202124"
thm_fg="#bbbbbb"
thm_gray="bbbbbb"
thm_cyan="#56b6c2"
thm_magenta="#c678dd"
thm_red="#e06c75"
thm_green="#98c379"
#thm_blue="#61afef"
thm_blue="#e09d6c" #halloween
thm_yellow="#e5c07b"
#thm_black="#282c34"
thm_black="#202124"
#thm_black4="#5c6370"
thm_black4="#202124"
# ----------------------------=== Theme ===--------------------------
# status
set -g status-interval 1
set -g escape-time 10
set -g focus-events on
set -g status "on"
set -g status-bg "${thm_black}"
set -g status-justify "left"
set -g status-left-length "100"
set -g status-right-length "100"
# messages
set -g message-style fg="${thm_cyan}",bg="${thm_black}",align="centre"
set -g message-command-style fg="${thm_cyan}",bg="${thm_black}",align="centre"
# panes
set -g pane-border-style fg="${thm_black}"
set -g pane-active-border-style fg="${thm_blue}"
# windows
setw -g window-status-activity-style fg="${thm_fg}",bg="${thm_bg}",none
setw -g window-status-separator ""
setw -g window-status-style fg="${thm_fg}",bg="${thm_bg}",none
# statusline
set -g status-left ""
set -g status-right "#[fg=$thm_green,bg=$thm_black,nobold,nounderscore,noitalics] #[fg=$thm_bg,bg=$thm_green,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_black] #{b:pane_current_path} #{?client_prefix,#[fg=$thm_red],#[fg=$thm_yellow]}#[bg=$thm_black] #{?client_prefix,#[bg=$thm_red],#[bg=$thm_yellow]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_black] #S #[fg=$thm_blue,bg=$thm_black,nobold,nounderscore,noitalics] #[fg=$thm_bg,bg=$thm_blue,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_black] %m-%d %H:%M "
# current_dir
setw -g window-status-format "#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_bg] #W "
setw -g window-status-current-format "#[fg=$thm_bg,bg=$thm_yellow] #I #[fg=$thm_fg,bold,bg=$thm_bg] #W "
# modes
setw -g clock-mode-colour "${thm_blue}"
setw -g mode-style "fg=${thm_green} bg=${thm_black4} bold"
# ----------------------------=== Theme ===--------------------------
# Improve colors
set -g default-terminal 'tmux-256color'
set -ga terminal-overrides ",alacritty:Tc"
# Enable scrolling
set -g mouse on
set-option -g status on
# shortcut for moving tmux buffer to clipboard
# useful if you've selected with the mouse
bind-key -nr C-y run "tmux show-buffer | xclip -in -selection clipboard &> /dev/null"
bind r source-file ~/.tmux.conf
# Avoid ESC delay
set -s escape-time 0
# Fix titlebar
set -g set-titles on
set -g set-titles-string "#T"
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
#Mouse works as expected
set -g mouse on
setw -g monitor-activity on
set -g visual-activity on
set -g mode-keys vi
set -g history-limit 10000
# y and p as in vim
bind Escape copy-mode
unbind p
bind p paste-buffer
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
# extra commands for interacting with the ICCCM clipboard
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# easy-to-remember split pane commands
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# moving between panes with vim movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# moving between windows with vim movement keys
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# resize panes with vim movement keys
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# list of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
run '~/.tmux/plugins/tpm/tpm'