3 releases (stable)

1.0.1 Dec 10, 2023
1.0.0 Mar 25, 2023
0.1.3 Oct 12, 2022

#297 in Command line utilities

Download history 3/week @ 2024-02-20 17/week @ 2024-02-27 3/week @ 2024-03-26 39/week @ 2024-04-02 35/week @ 2024-04-09

77 downloads per month

Apache-2.0

530KB
11K SLoC

tmuxstatus

Displays a tmux status line with the CPU utilization for the last 20 seconds, and the current memory usage. Daemon stops after 5 minutes (by default). On stop, can execute an user specified command, e.g. to suspend the computer.s

Example (using nerd-fonts):

 █████▇█████████████▇▇████▇▇▇▇█  56629M  08:01

Installation

cargo install tmuxstatus

Configuration

Add the following to your ~/.tmux.conf:

set -g status-interval 1
set -g status-right "#(tmuxstatus)  %H:%M "
set -g status-right-length "60"

To auto suspend after 5 minutes, use the following command:

set -g status-right "#(tmuxstatus --timeout 300 sudo systemctl suspend)  %H:%M "

Working

Creates a daemon on first use to avoid overhead. New invocations query this daemon so the overhead is reduced.

The overhead can be further reduced if tmux supports directly reading a status line using UNIX domain sockets instead of spawning a process.

Dependencies

~17–30MB
~527K SLoC