-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtmux.conf
85 lines (66 loc) · 2.93 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
set -g default-shell $SHELL
unbind C-b
set -g prefix '\'
bind '\' send-prefix
# Setting delay after prefix command to avoid interference with VIM
set -s escape-time 1
# increase scrollback buffer size
set -g history-limit 50000
# tmux messages are displayed for longer time
set -g display-time 2000
# Window & pane index starts from 1
set -g base-index 1
set -g pane-base-index 1
# Reload tmux config with prefix-r
bind r source-file ~/.tmux.conf
# split panes like vim
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Resize pane easily
# Try pressing \ + jjjjj - in a bottom split
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -R 5
bind -r h resize-pane -L 5
# Since s -> list session is binded to split-window above
# Changed this.. a -> all sessions
bind a choose-tree -Zs
# Copy mode bindings
unbind [
unbind ]
bind ] copy-mode
# vim bindings for copy
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# To allow C-x C-e to be passed to your shell,
# used to edit a shell command through vim
setw -g xterm-keys on
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# Mouse support - off - Not able to select by double clicking is annoying
set -g mouse off
# Add true color & italics support with alacritty terminal
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Older gruvebox theme
# set -g @plugin 'egel/tmux-gruvbox'
# Custom theme taken from https://github.com/olimorris/dotfiles
source "~/.tmux-theme.conf"
set -g @plugin 'MunifTanjim/tmux-mode-indicator' # Display current tmux mode
set -g @plugin 'olimorris/tmux-pomodoro-plus'
set -g status-interval 1
# Pomodoro timer options
set -g @pomodoro_start 't' # Start a Pomodoro
set -g @pomodoro_cancel 't' # Cancel a Pomodoro
set -g @pomodoro_on " | #[fg=$color_gray]🍅 "
set -g @pomodoro_complete " | #[fg=$color_green]🌴 "
set -g @pomodoro_notifications 'on' # Enable desktop notifications
set -g @pomodoro_sound 'Pop' # Sound for desktop notifications (Run `ls /System/Library/Sounds` for all sounds)
set -g @pomodoro_granularity 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'