-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
105 lines (82 loc) · 3.67 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
# Add truecolor support
set-option -ga terminal-overrides ",xterm-256color-italic:Tc"
set-option -sa terminal-overrides ',XXX:RGB'
# Default terminal is 256 colors
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
# https://unix.stackexchange.com/a/43415/222501
set -g history-limit 4096
# https://github.com/neovim/neovim/issues/2035#issuecomment-388403913
set -sg escape-time 0
set-option -sg escape-time 0
setw -g mouse on
set-option -g focus-events on
set-window-option -g xterm-keys on
# https://dev.to/iggredible/the-easy-way-to-copy-text-in-tmux-319g
# enter into copy mode: ctrl+b {
# trigger copy start: v
# trigger copy: enter
#
# I switched to this because the commands below were causing empty copies to show up in my clipboard
# often when I'd switch back to a terminal window with the mouse
setw -g mode-keys vi
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/issues/66#issuecomment-335306334
# bind-key -T copy-mode-vi v send -X begin-selection
# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
# bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
# https://stackoverflow.com/a/32699916/2892779
bind -n End send-key C-e
bind -n Home send-key C-a
# Open new panes in current path
bind c new-window -c "#{pane_current_path}"
bind -n C-k clear-history
# Enable the visual bell
# set -g visual-bell on
set -g clock-mode-style 24
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
# WARNING: hex colors can't contain capital letters
# --> Catppuccin (some colors)
thm_bg="#1b1624"
thm_fg="#B9C4E3"
thm_white="#f0f0f5"
thm_black="#0E0C13"
thm_gray="#312C44"
thm_magenta="#ae9ad6"
thm_pink="#f0a8e4"
thm_red="#e28d8d"
thm_green="#add692"
thm_yellow="#f0dc89"
thm_blue="#84a5cb"
thm_orange="#e7a988"
catppuccin12="#3e4058"
# ----------------------------=== Theme ===--------------------------
# status
set -g status-position bottom
set -g status "on"
set -g status-bg "${thm_bg}"
set -g status-justify "left"
set -g status-left-length "100"
set -g status-right-length "100"
# messages
set -g message-style fg="${thm_white}",bg="${thm_gray}",align="centre"
set -g message-command-style fg="${thm_white}",bg="${thm_gray}",align="centre"
# panes
set -g pane-border-style fg="${thm_gray}"
set -g pane-active-border-style fg="${thm_blue}"
# windows
setw -g window-status-activity-style fg="${thm_fg}",bg="${thm_bg}",none
setw -g window-status-separator ""
setw -g window-status-style fg="${thm_fg}",bg="${thm_bg}",none
# --------=== Statusline
set -g status-left ""
set -g status-right "#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}#[bg=$thm_gray]#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S "
# current_dir
setw -g window-status-format "#[fg=$thm_fg,bg=$thm_gray] #I #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} "
setw -g window-status-current-format "#[fg=$thm_bg,bg=$thm_green] #I #[fg=$thm_white,bg=$thm_bg] #{b:pane_current_path} "
# parent_dir/current_dir
# setw -g window-status-format "#[fg=colour232,bg=colour111] #I #[fg=colour222,bg=colour235] #(echo "#{pane_current_path}" | rev | cut -d'/' -f-2 | rev) "
# setw -g window-status-current-format "#[fg=colour232,bg=colour208] #I #[fg=colour255,bg=colour237] #(echo "#{pane_current_path}" | rev | cut -d'/' -f-2 | rev) "
# --------=== Modes
setw -g clock-mode-colour "${thm_blue}"
setw -g mode-style "fg=${thm_pink} bg=${catppuccin12} bold"