catppuccin / tmux

💽 Soothing pastel theme for Tmux
MIT License
1.87k stars 584 forks source link

Modules hidden until refresh #337

Closed jeffcap1 closed 3 weeks ago

jeffcap1 commented 3 weeks ago

Is there an existing issue outlining your problem?

Describe your problem.

After upgrading to v0.4.0 I noticed my modules (both left and right) are hidden I force a refresh. Also, it appears they are not updating based on context. For example, the @catppuccin_status_session is not updating to the correct name when switching the session I am on.

Paste your configuration.

# new leader key
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix

# fix colors
set -g default-terminal 'tmux-256color'
set -ga terminal-overrides ",xterm-256color*:Tc"

# cursor
# Force cursor shape as blinking bar (xterm)
# https://neovim.io/doc/user/term.html#tui-cursor-shape
set -as terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[5 q'

# refresh tmux with leader + r
unbind r
bind r command-prompt "rename-window %%"
bind R source ~/.config/tmux/tmux.conf

# splits and navigation
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind -n M-H previous-window
bind -n M-L next-window
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt

# Start windows and panes at 1, not 0
set -g base-index 1                  # start indexing windows at 1 instead of 0
set -g pane-base-index 1             # start indexing panes at 1 instead of 0
set-window-option -g pane-base-index 1
set -g renumber-windows on           # renumber all windows when any window is closed

# options
set -g mouse on                      # mouse support
set -g detach-on-destroy off         # don't exit from tmux when closing a session
set -g escape-time 0                 # zero-out escape time delay
set -g history-limit 1000000         # increase history size (from 2,000)
set -g set-clipboard on              # use system clipboard

# status bar
set -g status-justify left
set -g status-left-length 200
set -g status-right-length 200
set -g status-position top

# set vi mode
set -g xterm-keys on
set -g mode-keys vi
set -g status-keys vi

# act like vim
bind-key -n M-h select-pane -L
bind-key -n M-j select-pane -D
bind-key -n M-k select-pane -U
bind-key -n M-l select-pane -R

# copy mode
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi C-v send -X rectangle-toggle
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel

# keybinding fixes
bind k send-keys -R \; clear-history

# Sesh keybinding
bind-key "T" clock-mode
unbind t
bind-key "t" run-shell "sesh connect \"$(
  sesh list | fzf-tmux -p 55%,60% \
    --no-sort --border-label ' sesh ' --prompt '⚡  ' \
    --header '  ^a all ^t tmux ^g configs ^x zoxide ^d tmux kill ^f find' \
    --bind 'tab:down,btab:up' \
    --bind 'ctrl-a:change-prompt(⚡  )+reload(sesh list)' \
    --bind 'ctrl-t:change-prompt(🪟  )+reload(sesh list -t)' \
    --bind 'ctrl-g:change-prompt(⚙️  )+reload(sesh list -c)' \
    --bind 'ctrl-x:change-prompt(📁  )+reload(sesh list -z)' \
    --bind 'ctrl-f:change-prompt(🔎  )+reload(fd -H -d 2 -t d -E .Trash . ~)' \
    --bind 'ctrl-d:execute(tmux kill-session -t {})+change-prompt(⚡  )+reload(sesh list)'
)\""

set -g @continuum-save-interval '5'
# set -g @continuum-restore 'on'

# resurrect strategy
set -g @resurrect-strategy-nvim 'session'

# tmux-naviagtor remap
set -g @vim_navigator_mapping_left "M-h"
set -g @vim_navigator_mapping_right "M-l"
set -g @vim_navigator_mapping_up "M-k"
set -g @vim_navigator_mapping_down "M-j"

# theme flavor
set -g @catppuccin_flavor "macchiato"
# set -g @catppuccin_flavor "mocha"

# status format
set -g @catppuccin_status_default "on"
set -g @catppuccin_status_background "none"
set -g @catppuccin_status_connect_separator "no"

# window icons
set -g @catppuccin_icon_window_last "󰖰 "
set -g @catppuccin_icon_window_current "󰖯 "
set -g @catppuccin_icon_window_zoom "󰁌 "
set -g @catppuccin_icon_window_mark "󰃀 "
set -g @catppuccin_icon_window_silent "󰂛 "
set -g @catppuccin_icon_window_activity "󱅫 "
set -g @catppuccin_icon_window_bell "󰂞 "

# window format
set -g @catppuccin_window_status_style "rounded"
set -g @catppuccin_window_number_position "right"
# set -g @catppuccin_window_status "icon"
set -g @catppuccin_window_status "none"

# window default format
# set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_fill "none"
set -g @catppuccin_window_default_text "#W"

# window current format
# set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,(),}"

# status format
set -g @catppuccin_status_left_separator  ""
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"

# directory format
set -g @catppuccin_directory_text "#{b:pane_current_path}"

# date format
set -g @catppuccin_date_time_text "%H:%M"
# set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M:%S"

# weather format
set-option -g @tmux-weather-location "Wayne,%20NJ"
set-option -g @tmux-weather-format "%l:+%t+%c"
set-option -g @tmux-weather-units "u"

# modules list
## left
set -gF status-left "#{E:@catppuccin_status_session}"

## right
set -gF status-right "#{E:@catppuccin_status_application}"
set -agF status-right "#{E:@catppuccin_status_directory}"
set -agF status-right "#{E:@catppuccin_status_date_time}"
set -agF status-right "#{E:@catppuccin_status_weather}"

# List of plugins
set -g @plugin 'tmux-plugins/tpm'

set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'jimeh/tmuxifier'

set -g @plugin 'catppuccin/tmux'
set -g @plugin 'xamut/tmux-weather'

# Fixes plugin being overwritten by theme
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

Attach screenshots.

No response

What tmux version are you seeing the issue on?

tmux 3.5

Any additional comments?

No response

kjnsn commented 3 weeks ago

Can you remove the -F flag when you set status-right to see if that fixes the issue?

jeffcap1 commented 3 weeks ago

Can you remove the -F flag when you set status-right to see if that fixes the issue?

I just tried that and it fixed the issue! Thank you so much for the quick reply and fix :)