Closed maxless closed 1 year ago
reset colours:
-set-option -g status-right 'CPU: #{cpu_fg_color}#{cpu_percentage} MEM: #{ram_fg_color}#{ram_percentage}'
+set-option -g status-right 'CPU: #{cpu_fg_color}#{cpu_percentage}#[fg=#aaaaaa] MEM: #{ram_fg_color}#{ram_percentage}'
I'm on Ubuntu 16.04 and 18.04 and haven't noticed doubled up percentages - and I have a whopper:
set -g status-right-length 50
set -g status-right '#{host} #{cpu_bg_color}#{cpu_percentage}#[bg=green][#{ram_bg_color}#{ram_percentage}#[bg=green]](#{cpu_temp_bg_color}#{cpu_temp}#[bg=green]) #{gpu_bg_color}#{gpu_percentage}#[bg=green][#{gram_bg_color}#{gram_percentage}#[bg=green]](#{gpu_temp_bg_color}#{gpu_temp}#[bg=green])'
set -g @cpu_percentage_format "%4.1f%%"
set -g @gpu_percentage_format "%2.0f%%"
Thanks for the colors bit.
This is is first time I'm using this plugin so I don't know whether it's related to Ubuntu version.
20.04 on WSL2. Tmux version is 3.0a
Sounds like life on the edge
Nah, I just got to upgrading my development environment (happens around every 2 years) and it coincided with the WSL2 release :)
I've noticed some shell scripts in htop running periodically, if they're from tmux-cpu, perhaps I could give you their input/output for debugging?
I'm observing the same issue: the RAM percentage is sometimes repeated. I'm not using any colouring.
The issue is mostly happening through SSH.
It rarely happens with a local tmux.
https://user-images.githubusercontent.com/1449319/210838566-65686032-7421-4945-92e3-f578fb6e6417.mp4
Config:
set -ga status-right ' #{cpu_percentage}C #{ram_percentage}M'
Versions:
Debugging further: the issue seems to be happening when launching more than one tmux window at the same time.
The repeated output can be reproduced with the script alone:
~/src/tmux-cpu master
❯ while true
./scripts/ram_percentage.sh
echo
sleep 0.01
end
The issue appears when launching this loop on multiple terminals at the same time.
Sometimes I can see memory usage like this: It stays like this for a short period of time (probably the update period) and then shows correctly: That leads me to another issue - you can see how MEM is green, is there a way to reset the text color back to default?
I use Ubuntu 20.04 on WSL2. Tmux version is 3.0a. The relevant config section is: