-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
101 lines (76 loc) · 3.43 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
# use C-space prefix (also C-@ and C-`)
set -g prefix C-Space
unbind C-b
bind C-Space send-prefix
# Respond to escape faster
set -g escape-time 10
# I have a colorful terminal
set -g default-terminal "screen-256color"
# Visual bell is evil, real bells can be used to set urgency hints
set -g bell-action any
set -g visual-bell off
# Count from 1? What!? 0 is just on the wrong side of the keyboard
set -g base-index 1
# Longer message times
set -g display-time 4000
# More history
set -g history-limit 100000
# I like main-horizontal, but want it wider
setw -g main-pane-width 150
# Visual refresh with r
unbind r
bind r select-layout
# Config refresh with R
bind R source-file ~/.tmux.conf
# Window handling
bind C command-prompt -p "New window command" "new-window '%%'"
# Create new pane with existing window
bind @ command-prompt -p "create pane from:" "join-pane -s ':%%'"
# Use vim motion keys while in copy mode
setw -g mode-keys vi
# Vim key bindings for command entry
set -g status-keys vi
# Use "v" and "s" to do vertical/horizontal splits, like vim
unbind %
unbind '"'
bind s split-window -v -c "#{pane_current_path}"
bind S command-prompt -p "New pane command:" "split-window -v -c '#{pane_current_path}' '%%'"
bind v split-window -h -c "#{pane_current_path}"
bind V command-prompt -p "New pane command:" "split-window -h -c '#{pane_current_path}' '%%'"
# Borrowed from tmux-sensible (I don't like some of their choices)
set-window-option -g aggressive-resize on
set-option -g focus-events on
set-option -g status-interval 5
# Better status bar
set -g status-justify centre
set -g status-left-length 40
set -g status-left '#S #P #W'
set -g status-left-style fg=green
set -g status-right '%H:%M %d-%b-%y'
set -g status-right-style fg=magenta
# Show '<session>@<host>' in terminal title
set -g set-titles on
set -g set-titles-string '#S@#h'
# C-c: save into system clipboard (+). With preselection.
bind C-c choose-buffer "run \"tmux save-buffer -b %% - | xclip -i -sel clipboard\" \; run \" tmux display \\\"Clipboard \(+\) filled with: $(tmux save-buffer -b %1 - | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \\\" \" "
# C-v: copy from + clipboard.
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" \; run "tmux display \"Copied from \(+\) $(xclip -o -sel clipboard | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \""
# C-d: save into selection clipboard (*). With preselection.
bind C-d choose-buffer "run \"tmux save-buffer -b %% - | xclip -i\" \; run \" tmux display \\\"Clipboard \(*\) filled with: $(tmux save-buffer -b %1 - | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \\\" \" "
# C-f: copy from * clipboard.
bind C-f run "tmux set-buffer \"$(xclip -o)\"; tmux paste-buffer" \; run "tmux display \"Copied from \(*\) $(xclip -o | dd ibs=1 obs=1 status=noxfer count=80 2> /dev/null)... \""⇧
# Local configuration
if-shell '[ -f ~/.local_config/tmux.conf ]' \
"source-file ~/.local_config/tmux.conf"
# TPM plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'seebi/tmux-colors-solarized'
set -g @colors-solarized 'dark'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @shell_mode 'vi'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'"
run '~/.tmux/plugins/tpm/tpm'