-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
114 lines (91 loc) · 3.81 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
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# remap prefix from 'C-b' to 'C-q'
unbind C-b
set-option -g prefix C-q
#bind-key q send-prefix
set -g default-terminal "screen-256color"
set-option -sa terminal-overrides ',screen-256color:RGB'
#Bind ctrl + hjkl to move around panes
# is_vim="ps -o state= -o comm= -t '#{pane_tty}'
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
# bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
# bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
# bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
# bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
# bind-key -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Smart pane switching with awareness of vim splits
bind -n C-k run-shell 'tmux-vim-select-pane -U'
bind -n C-j run-shell 'tmux-vim-select-pane -D'
bind -n C-h run-shell 'tmux-vim-select-pane -L'
bind -n C-l run-shell 'tmux-vim-select-pane -R'
bind -n "C-\\" run-shell 'tmux-vim-select-pane -l'
# bind-key -n 'C-h' select-pane -L
# bind-key -n 'C-j' select-pane -D
# bind-key -n 'C-k' select-pane -U
# bind-key -n 'C-l' select-pane -R
# bind-key -n C-\ "send-keys C-\\" "select-pane -l"
# Enable mouse control (clickable windows, panes, resizable panes)
set-option -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
set-window-option -g xterm-keys on
# ---------------------
# # Copy & Paste
# # ---------------------
set -g mode-keys vi
set -g set-clipboard on
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection # Begin selection in copy mode.
# bind-key -T copy-mode-vi WheelUpPane send-keys -X scroll-up
# bind-key -T copy-mode-vi WheelDownPane send-keys -X scroll-down
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection # Yank selection in copy mode
# bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe 'xclip -in -selection clipboard'
# Toggle mouse mode on or off
bind m set-option -g mouse on \; display 'Mouse: ON'
bind M set-option -g mouse off \; display 'Mouse: OFF'
# Let different clients have different sizes
# setw -g aggressive-resize on
# Send keys to all panes in paralles
bind e setw synchronize-panes
# Kill Window without confirmation
bind K kill-window
# Kill pane withou confirmation
bind k kill-pane
# Hide tmux on ^Space
#bind -n C-Space set status
# optimizie tmux
set-option -sg escape-time 10
# configure tmux-yank
set -g @yank_selection 'primary'
# Plugins
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-yank'
# set -g @plugin 'tmux-plugins/tmux-copycat'
# Status line
set -g status on
set -g status-interval 1
set -g status-justify centre
set -g status-keys vi
set -g status-left-length 20
set -g status-left-style default
set -g status-position bottom
set -g status-left "#[fg=colour11][#S] #[fg=green]#H #[fg=black]•#[default]"
set -g status-right '#[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d'
set -g status-right-length 140
set -g status-right-style default
set -g status-style fg=colour136,bg=colour235
# default window title colors
set-window-option -g window-status-style fg=colour244,bg=default # base0
# set-window-option -g window-status-bg default
# active window title colors
set-window-option -g window-status-current-style fg=colour166,bg=default # orange
# set-window-option -g window-status-current-bg default
# active pane colour
set-option -g pane-active-border-style bg=default,fg=colour208
# set-option -g pane-active-border-fg colour208
# fix for suckless terminal
set -as terminal-overrides ',st*:SS@'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
# run '~/.tmux/plugins/tpm/tpm'