Last active
April 1, 2025 21:58
-
-
Save dualfade/0246793ae623a913eec5a460d101135d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.tmux.conf | |
# @dualfade -- | |
# updated: 03262251 -- | |
# https://github.com/tmux-plugins/tpm -- | |
# https://github.com/catppuccin/tmux -- | |
# https://github.com/catppuccin/tmux/blob/main/docs/reference/configuration.md -- | |
# https://github.com/catppuccin/tmux/discussions/317#discussioncomment-11451034 -- | |
# https://github.com/joshmedeski/tmux-nerd-font-window-name -- | |
# https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg -- | |
# https://github.com/omerxx/tmux-sessionx -- | |
# add ctl a prefix -- | |
# ctl b sucks; who came up with that anyway ? -- | |
set -g prefix2 C-a | |
bind C-a send-prefix -2 | |
# split horizontally -- | |
bind - split-window -v | |
# split vertically -- | |
bind _ split-window -h | |
# 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 | |
# copy mode -- | |
bind Enter copy-mode | |
# copy mode; selection -- | |
bind -T copy-mode-vi v send -X begin-selection | |
bind -T copy-mode-vi C-v send -X rectangle-toggle | |
bind -T copy-mode-vi y send -X copy-selection-and-cancel | |
bind -T copy-mode-vi Escape send -X cancel | |
bind -T copy-mode-vi H send -X start-of-line | |
bind -T copy-mode-vi L send -X end-of-line | |
# Options; make tmux pleasant -- | |
set -g default-terminal "tmux-256color" | |
# toggle mouse -- | |
set -g mouse off | |
# WARN: plugins -- | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'catppuccin/tmux#v2.1.3' | |
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name' | |
set -g @plugin 'omerxx/tmux-sessionx' | |
# configure catppuccin -- | |
set -g @catppuccin_flavor "macchiato" | |
set -g @catppuccin_status_background "none" | |
set -g @catppuccin_window_status_style "none" | |
set -g @catppuccin_pane_status_enabled "off" | |
set -g @catppuccin_pane_border_status "off" | |
# pane styling options -- | |
# https://github.com/catppuccin/tmux/blob/main/docs/reference/configuration.md#all-options-and-their-defaults -- | |
# @dualfade -- | |
# https://github.com/catppuccin/tmux/discussions/317#discussioncomment-11754838 -- | |
# General statusline cust -- | |
set -g status-style 'bg=terminal' | |
# status left -- | |
set -g status-left-length 200 | |
set -g status-left "" | |
set -ga status-left "#{?client_prefix,#{#[bg=#{@thm_red},fg=#{@thm_mantle},bold] #S },#{#[bg=#{@thm_mantle},fg=#{@thm_green}] #S }}" | |
set -ga status-left "#[bg=#{@thm_mantle},fg=#{@thm_overlay_0},none]│" | |
set -ga status-left "#[bg=#{@thm_mantle},fg=#{@thm_maroon}] #{pane_current_command} " | |
set -ga status-left "#[bg=#{@thm_mantle},fg=#{@thm_overlay_0},none]│" | |
# WARN: remove truncation; basename ref -- | |
# debug; tmux list-panes -F "#{pane_current_path}" -- | |
# set -ga status-left "#[bg=#{@thm_mantle},fg=#{@thm_blue}] #{=/-32/...:#{s|$USER|~|:#{b:pane_current_path}}} " | |
set -ga status-left "#[bg=#{@thm_mantle},fg=#{@thm_blue}] #{pane_current_path} " | |
# status right -- | |
set -g status-right-length 100 | |
set -g status-right "" | |
set -g status-right-length 100 | |
set -g status-right "" | |
set -ga status-right "#[bg=#{@thm_mantle},fg=#{@thm_blue}] %m-%d-%Y %H:%M:%S " | |
# WARN: Catppuccin theme config -- | |
# add; rename -- | |
set -g @catppuccin_window_status_style 'custom' | |
set -g @catppuccin_window_flags "icon" | |
set -g @catppuccin_window_number "#I" | |
set -g @catppuccin_window_text "#[fg=#{@thm_rosewater},bg=#{@thm_mantle}] #I #{?#{!=:#{window_name},},: #W,}" | |
set -g @catppuccin_window_current_number "" | |
set -g @catppuccin_window_current_text "#[fg=#{@thm_mantle},bg=#{@thm_lavender}] #I #{?#{!=:#{window_name},},: #W,}" | |
# WARN: final tmux things -- | |
# automatic rename -- | |
set -g automatic-rename on | |
# @dualfade -- | |
# force center justify; 012720251 -- | |
set -g status-justify 'absolute-centre' | |
set -g automatic-rename-format '#W' | |
setw -g pane-border-status off | |
set -g window-status-separator '|' | |
# set -g status-justify centre | |
#NOTE: bottom border -- | |
# https://github.com/catppuccin/tmux/discussions/317#discussioncomment-11754844 -- | |
# set -g pane-border-format "" | |
# set -g pane-border-status bottom | |
# set -g pane-border-style fg=colour0 | |
# set -g pane-active-border-style fg=colour0 | |
# WARN: empty line between status and panes -- | |
# set -Fg 'status-format[1]' '#{status-format[0]}' | |
# set -g 'status-format[0]' '' | |
# set -g status 2 | |
# remove conflicting settings -- | |
unbind-key -T root c | |
# WARN: finally; run tpm -- | |
run '~/.tmux/plugins/tpm/tpm' | |
# NOTE: after; tpm -- | |
# tmux pane; border colors -- | |
set -g pane-border-style fg=black | |
set -g pane-active-border fg=purple | |
# set; active window color -- | |
set -g window-style none | |
set -g window-active-style 'fg=default,bg=colour235' | |
# __EOF__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment