bpytop icon indicating copy to clipboard operation
bpytop copied to clipboard

[REQUEST] Redraw Options (Key Shortcut, Disable, Enable)

Open boppy opened this issue 5 years ago • 3 comments

Is your feature request related to a problem? Please describe. I would love to have populated graphs directly after "startup". Since this would require some kind of daemon (that is kind of "over the top"), I tried to send bpytop to the background using dtach. It's working for the graphs that are redrawn, but not for the decorations.

Describe the solution you'd like I have two ideas regarding this:

  1. It would be awesome to have a key to redraw the decorations - or simply the complete ui. Since this is already done after a window resize, it's only the link to a key press that is missing ;)
  2. It would be even more awesome to have a way to disable redrawing and enable it again if needed to reduce cpu load while it's in the background. Could be a key press or a signal (kill -USR1) - personally I would prefer a signal.

Describe alternatives you've considered Currently I simply resize my terminal emulator to get a redraw done. Works perfectly fine!

Additional context Layout after re-attaching: image

boppy avatar Aug 10 '20 19:08 boppy

I could change it so the data collection thread keeps going when catching SIGTSTP, that way you could CTRL-Z out, the data collection keeps going in background, then when brought back with fg it refreshes the graphs.

For now you could toggle "Mini" mode back and forth with "M" (shift+m), which refreshes the screen on each toggle.

aristocratos avatar Aug 10 '20 19:08 aristocratos

I could change it so the data collection thread keeps going when catching SIGTSTP, that way you could CTRL-Z out, the data collection keeps going in background, then when brought back with fg it refreshes the graphs.

Good idea! But bg/fg would not work on remote machines after exiting the ssh session, but as I could manually send that signal to the thread and SIGCONT it again, that would totally suit my needs!

For now you could toggle "Mini" mode back and forth with "M" (shift+m), which refreshes the screen on each toggle.

Absolutely! 🚀

boppy avatar Aug 10 '20 19:08 boppy

For now you could toggle "Mini" mode back and forth with "M" (shift+m), which refreshes the screen on each toggle.

My bad, should be lower case "m"...

aristocratos avatar Aug 10 '20 20:08 aristocratos