Giter Club home page Giter Club logo

Comments (7)

pacien avatar pacien commented on May 30, 2024 1

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.

20230105-2023-01-05_18.03.19.mp4

Config:

set -ga status-right ' #{cpu_percentage}C #{ram_percentage}M'

Versions:

  • tmux 3.3a
  • tmux-cpu unstable-2021-12-15
  • Terminal emulator: alacritty 0.11.0
  • OS: Linux NixOS 22.11

from tmux-cpu.

pacien avatar pacien commented on May 30, 2024 1

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.

from tmux-cpu.

casperdcl avatar casperdcl commented on May 30, 2024

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%%"

from tmux-cpu.

maxless avatar maxless commented on May 30, 2024

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.

from tmux-cpu.

casperdcl avatar casperdcl commented on May 30, 2024

20.04 on WSL2. Tmux version is 3.0a

Sounds like life on the edge

from tmux-cpu.

maxless avatar maxless commented on May 30, 2024

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?

from tmux-cpu.

casperdcl avatar casperdcl commented on May 30, 2024

I guess the problem is this is not atomic

from tmux-cpu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.