-
Notifications
You must be signed in to change notification settings - Fork 1
/
tmux.conf
145 lines (132 loc) · 5.23 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
set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'arcticicestudio/nord-tmux'
set -g @plugin 'fabioluciano/tmux-tokyo-night'
#set -g @plugin 'dracula/tmux'
#set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-open'
#set -g @plugin 'Neo-Oli/tmux-text-macros'
set -g @theme_variation 'moon'
set -g @theme_left_separator ''
set -g @theme_right_separator ''
set -g @theme_plugins 'homebrew'
## keybindings
#unbind C-b
#unbind C-a
unbind %
unbind ,
unbind .
unbind n
unbind p
unbind '"'
unbind l
unbind &
unbind "'"
set-option -g prefix C-a # C-a for perfix just like screen
bind-key C-a last-window
bind-key \\ split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
bind-key x kill-pane
bind-key X kill-window
bind-key q confirm-before kill-session
bind-key Q confirm-before kill-server
bind-key , previous-window # <
bind-key . next-window # >
bind-key < swap-window -t :-
bind-key > swap-window -t :+
bind-key -n M-, previous-window
bind-key -n M-. next-window
bind-key -T root -n M-0 select-window -t :=0
bind-key -T root -n M-1 select-window -t :=1
bind-key -T root -n M-2 select-window -t :=2
bind-key -T root -n M-3 select-window -t :=3
bind-key -T root -n M-4 select-window -t :=4
bind-key -T root -n M-5 select-window -t :=5
bind-key -T root -n M-6 select-window -t :=6
bind-key -T root -n M-7 select-window -t :=7
bind-key -T root -n M-8 select-window -t :=8
bind-key -T root -n M-9 select-window -t :=9
bind ? list-keys
# bind-key n command-prompt 'rename-window %%'
# bind-key N command-prompt 'rename-session %%'
bind-key n new-window -c "#{pane_current_path}"
bind-key C-n command-prompt 'rename-window %%'
bind-key C-N command-prompt 'rename-session %%'
bind-key Escape copy-mode -u
bind-key Up copy-mode -u
bind-key r source $HOME/.tmux.conf\; display-message " ✱ ~/.tmux.conf is reloaded"
bind-key R refresh-client
bind-key a send-key C-a
bind-key C-h resize-pane -L 5
bind-key C-l resize-pane -R 5
bind-key C-j resize-pane -D 5
bind-key C-k resize-pane -U 5
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
bind + join-pane
bind p pipep -I "paste-from-clipboard"
bind-key -T prefix ] pipep -I "paste-from-clipboard"
bind -T copy-mode-vi Y send -X copy-pipe
set -g default-terminal "tmux-256color"
## messages
set-option -g message-style bg=colour0,fg=colour2
set-window-option -g mode-keys vi
set-option -g history-limit 60000
bind-key 'v' copy-mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel
set -s copy-command 'pbcopy'
## set status bar
## Using tmux-powerline
# set-option -g status on
set-option -g status-interval 15
# set-option -g status-utf8 on
# set-option -g status-justify "centre"
# set-option -g status-left-length 60
set-option -g status-right-length 120
# set-option -g status-left "#(~/.tmux-powerline/powerline.sh left)"
# set-option -g status-right "#(~/.tmux-powerline/powerline.sh right)"
# set window notifications
set-option -g visual-activity off
set-window-option -g monitor-activity off
set-window-option -g automatic-rename off
## tmux window titling for X
#set-option -g set-titles on
#set-option -g set-titles-string '[#I] #W'
set-window-option -g automatic-rename on
#set-window-option -g window-status-format ' #I #W '
#set-window-option -g window-status-attr bold
# starts windows at 1 not 0
set-option -g base-index 1
## enable mouse
set-option -g mouse on
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
# set-option -g -q mode-mouse on
# set-option -g mouse-resize-pane on
# set-option -g mouse-select-pane on
# set-option -g mouse-select-window on
# bind-key -t vi-copy WheelUpPane halfpage-up
# bind-key -t vi-copy WheelDownPane halfpage-down
## pane border and colors
#set-option -g pane-active-border-fg colour240
#set-option -g pane-border-fg colour240
# set-option -g default-command "reattach-to-user-namespace zsh"
#bind-key -t vi-copy y run-shell 'tmux show-buffer | reattach-to-user-namespace pbcopy'
#set-option -g default-command "reattach-to-user-namespace -l zsh"
#set-window-option -g window-status-current-bg colour34
#set-option -g status-style fg=colour255,bg=black
#set-window-option -g window-status-activity-style bg=colour236
set-option -g repeat-time 200
set-option -g escape-time 0
#set-option -ga terminal-overrides ",alacritty:Tc"
#set -as terminal-overrides ",xterm-kitty:Tc"
#set -as terminal-overrides ',xterm*:sitm=\E[3m,xterm*:Tc'
set-option -sa terminal-features ',xterm-kitty:RGB'
set-option -g focus-events on
run '/opt/homebrew/opt/tpm/share/tpm/tpm'