Crates.io | tmuxstatus |
lib.rs | tmuxstatus |
version | 1.1.0 |
source | src |
created_at | 2022-10-12 19:55:19.007793 |
updated_at | 2024-05-03 08:26:02.291911 |
description | Generates tmux status line with CPU usage. |
homepage | https://www.bitpowder.com/apps/tmuxstatus.page |
repository | https://gitlab.com/bitpowder/indigo-ng |
max_upload_size | |
id | 686649 |
size | 48,291 |
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
Displays:
sudo apt install sysfsutils; echo "mode class/powercap/intel-rapl:0/energy_uj = 0444" | sudo tee -a /etc/sysfs.d/intel-rapl-user-mode; sudo chmod -R a+r /sys/class/powercap/intel-rapl
, warning: this can lead to security attacks on keys).Example (using nerd-fonts):
█████▇█████████████▇▇████▇▇▇▇█ 8.679G 80% 2.214 mJ 08:01
cargo install tmuxstatus
Add the following to your ~/.tmux.conf
:
set -g status-right "#(tmuxstatus) %H:%M "
set -g status-interval 1
set -g status-right-length "80"
To auto suspend after 30 minutes, use the following command:
set -g status-right "#(tmuxstatus --timeout 1800 sudo systemctl suspend) %H:%M "
set -g status-interval 1
set -g status-right-length "80"
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.