-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
73 lines (58 loc) · 1.92 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
# Fix color and focus settings for neovim
set-option -g default-terminal "xterm-256color"
set-option -g focus-events on
# Set status bar color
set-option -g status-style bg=#8ec07c,fg=#282828
# This fixes delay when pressing <ESC>
set -s escape-time 0
# Change prefix from C-b to C-a
unbind C-b
set-option -g prefix C-a
# Mouse support (selection per panel)
set -g mouse on
# Wait time until key lock is released on operations with -r
set-option repeat-time 500
# Set navigation to vim mode
set-window-option -g mode-keys vi
# Source config file using r
bind r source-file ~/.tmux.conf
# Navigate through panes with vim motions
# The -r flag indicates this key may repeat, see the repeat-time option.
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 panes with vim motions
#bind -r K swap-pane -U
#bind -r J swap-pane -D
# Navigate through windows
unbind p
bind -r C-h previous-window
unbind n
bind -r C-l next-window
# Resizing panes with vim motions
bind -r K resize-pane -U 5
bind -r J resize-pane -D 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
# Split panes
unbind %
unbind \"
bind s split-window -h
bind C-s split-window -v
# Kill windows & panes
bind d kill-window
bind x kill-pane
# Open new sessions from directories with fzf
bind n new-window bash ~/scripts/tmux-sessionizer.sh
unbind N
# Open new session
bind N new-window "read -p 'name: ' TMUX_NEW_SESSION_NAME && tmux new -ds \$TMUX_NEW_SESSION_NAME && tmux switch-client -t \$TMUX_NEW_SESSION_NAME"
unbind C-n
# Fuzzy find sessions and switch to them
bind C-n new-window "tmux switch-client -t \"\$(tmux list-sessions | fzf | awk -F: '{print \$1}')\""
# Copy mode
unbind -T copy-mode-vi Space
bind v copy-mode
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))'