-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
130 lines (106 loc) · 3.84 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
125
126
127
128
129
130
################################################################################
# nvim + alacritty (with terminfo configured)
# Terminfo config:
# $ infocmp alacritty
# $ sudo tic -xe alacritty,alacritty-direct extra/alacritty.info
################################################################################
set -g default-terminal 'screen-256color'
set-option -sa terminal-overrides ',alacritty:RGB'
set-option -g focus-events on # required for 'autoread'
################################################################################
#
# Note: use `$ xxd -psd` to capture a hex dump of key inputs for mapping super
# key (e.g. ⌘) chords to Ctrl bindings for tmux
#
#flipping the orientation of the current pane with the pane <arrow-way>-of
bind -n S-Up move-pane -h -t '.{up-of}'
bind -n S-Right move-pane -t '.{right-of}'
bind -n S-Left move-pane -t '.{left-of}'
bind -n S-down move-pane -h -t '.{down-of}'
# hotkey in nvim to toggle between dark and light temes
# hotkey in tmux to move panes from vert to horz
# hotkey in tmux to easily move up to previous prompt
# bash script to kill all running tmux sessions
#
# layouts
# select-layout even-vertical
# select-layout even-horizontal
set-option -g history-limit 250000
set-option -sg escape-time 10
set-window-option -g mode-keys vi
# disable kill-window (y/n) prompt
# '<Prefix> &' is bound to confirm-before -p "kill-window #W? (y/n)"
bind-key & kill-window
bind-key x kill-pane
# Wipe tmux scrollback buffer (mimic macOS ⌘K)
# reset (-R) clears the prompt, clear (C-l) restores it
# clear-history wips the scrollback buffer.
bind-key k send-keys -R C-l \; clear-history
# Open new Windows and Panes at the same dir
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Set a mark
bind-key u set-buffer ' ' \; paste-buffer
# Search for mark
bind -T copy-mode-vi n send-keys -X search-forward " "
bind -T copy-mode-vi p send-keys -X search-backward " "
# Copy with y and don't scroll down window on mouse up
set -g mouse on
unbind -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi y send-keys -X copy-selection
# --> Catppuccin Dark
# bg="#1e1e28"
# fg="#dadae8"
# gray="#332e41"
# black="#15121c"
# black4="#575268"
# cyan="#c2e7f0"
# magenta="#c6aae8"
# pink="#e5b4e2"
# red="#e38c8f"
# green="#b1e3ad"
# yellow="#ebddaa"
# blue="#a4b9ef"
# orange="#f9c096"
# --> Catppuccin Latte
bg="#dce0e8"
fg="#4c4f69"
gray="#ccd0da"
black="#8c8fa1"
black4="#6c6f85"
red="#d20f39"
yellow="#e49320"
orange="#fe640b"
green="#40a02b"
cyan="#7287fd" # This is a cuter color
# cyan="#209fb5"
blue="#2a6ef5"
pink="#ea76cb"
magenta="#8839ef"
# ----------------------------=== Theme ===--------------------------
# status
set -g status-position top
set -g status "on"
set -g status-bg "${bg}"
set -g status-justify "left"
set -g status-left-length "100"
set -g status-right-length "100"
# messages
set -g message-style "fg=${cyan},bg=${gray},align=centre"
set -g message-command-style "fg=${cyan},bg=${gray},align=centre"
# panes
set -g pane-border-style "fg=${pink}"
set -g pane-active-border-style "fg=${pink}"
# windows
setw -g window-status-activity-style "fg=${fg},bg=${bg},none"
setw -g window-status-separator ""
setw -g window-status-style "fg=${fg},bg=${bg},none"
setw -g window-status-format "#[fg=$bg,bg=$cyan] #I #[fg=$fg,bg=$gray] #{b:pane_current_path} "
setw -g window-status-current-format "#[fg=$bg,bg=$pink] #I #[fg=$pink,bg=$bg] #{b:pane_current_path} "
# --------=== Statusline
set -g status-left ""
set -g status-right "#[fg=$pink,bg=$bg]#[fg=$bg,bg=$pink]♥ #[fg=$fg,bg=$gray] #W #{?client_prefix,#[fg=$red],#[fg=$green]}#[bg=$gray]#{?client_prefix,#[bg=$red],#[bg=$green]}#[fg=$bg] #[fg=$fg,bg=$gray] #S "
# --------=== Modes
setw -g clock-mode-colour "${blue}"
setw -g mode-style "fg=${pink} bg=${gray} bold"