From 7d24ef4eac4e9f9750587ab32cf51c6dde80f3e2 Mon Sep 17 00:00:00 2001 From: Blaine Motsinger Date: Wed, 16 Sep 2026 08:36:01 -0400 Subject: [PATCH] GH-8: add tmux-load and tmux-mem plugins to installation and docs --- README.md | 15 +++++++++++++++ bin/tmux-load | 2 ++ bin/tmux-mem | 2 ++ install.sh | 4 +++- 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 bin/tmux-load create mode 100755 bin/tmux-mem diff --git a/README.md b/README.md index 0193371..22e9089 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,21 @@ tmux-ws list tmux-ws kill project ``` +## tmux Status Plugins + +Two lightweight status bar plugins are included in `bin/`: + +- **tmux-load** — displays system load average +- **tmux-mem** — displays memory usage (used/total) + +Add them to your `~/.tmux.conf` status line: + +``` +set -g status-right "#(tmux-load) #(tmux-mem) %H:%M" +``` + +After install, both commands are available in your PATH. + ## Config Workspace configs live in `~/.config/tmux-ws/`. Each workspace is a directory with a `workspace.conf` file and optional `hooks/` directory. diff --git a/bin/tmux-load b/bin/tmux-load new file mode 100755 index 0000000..b9bf7f0 --- /dev/null +++ b/bin/tmux-load @@ -0,0 +1,2 @@ +#!/bin/bash +echo -n "load $(cut -d' ' -f1-3 /proc/loadavg)" diff --git a/bin/tmux-mem b/bin/tmux-mem new file mode 100755 index 0000000..1b3d6c7 --- /dev/null +++ b/bin/tmux-mem @@ -0,0 +1,2 @@ +#!/bin/bash +echo -n "mem $(free -h | sed -n 's/^Mem:[[:space:]]*\([0-9.]*[A-Za-z]*\)[[:space:]]*\([0-9.]*[A-Za-z]*\).*/\2\/\1/p')" diff --git a/install.sh b/install.sh index fbe08df..88fa96f 100755 --- a/install.sh +++ b/install.sh @@ -135,8 +135,10 @@ if [[ -f "$HOME/.zshrc" ]]; then fi fi -# Make script executable +# Make scripts executable chmod +x "$BIN_DIR/tmux-ws" +chmod +x "$BIN_DIR/tmux-load" +chmod +x "$BIN_DIR/tmux-mem" echo "" info "Installed! Reload your shell:"