Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cpu_mem & network module #194

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

lixin-wei
Copy link

@lixin-wei lixin-wei commented Apr 20, 2024

Add 2 handy modules: cpu_mem and network, as the following picture shows.

image

This module depends on [tmux-mem-cpu-load](https://github.com/thewtex/tmux-mem-cpu-load).

#### Install
The preferred way to install tmux-cpu is using [TPM](https://github.com/tmux-plugins/tpm).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify that this will build additional software

index=$1
icon="$(get_tmux_option "@catppuccin_cpu_mem_icon" "")"
color="$(get_tmux_option "@catppuccin_cpu_mem_color" "$thm_blue")"
text="$(get_tmux_option "@catppuccin_cpu_mem__text" "#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --cpu-mode 2 --averages-count 0 --interval 2)")"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an extra option "@catppuccin_cpu_mem_args/options" with as default "--cpu-mode 2 --averages-count 0 --interval 2"

index=$1
icon="$(get_tmux_option "@catppuccin_cpu_mem_icon" "")"
color="$(get_tmux_option "@catppuccin_cpu_mem_color" "$thm_blue")"
text="$(get_tmux_option "@catppuccin_cpu_mem__text" "#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --cpu-mode 2 --averages-count 0 --interval 2)")"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
text="$(get_tmux_option "@catppuccin_cpu_mem__text" "#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --cpu-mode 2 --averages-count 0 --interval 2)")"
text="$(get_tmux_option "@catppuccin_cpu_mem_text" "#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --cpu-mode 2 --averages-count 0 --interval 2)")"

2 underscores between mem and text

@gambhirsharma
Copy link

Hey, @lixin-wei, I'm having issues with the network module. It works when I install the plugin using <prefix> I, but it keeps terminating after a while. Here’s what it looks like.

How can I fix it?

Screen.Recording.2024-07-12.at.8.51.41.AM.mov

@vdbe
Copy link
Collaborator

vdbe commented Jul 12, 2024

@gambhirsharma is set -g @plugin 'catppuccin/tmux' placed before other plugins?

@gambhirsharma
Copy link

@gambhirsharma is set -g @plugin 'catppuccin/tmux' placed before other plugins?

Now it's showing the module but it doesn't render the internet speed text. Do I need to do something else to fix this?
image

This is what my .tmux.conf look like: Gist link

@vdbe
Copy link
Collaborator

vdbe commented Jul 12, 2024

That looks like a problem with the plugin not catppuccin/tmux. Maybe set interfaces like in the README of the plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants