-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
73 lines (63 loc) · 2.55 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
# set -g default-terminal "st-256color"
# set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
set-option -ag terminal-overrides ",xterm-256color:Ms=\\E]52;c;%p2%s\\7"
set-option -sg escape-time 10
set-option -g focus-events on
unbind C-b
set-option -g prefix C-space
bind-key C-space send-prefix
# enable undercurls
# set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
# set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colors - needs tmux-3.0
# open new windows in the current path
bind c new-window -c "#{pane_current_path}"
#reload conf
bind r source-file ~/.tmux.conf \; display-message "Reloading config"
# basic
set -g base-index 1
set -g pane-base-index 1
set -g pane-active-border fg=magenta
set -ag pane-active-border bg=black
# mouse, copy and clip
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
set-window-option -g allow-passthrough on
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will automatically be available in clibboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
unbind-key -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
# vim-like pane switching
bind -r ^ last-window
bind -n M-k select-pane -U
bind -n M-j select-pane -D
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-up select-pane -U
bind -n M-down select-pane -D
bind -n M-left select-pane -L
bind -n M-right select-pane -R
bind -n M-K resize-pane -U 1
bind -n M-J resize-pane -D 1
bind -n M-H resize-pane -L 1
bind -n M-L resize-pane -R 1
bind -n M-S-up resize-pane -U 1
bind -n M-S-down resize-pane -D 1
bind -n M-S-left resize-pane -L 1
bind -n M-S-right resize-pane -R 1
# More friendly split pane
bind-key h split-window -h
bind-key v split-window -v
#status
set -g status off
# window titles
set-option -g set-titles on
set-option -g set-titles-string "#S / #W"