-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
71 lines (57 loc) · 2.02 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
unbind r
bind r source-file ~/.tmux.conf
# set -g default-terminal "screen-256color"
# set -g default-terminal "xterm-256color"
# set -ga terminal-overrides ",xterm-256color:Tc"
# status bar
set -g status-bg '#000000'
set -g status-fg 'white'
set -g status-position top
set -g status-left '#[fg=yellow bold][#S] '
set -g status-left-length 32
set -g status-right '(#H) #[fg=white bold]#[fg=yellow][%Y-%m-%d %H:%M]'
setw -g window-status-format '#[fg=yellow]#I#[fg=white]:#W#F'
setw -g window-status-current-format '#[fg=yellow bold]#I#[fg=green bold]:#W#F'
# set status bar 2 for empty line below main status bar
# set -Fg 'status-format[1]' '#{status-format[0]}'
# set -g 'status-format[1]' ''
# set -g status 2
set -g set-clipboard on
set -g mouse on
set -g base-index 1
setw -g pane-base-index 1
# vim keys for pane switching
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes
bind -n S-Left resize-pane -L 5
bind -n S-Down resize-pane -D 5
bind -n S-Up resize-pane -U 5
bind -n S-Right resize-pane -R 5
# alternate between sessions
bind a switch-client -l
# double tap C-b to toggle last window
bind C-b last-window
# next/prev window
bind C-n next-window
bind C-p previous-window
# Copy mode
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 'xclip -in -selection clipboard'
# remove confirm step when killing a window or pane
bind & kill-window
bind x kill-pane
# Open a new pane or window with the current directory of the current pane,
# not the directory in which the first tmux session was started.
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# run custom scripts/commands
bind t neww -c "#{pane_current_path}" "[[ -e TODO.md ]] && nvim TODO.md || nvim ~/dev/TODO.md"
bind v neww -c "#{pane_current_path}" "nvim $DOTFILES"
bind f run-shell "tmux neww tmux_session"
bind g run-shell "tmux neww lazygit"