Awesome
Workspace usage plugin for tmux
<img width="1512" alt="image" src="https://github.com/user-attachments/assets/c2a060e0-7124-4761-98a5-9f92eea94d0c">Displays the memory and CPU usage of your workspace processes in the tmux status bar.
Features
- Displays memory usage in MB.
- Displays CPU usage as a percentage.
- Configurable list of processes to monitor.
- Toggle memory and CPU usage display on or off via tmux settings.
Installation
- Using TPM, add the following line to your
~/.tmux.conf
file:
set -g @plugin 'sjdonado/tmux-workspace-usage'
Note: The above line should be before
run '~/.tmux/plugins/tpm/tpm'
- Then press
tmux-prefix
+ <kbd>I</kbd> (capital i, as in Install) to fetch the plugin as per the TPM installation instructions
Configuration
@workspace_usage_processes
: A string of process names separated by|
that you want to monitor.@workspace_usage_mem
: Toggles memory usage display (on
oroff
).@workspace_usage_cpu
: Toggles CPU usage display (on
oroff
).@workspace_usage_interval_delay
: The amount of time (in seconds) to delay updates. If set to a value greater than@status-interval
, the delay will be skipped.
Example:
# Set the processes to monitor, customize this as needed (default is 'tmux')
set -g @workspace_usage_processes 'tmux|nvim|mason'
# Enable memory and CPU usage display (default is 'on')
set -g @workspace_usage_mem 'on'
set -g @workspace_usage_cpu 'on'
# Set the interval delay in seconds, updates every 20 seconds if @status-interval is 15 (default is 0)
set -g @workspace_usage_interval_delay 5
# Add the plugin output to status-right
set -g status-right '#{workspace_usage}'