A tmux plugin which detects if your computer runs on battery or AC power to adjust the status-interval
time
accordingly. A higher status-interval
can reduce power consumption if many scripts must to be run to redraw the status
line (for example when using tmux-powerline).
-
Add
set -g @plugin 'IngoHeimbach/tmux-power-saver'
to your
.tmux.conf
. -
Restart
tmux
or reload.tmux.conf
and press<prefix>-I
.
-
Set other status line intervals:
set -g @power-saver_battery_interval "<battery interval>" set -g @power-saver_ac_interval "<ac power interval>"
By default, the
status-interval
will be set to 2 seconds for ac and 20 seconds for battery power.
This plugin runs out-of-the-box, so just enjoy!