aboutsummaryrefslogtreecommitdiff
path: root/base/tmux.conf
blob: 94f28a1c90711485c349f6e554b39db60f1c59ce (plain)
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
set -g base-index 1
set -g pane-base-index 1
set -g escape-time 10
set -g repeat-time 300
set -g history-limit 4096
set -g focus-events on
set -g renumber-windows on
setw -g aggressive-resize on

set -g default-terminal "screen-256color"
set -ga terminal-overrides ",screen-256color:Tc"

#set -g mouse on
set -g set-titles on
set -g set-titles-string '#h - #S'

set -g monitor-activity on
set -g visual-activity off

set -g status-interval 5
set -g status-justify left
set -g status-position top
set -g status-left-length 50
set -g status-right-length 30
set -g status-style "fg=colour8,bg=colour18"
set -g status-left "#(bash ~/.tmux/status-left)"
set -g status-right "#[fg=colour19]#[bg=colour19,fg=colour7] %a %m.%d %R 💜"
set -g window-status-format "#{?#W,#W,#I} #[default,fg=colour19]"
set -g window-status-current-format "#{?#W,#W,#I} #[nobold,fg=colour19]"
set -g window-status-current-style "fg=colour4,bold"
set -g window-status-activity-style "fg=colour20"
set -g window-status-bell-style "fg=colour20"
#█ ^Vue0b0

set -g automatic-rename on
set -g automatic-rename-format ""
set -g message-style "fg=white,bg=colour19"
set -g pane-border-style "fg=colour18,bg=colour18"
set -g pane-active-border-style "fg=colour19,bg=colour19"

unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind C-d detach

set -g status-keys vi
set -g mode-keys vi

bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel
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"

#unbind -T copy-mode-vi MouseDragEnd1Pane
#bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-and-cancel\; run "tmux save-buffer - | xclip -i -sel clipboard >/dev/null"
#
## Mac OSX clipboard
#if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
## X11 clipboard
#if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"'
#if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"'
## Windows clipboard
#if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"'
#if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"'

unbind E
bind e setw synchronize-panes on
bind E setw synchronize-panes off

unbind l
bind h selectp -L
bind j selectp -D
bind k selectp -U
bind l selectp -R
bind -r C-h resizep -L
bind -r C-j resizep -D
bind -r C-k resizep -U
bind -r C-l resizep -R

unbind %
unbind "'"
unbind '"'
bind % command-prompt -p index "select-window -t ':%%'"
bind '"' splitw -hc "#{pane_current_path}"
bind "'" splitw -c "#{pane_current_path}"
bind Tab last # most recent window
bind -r "<" swapw -d -t -1
bind -r ">" swapw -d -t +1

bind T run "bash ~/.tmux/status-left toggle-task"

bind r source ~/.tmux.conf

if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'