-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
81 lines (65 loc) · 2.69 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
set -g default-terminal "tmux-256color"
set -sa terminal-overrides ",xterm-256color:RGB"
set -sa terminal-overrides ",*:Se=\e[1 q"
# Force cursor shape as blinking bar (xterm)
# https://neovim.io/doc/user/term.html#tui-cursor-shape
# set -sa terminal-overrides ',*:Ss=\E[%p1%d q:Se=\033[1 q'
# set -sa terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[1 q'
# set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[1 q'
set -sg escape-time 0
## action key
unbind C-b
set-option -g prefix C-t
#### Key bindings
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# Reload settings
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Open current directory
bind o run-shell "open #{pane_current_path}"
bind -r e kill-pane -a
# Split window - sync with vim
bind -r \\ split-window -h
bind -r - split-window -v
# vim-like pane switching
bind -r k select-pane -U
bind -r j select-pane -D
bind -r h select-pane -L
bind -r l select-pane -R
# Moving window
bind-key -n C-S-Left swap-window -t -1 \; previous-window
bind-key -n C-S-Right swap-window -t +1 \; next-window
# Resizing pane
bind -r C-k resize-pane -U 5
bind -r C-j resize-pane -D 5
bind -r C-h resize-pane -L 5
bind -r C-l resize-pane -R 5
# Session
bind -r X confirm-before kill-session
bind -r " " switch-client -l
# # Vim
# set-option -g focus-events on
# tmux status bar
set -g status-interval 2 # update status every 2 seconds
# set -g status-left-length 200 # increase status line length
# set -g status-position top # macOS / darwin style
# set -g status-right '' # empty
# set -g status-left '#(gitmux "#{pane_current_path}" -cfg $HOME/.config/tmux/gitmux.conf)'
# set-option -g automatic-rename-format '#(tmux-icon-name #{pane_current_command})'
# set -g renumber-windows on # renumber all windows when any window is closed
set -g base-index 1 # start indexing windows at 1 instead of 0
# setw -g pane-base-index 1
# session name + git status 'arl/gitmux'
# set -g status-left '#(gitmux -cfg $HOME/.config/tmux/gitmux.conf) '
# set -g status-left '#[fg=blue,bold][#S] #[fg=white,nobold]#(gitmux -timeout 200ms -cfg $HOME/.config/tmux/gitmux.conf #{pane_current_path})'
# set -g pane-active-border-style 'fg=magenta,bg=default'
# set -g pane-border-style 'fg=brightblack,bg=default'
# set -g status-style 'bg=default' # transparent
set -g status-style 'bg=#333333 fg=#5eacd3'
#set -g window-status-current-format '#[fg=magenta]#W'
#set -g window-status-format '#[fg=gray]#W'
bind -r q display-panes -d 0
set -g default-command zsh
# set -g history-file ~/.tmux_history
set -s set-clipboard on