-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
109 lines (85 loc) · 3.57 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
102
103
104
105
106
107
108
109
#
# ██ ███████ ██ ██
# ██ ██ ██ ██ Jakob Ferdinand Wegenschimmel
# ██ █████ ██ █ ██ https://github.com/JakobFerdinand
# ██ ██ ██ ██ ███ ██
# █████ ██ ███ ███
#
# A customized tmux configuration (https://github.com/tmux/tmux)
#
# Binding the leader key to C-Space
unbind C-b
set -g prefix C-Space
# Reload the configuration by Leader r
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.temux.conf"
# Enable mouse
set -g mouse on
set -g history-limit 10000
# Splitting Windows
unbind v # not set by default
unbind h # not set by default
unbind % # Split vertically
unbind '"' # Split horizontally
bind v split-window -h -c "#{pane_current_path}"
bind h split-window -v -c "#{pane_current_path}"
# Navigating in windows
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
unbind n # DEFAULT KEY: Move to next window
unbind w # DEFAULT KEY: change current window interactively
bind n command-prompt "rename-window '%%'"
bind w new-window -c "#{pane_current_path}"
set -g base-index 1 # setting the first window to index 1
set-window-option -g pane-base-index 1
bind -n M-j previous-window
bind -n M-k next-window
# Vi key bindings in copy mode
set-window-option -g mode-keys vi
unbind -T copy-mode-vi Space; # Default for begin-selection
unbind -T copy-mode-vi Enter; # Default for copy-selection
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancle "reattach-to-user-namespace pbcopy" # pipe to mac clipboard
# ---------------------------------
# Tmux with Vim
# ---------------------------------
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
## Smart pane switching with awareness of Vim splits.
## See: https://github.com/christoomey/vim-tmux-navigator
#
#is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
# | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
#bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
#bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
#bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
#bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
#bind -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# ---------------------------------
# Design
# ---------------------------------
# Dracula Color Pallette
white='#f8f8f2'
gray='#44475a'
dark_gray='#282a36'
light_purple='#bd93f9'
dark_purple='#6272a4'
cyan='#8be9fd'
green='#50fa7b'
orange='#ffb86c'
red='#ff5555'
pink='#ff79c6'
yellow='#f1fa8c'
# message style
set -g message-style bg=${gray},fg=${white}
# window status
setw -g window-status-format "#[fg=${white}]#[bg=${gray}] #I #W${flags}"
setw -g window-status-current-format "#[fg=${white},bg=${dark_purple}] #I #W${current_flags} "
setw -g window-status-activity-style "bold"
setw -g window-status-bell-style "bold"
# The statusbar
set -g status-position bottom
set -g status-style bg=${gray},fg=${white}
set -g status-left ''
set -g status-right '#{?client_prefix,#[fg=red]prefix pressed ...,#[fg=white]#H}'