-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
138 lines (113 loc) · 4.85 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
131
132
133
134
135
136
137
# Enable 24-bit color (true color)
set-option -sa terminal-overrides ",xterm*:Tc"
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',xterm-256color:Tc'
# Set bar to top position
set-option -g status-position top
# Enable mouse support
set -g mouse on
# Change prefix key
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# Reload
bind-key -r r source-file ~/.tmux.conf
# Vim style pane selection
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Resize the current pane using Alt + direction
bind -n M-k resize-pane -U 5
bind -n M-j resize-pane -D 5
bind -n M-h resize-pane -L 5
bind -n M-l resize-pane -R 5
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
# Plugins
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'catppuccin/tmux#v2.1.2'
set -g @plugin 'olimorris/tmux-pomodoro-plus'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'omerxx/tmux-sessionx'
set -g @catppuccin_flavor "mocha"
set -g @catppuccin_window_status_style "basic"
set-window-option -g window-status-current-format "#{?pane_active,#[fg=yellow],#[fg=white]}#I: #{pane_current_command} "
set-window-option -g window-status-format "#{?pane_active,#[fg=green],#[fg=grey]}#I: #{pane_current_command} "
# Load catppuccin
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
# For TPM, instead use `run ~/.config/tmux/plugins/tmux/catppuccin.tmux`
set-option -g @catppuccin_window_text ' #W'
set -g @catppuccin_window_current_text ' #W'
# set -g @catppuccin_window_default_text '#W'
# status bar
# set -g status-style "fg=#665c54"
# set -g status-left-style "fg=#928374"
set -g status-interval 1
set -g status-left ""
# Make the status line pretty and add some modules
set -g status-right-length 100
set -g status-left-length 100
set -g status-right "#{E:@catppuccin_status_directory}"
set -ag status-right "#{E:@catppuccin_status_application}"
set -ag status-right "#{E:@catppuccin_status_user}"
set -ag status-right "#{E:@catppuccin_status_session}"
set -g @catppuccin_directory_text "#{pane_current_path}"
# pomodoro timer
set -g status-left "#{pomodoro_status}"
set -ag status-left " "
# set -g status-left-style "bg=#928374"
set -g @pomodoro_on " "
# set -g @pomodoro_complete "#[fg=#889E73] "
# set -g @pomodoro_pause "#[fg=#F4D793] "
# set -g @pomodoro_prompt_break "#[fg=#889E73] ? "
# set -g @pomodoro_prompt_pomodoro "#[fg=#A94A4A] ? "
set -g @pomodoro_granularity 'on'
set -g @pomodoro_interval_display " [%s/%s]"
set -g @pomodoro_complete " ✔︎ " # The formatted output when the break is running
set -g @pomodoro_pause " ⏸︎ " # The formatted output when the Pomodoro/break is paused
set -g @pomodoro_prompt_break " ⏲︎ break?" # The formatted output when waiting to start a break
set -g @pomodoro_prompt_pomodoro " ⏱︎ start?" # The formatted output when waiting to start a Pomodoro
set -g @pomodoro_mins 50 # The duration of the Pomodoro
set -g @pomodoro_break_mins 15 # The duration of the break after the Pomodoro completes
set -g @pomodoro_intervals 5 # The number of intervals before a longer break is started
set -g @pomodoro_long_break_mins 30 # The duration of the long break
set -g @pomodoro_repeat 'off' # Automatically repeat the Pomodoros?
set -g @pomodoro_disable_breaks 'off' # Turn off breaks
# Set vi-mode
set-window-option -g mode-keys vi
# Keybindings for vi-mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "xclip -selection clipboard -in"
bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -in"
# Split window keybindings
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Initialize tmux plugins
run '~/.tmux/plugins/tpm/tpm'
# Preserve environment for conda
set-option -g update-environment "DISPLAY XAUTHORITY PATH"
# Fix path issues for conda
set-option -g default-command "exec /bin/zsh"
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"