-
Notifications
You must be signed in to change notification settings - Fork 7
/
tmux.conf
124 lines (89 loc) · 3.44 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# ============================================================================
# Plugins {{{
# ============================================================================
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'o0th/tmux-nova'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'wfxr/tmux-fzf-url'
# }}}
# ============================================================================
# Keybindings {{{
# ============================================================================
# use VI
set-window-option -g mode-keys vi
# Set prefix to C-s
set-option -g prefix C-s
unbind C-s
bind C-s send-prefix
# jump between sessions
unbind P
bind-key P display-popup -E -h '80%' 'tat'
unbind p
bind-key p display-popup -E -h '80%' 'tmux-fuzzy-choose-tree'
# Override copy and paste keybindings
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi C-v send -X rectangle-toggle
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel
# Open new windows in the same directory as the parent
bind c new-window -c "#{pane_current_path}"
bind-key g display-popup -E -d '#{pane_current_path}' -h '90%' -w '90%' 'lazygit -ucd "$HOME/.config/lazygit/"'
# }}}
# ============================================================================
# Appearance {{{
# ============================================================================
### BASIC CONFIG ###
set-option -g renumber-windows on
set-option -g base-index 1
set-option -g status-position top
set -g status-left-length 100
set -g status-right-length 100
set-option -sa terminal-features ',xterm-kitty:RGB'
### NOVA CONFIG ###
set -g @nova-nerdfonts true
set -g @nova-nerdfonts-left
set -g @nova-nerdfonts-right
set -g @nova-pane "#I:#W#{?window_zoomed_flag,(),}"
set -g @nova-rows 0
### COLORS ###
%hidden segment_normal_colors="#78a2c1 #2e3440"
%hidden segment_inverted_colors="#2e3440 #78a2c1"
set -g @nova-pane-active-border-style "#44475a"
set -g @nova-pane-border-style "#282a36"
set -g @nova-status-style-bg "#19191F"
set -g @nova-status-style-fg "#d8dee9"
set -g @nova-status-style-active-bg "#89c0d0"
set -g @nova-status-style-active-fg "#2e3540"
set -g @nova-status-style-double-bg "#2d3540"
### STATUS SEGMENTS ###
set -g @nova-segment-session "#{session_name}"
set -g @nova-segment-session-colors "$segment_normal_colors"
set -g @nova-segment-whoami "#(whoami)@#h"
set -g @nova-segment-whoami-colors "$segment_normal_colors"
set -g @nova-segment-date '#( date "+%a %m/%d %H:%M" )'
set -g @nova-segment-date-colors "$segment_normal_colors"
set -g @nova-segment-xcode-version "#(xcode-version)"
set -g @nova-segment-xcode-version-colors "$segment_inverted_colors"
set -g @nova-segment-battery "#(battery)"
set -g @nova-segment-battery-colors "$segment_normal_colors"
set -g @nova-segments-0-left "session"
set -g @nova-segments-0-right "battery xcode-version date"
# }}}
# ============================================================================
# Splits {{{
# ============================================================================
# horizontal and vertical splits
bind \\ split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# resize current pane with hjkl (repeatable)
unbind l
bind -r l resize-pane -R 8
unbind h
bind -r h resize-pane -L 8
unbind k
bind -r k resize-pane -U 4
unbind j
bind -r j resize-pane -D 4
# }}}
run '~/.tmux/plugins/tpm/tpm'