forked from MaxSt/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
92 lines (69 loc) · 2.6 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
# set tmux prefix to ctrl-s
unbind C-b
set -g prefix C-space
bind space send-prefix
set -ag terminal-overrides ",*:XT@:Tc"
set -gq default-terminal "screen-256color"
set -gq history-limit 10000
# Vim selection
setw -gq mode-keys vi
unbind [
bind Escape copy-mode
#copy paste with y and p
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi Y send -X copy-end-of-line
bind-key -T copy-mode-vi V send -X rectangle-toggle
bind-key -T copy-mode-vi PPage send -X page-up
bind-key -T copy-mode-vi NPage send -X page-down
# @if [ "$(uname)" = "Darwin" ]
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# @fi
# @if command -v xclip 2> /dev/null
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -sel clip -i"
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "xclip -sel clip -i"
# @fi
unbind p
bind p run "tmux paste-buffer"
# Vim buffer (Tmux Windows) Navigation
unbind ]
unbind n
bind ] next-window
bind [ previous-window
bind r source-file ~/.tmux.conf \; display "Config File reloaded!"
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n 'C-\' if-shell "$is_vim" "send-keys 'C-\\'" "select-pane -l"
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"
# Mouse support
#set -gq mouse-utf8 on
set -gq mouse on
setw -gq monitor-activity on
# split windows with v and h and in current directory
bind-key v split-window -h -c '#{pane_current_path}'
bind-key s split-window -v -c '#{pane_current_path}'
bind-key a choose-session
# no delay on prefix key
set -sg escape-time 10
#HJKL for resizing
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
#Statusbar set clock
setw -gq clock-mode-style 24
#new window and new pane with same directory as current
bind-key c neww -c '#{pane_current_path}'
#Load Theme
source-file "${HOME}/.tmux/themes/challenger-deep.tmuxtheme"
# settigs required for tmuxinator:
# start window numbering at 1
set -gq base-index 1
# start pane numbering at 1
set -gq pane-base-index 1
# dont allow any program to change window title (rename windos myself)
# set allow-rename off