-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_tmux.conf
More file actions
127 lines (95 loc) · 4.34 KB
/
Copy pathdot_tmux.conf
File metadata and controls
127 lines (95 loc) · 4.34 KB
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
# Undercurl
set -g default-terminal "screen-256color"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
# default statusbar colors
set -g status-style bg=colour234 #bg1
# default window title colors
set -g window-status-style bg=colour214 #yellow
set -g window-status-style fg=colour234 #bg1
set -g window-status-activity-style bg=colour234 #bg1
set -g window-status-activity-style fg=colour248 #fg3
# active window title colors
set -g window-status-current-style bg=colour234
set -g window-status-current-style fg=colour237 #bg1
# pane border
set -g pane-active-border-style fg=blue #fg2
set -g pane-border-style fg=colour237 #bg1
# message infos
set -g message-style bg=colour234 #bg2
set -g message-style fg=colour223 #fg1
# writting commands inactive
set -g message-command-style bg=colour234 #fg3
set -g message-command-style fg=colour223 #bg1
# pane number display
set -g display-panes-active-colour colour250 #fg2
set -g display-panes-colour colour234 #bg1
# clock
set -g clock-mode-colour colour109 #blue
# bell
set -g window-status-bell-style fg=colour235,bg=colour234 #bg, red
## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
set -g status-justify "left"
set -g status-left-style "none"
set -g status-left-length "80"
set -g status-right-style "none"
set -g status-right-length "80"
set-window-option -g window-status-activity-style "none"
set-window-option -g window-status-style "none"
set-window-option -g window-status-separator ""
set-option -g status-left "#[fg=colour234, bg=colour151] Session #S #[fg=colour151, bg=colour234, nobold, noitalics, nounderscore]"
set-option -g status-right "#[fg=colour151,bg=colour234] %d/%m/%Y %H:%M #[fg=colour011, bg=colour234, nobold, noitalics, nounderscore]#[fg=colour234, bg=colour011] #h "
set-window-option -g window-status-current-format "#[fg=colour234, bg=colour151]#[fg=colour234, bg=colour151] #I #[fg=colour234, bg=colour151, bold] #{?window_zoomed_flag,#[fg=colour234][,}#W#{?window_zoomed_flag,#[fg=colour234]],} #[fg=colour151, bg=colour234, noitalics]"
set-window-option -g window-status-format "#[fg=colour151,bg=colour234] #I #[fg=colour151, bg=colour234] #W "
# reload
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
# pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# window navigation
unbind n
unbind p
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
# enables mouse support
set -g mouse on
# fixes slow escap
set -s escape-time 0
# enables mouse selection copy
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -se c -i"
# sets buffer size
set-option -g history-limit 10000
# Fix blinking cursor
set-option -ga terminal-overrides ',xterm-kitty:cnorm=\E[?12h\E[?25h'
#set-option -ga terminal-overrides ',xterm-ghostty:cnorm=\E[?12h\E[?25h'
bind-key m command-prompt -p "move window to:" "swap-window -t '%%'"
set -s command-alias[0] '.'='attach -c "#{pane_current_path}"'
# Options for: nhdaly/tmux-better-mouse-mode
set -g @scroll-down-exit-copy-mode "on"
set -g @scroll-without-changing-pane "on"
set -g @scroll-in-moused-over-pane "on"
set -g @scroll-speed-num-lines-per-scroll "3"
set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
run '~/.tmux/plugins/tpm/tpm'
# Check if TPM is installed
if-shell 'test ! -d ~/.tmux/plugins/tpm' \
'display-message "Warning: TPM (Tmux Plugin Manager) is not installed. Run \`git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm\` to install."'