-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Is your feature request related to a problem? Please describe.
I like to keep k9s running in a dedicated terminal window all the time. However, due to constant screen refreshes, it consumes a significant amount of laptop battery.
Describe the solution you'd like
It would be great if k9s could refresh less frequently when the terminal window is not focused. I see two possible ways to achieve this:
-
Use the focus reporting extension of the ECMA-48 standard, defined and popularized by Xterm and became a de facto standard in many modern terminal emulators.
The application can request focus reporting by sending the escape sequenceESC [ ?1004h.
The terminal will then send backESC [ Iwhen the window gains focus andESC [ Owhen it loses focus.
To disable reporting, the application sendsESC [ ?1004l.
k9s could use these signals to dynamically adjust its refresh rate. -
Alternatively, the refresh rate could be reduced after a certain period of user inactivity (no input detected).
Describe alternatives you've considered
I’ve checked if iTerm2 or tmux provide a built-in way to suspend an application or pause its output when unfocused, but didn’t find any equivalent feature.
