2012-11-10 19:53:52 -08:00
|
|
|
set-option -g status on
|
2024-05-31 11:30:33 -07:00
|
|
|
set-option -g status-position top
|
2012-11-10 19:53:52 -08:00
|
|
|
set-option -g status-interval 2
|
2015-08-05 10:39:54 -07:00
|
|
|
set-option -g renumber-windows on
|
2017-04-28 08:59:01 -07:00
|
|
|
set-option -g history-limit 10000
|
2021-11-04 11:35:54 -07:00
|
|
|
set -s escape-time 0
|
|
|
|
|
2024-05-30 08:34:17 -07:00
|
|
|
### Fix supporting italics
|
|
|
|
set -g default-terminal "tmux"
|
|
|
|
|
|
|
|
### Use the system clipboard
|
|
|
|
set -g set-clipboard on
|
|
|
|
|
2021-11-04 11:35:54 -07:00
|
|
|
### Reload the config with r
|
|
|
|
bind-key r source-file ~/.tmux.conf\; display-message "Reloaded config"
|
2017-04-28 08:59:01 -07:00
|
|
|
|
2021-11-04 11:35:54 -07:00
|
|
|
### Toggle Mouse Mode
|
|
|
|
bind-key m set-window-option mouse\; display-message "mouse support is now #{?mouse,on,off}"
|
2012-11-09 20:44:06 -08:00
|
|
|
|
2024-05-29 10:22:47 -07:00
|
|
|
### Open LazyGit in a popup
|
2024-05-31 11:30:52 -07:00
|
|
|
bind-key g display-popup -E -d '#{pane_current_path}' -w 90% -h 90% lazygit
|
2024-05-29 10:22:47 -07:00
|
|
|
|
2017-09-14 07:07:18 -07:00
|
|
|
# New panes and windows have same cwd as the one opening it
|
|
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
bind '"' split-window -c "#{pane_current_path}"
|
|
|
|
bind % split-window -h -c "#{pane_current_path}"
|
2012-11-09 20:44:06 -08:00
|
|
|
|
2017-06-09 08:09:51 -07:00
|
|
|
### vim/tmux navigation
|
2024-05-30 08:33:46 -07:00
|
|
|
### https://github.com/christoomey/vim-tmux-navigator
|
2015-08-05 10:39:54 -07:00
|
|
|
set -g focus-events on
|
2024-05-30 08:33:46 -07:00
|
|
|
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
|
|
|
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
|
|
|
|
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
|
|
|
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
|
|
|
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
|
|
|
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
|
|
|
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
|
|
|
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
|
|
|
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
|
|
|
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
2015-08-05 10:39:54 -07:00
|
|
|
|
|
|
|
# change windows
|
|
|
|
bind -n S-Right next-window
|
|
|
|
bind -n S-Left previous-window
|
|
|
|
|
2021-11-04 11:35:54 -07:00
|
|
|
set -g base-index 1 # Windows start at index 1
|
|
|
|
setw -g pane-base-index 1 # Panes start at index 1
|
2017-06-09 08:09:51 -07:00
|
|
|
|
2012-11-09 20:44:06 -08:00
|
|
|
# clock
|
2015-10-14 09:02:01 -07:00
|
|
|
set-window-option -g clock-mode-colour green #green
|
2021-11-04 11:35:54 -07:00
|
|
|
set -g status-right '#(date "+%%Y-%m-%d %%H:%%M:%%S")'
|
2017-06-09 08:09:51 -07:00
|
|
|
|
|
|
|
# bell
|
|
|
|
set-window-option -g window-status-bell-style fg=white,bg=red #base2, red
|
2018-08-09 09:52:36 -07:00
|
|
|
|
2024-05-30 08:33:05 -07:00
|
|
|
# Color Scheme
|
|
|
|
set -g @catppuccin_flavour 'latte'
|
|
|
|
set -g @catppuccin_window_left_separator ""
|
|
|
|
set -g @catppuccin_window_middle_separator ""
|
|
|
|
set -g @catppuccin_window_right_separator "█ "
|
|
|
|
set -g @catppuccin_window_default_text "#W"
|
|
|
|
set -g @catppuccin_window_default_fill "number"
|
|
|
|
set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag, ,}"
|
|
|
|
set -g @catppuccin_window_current_fill "number"
|
2024-05-31 11:31:24 -07:00
|
|
|
set -g @catppuccin_status_modules_right "directory gitmux session"
|
2024-05-31 11:31:46 -07:00
|
|
|
set -g @catppuccin_directory_text "#( echo \#{pane_current_path} | sed \"s|$HOME|~|\" )"
|
2024-05-30 20:58:13 -07:00
|
|
|
set -g @catppuccin_gitmux_text "#(gitmux -cfg $HOME/.gitmux.conf \"#{pane_current_path}\")"
|
2024-05-30 08:33:05 -07:00
|
|
|
set -g @catppuccin_status_left_separator " "
|
|
|
|
set -g @catppuccin_status_fill "icon"
|
|
|
|
set -g @catppuccin_window_status_enable "no"
|
2022-11-18 10:28:20 -08:00
|
|
|
|
2024-05-30 08:32:35 -07:00
|
|
|
# List of plugins
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
|
|
# set -g @plugin 'tmux-plugins/tmux-sensible'
|
2024-05-30 08:33:05 -07:00
|
|
|
set -g @plugin 'catppuccin/tmux'
|
2024-05-30 08:32:35 -07:00
|
|
|
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
|
|
run '~/.tmux/plugins/tpm/tpm'
|
|
|
|
|