catppuccin / tmux

💽 Soothing pastel theme for Tmux!
MIT License
1.82k stars 563 forks source link

CPU module not working #347

Open av1155 opened 3 days ago

av1155 commented 3 days ago

Is there an existing issue outlining your problem?

Describe your problem.

set -g status-right "#{E:@catppuccin_status_cpu}#{E:@catppuccin_status_directory}#{E:@catppuccin_status_session}"
image

Paste your configuration.

# Terminal settings and passthrough
set-option -sa terminal-overrides ",xterm*:Tc"
set -as terminal-overrides ',tmux*:Ms=\\E]52;%p1%s;%p2%s\\007'
set -g allow-passthrough on

# Enable clipboard integration
set -g set-clipboard on

# Enable mouse
set -g mouse on

# Prefix settings
unbind C-b
set -g prefix C-a
bind C-a send-prefix

# Keybinds
bind-key x kill-pane

# Split windows with current path
bind "-" split-window -v -c "#{pane_current_path}"
bind "\\" split-window -h -c "#{pane_current_path}"

# Pane selection with Alt + arrow keys
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

# Window navigation with Alt + H/L
bind -n M-, previous-window
bind -n M-. next-window

# Base index settings
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

# Catppuccin theme settings
set -g @catppuccin_flavor 'frappe'
set -g @catppuccin_window_status_style "rounded"
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W "
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W "
set -g @catppuccin_pane_active_border_style "fg=#{@thm_peach}"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"

# Updated Status Bar Modules
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_cpu}#{E:@catppuccin_status_directory}#{E:@catppuccin_status_session}"
set -g @catppuccin_directory_text "#(echo '#{pane_current_path}' | ~/scripts/scripts/tmux_shortpath.sh)"

# Ensure the top status bar is enabled
set-option -g status-position top

# Add a second empty status bar (padding)
set -g status-format[1] ''
set -g status 2

# Plugin settings
set -g @plugin 'tmux-plugins/tmux-sensible' # A set of tmux options that should be acceptable to everyone
set -g @plugin 'christoomey/vim-tmux-navigator' # Enables seamless navigation between tmux panes and vim splits
set -g @plugin 'catppuccin/tmux#latest' # A pretty tmux theme
set -g @plugin 'tmux-plugins/tmux-cpu' # CPU usage plugin for tmux
set -g @plugin 'tmux-plugins/tmux-yank' # Enables copying to system clipboard
set -g @plugin 'omerxx/tmux-sessionx' # Session switcher for tmux
# set -g @plugin 'xamut/tmux-weather' # Weather plugin for tmux

# Load TPM (Tmux Plugin Manager)
set -g @plugin 'tmux-plugins/tpm'

# SessionX Configuration =======================================================

# Key Bindings
set -g @sessionx-bind 'o'               # Set the key binding to invoke SessionX

# Session Visibility
set -g @sessionx-filter-current 'false' # Include the current session in the list by default

# Window and Layout Options
set -g @sessionx-window-mode 'off'      # Start with session view, not window view

# UI Customization for Preview
set -g @sessionx-preview-location 'top' # Set preview location
set -g @sessionx-preview-ratio '70%'    # Set preview size ratio
set -g @sessionx-window-height '90%'    # Set window height
set -g @sessionx-window-width '85%'     # Set window width

# SessionX CONFIGURATION END ===================================================

# Load TPM
run '~/.tmux/plugins/tpm/tpm'

# Status bar appearance settings
set -g status-bg default
set -g status-style bg=default

# Guard to prevent reloading the config from breaking the status bar
if -F '#{!=:#{status},2}' {
    set -g status-format[1] ''
    set -g status 2
}

Attach screenshots.

No response

What tmux version are you seeing the issue on?

❯ brew info tmux ==> tmux: stable 3.5 (bottled), HEAD

Any additional comments?

No response

kjnsn commented 2 days ago

Hey! Turns out this is actually broken by tmux: https://github.com/tmux/tmux/issues/4143

Maybe unfortunately, we did a big update of this plugin, and tmux 3.5 came out at about the same time.

I noticed that you're using zsh and tmux 3.5 in the screenshots. As of tmux 3.5, it will run everything with default-shell, which is going to be zsh in your setup. The CPU module only works with bash.

Currently I'm unable to get the cpu module working at all (there's nothing in my test config other than the cpu module). So I'm going to conclude that it isn't broken by this plugin.

Will keep this issue open to track fixes upstream, and to post any potential workarounds.

av1155 commented 2 days ago

aw, me sad

Thank you!