dotfiles/.tmux.conf

80 lines
2.9 KiB
Plaintext
Executable File

set-option -g status on
set-option -g status-position top
set-option -g status-interval 2
set-option -g renumber-windows on
set-option -g history-limit 10000
set -s escape-time 0
### Fix supporting italics
set -g default-terminal "tmux"
### Use the system clipboard
set -g set-clipboard on
### Reload the config with r
bind-key r source-file ~/.tmux.conf\; display-message "Reloaded config"
### Toggle Mouse Mode
bind-key m set-window-option mouse\; display-message "mouse support is now #{?mouse,on,off}"
### Open LazyGit in a popup
bind-key g display-popup -E -d '#{pane_current_path}' -w 90% -h 90% lazygit
# 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}"
### vim/tmux navigation
### https://github.com/christoomey/vim-tmux-navigator
set -g focus-events on
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
# change windows
bind -n S-Right next-window
bind -n S-Left previous-window
set -g base-index 1 # Windows start at index 1
setw -g pane-base-index 1 # Panes start at index 1
# clock
set-window-option -g clock-mode-colour green #green
set -g status-right '#(date "+%%Y-%m-%d %%H:%%M:%%S")'
# bell
set-window-option -g window-status-bell-style fg=white,bg=red #base2, red
# 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"
set -g @catppuccin_status_modules_right "directory gitmux session"
set -g @catppuccin_directory_text "#( echo \#{pane_current_path} | sed \"s|$HOME|~|\" )"
set -g @catppuccin_gitmux_text "#(gitmux -cfg $HOME/.gitmux.conf \"#{pane_current_path}\")"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_window_status_enable "no"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
# set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'