diff options
Diffstat (limited to 'segments/tmux_mem_cpu_load.sh')
-rwxr-xr-x | segments/tmux_mem_cpu_load.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/segments/tmux_mem_cpu_load.sh b/segments/tmux_mem_cpu_load.sh new file mode 100755 index 0000000..c05be3e --- /dev/null +++ b/segments/tmux_mem_cpu_load.sh @@ -0,0 +1,14 @@ +# Print out Memory, cpu and load using https://github.com/thewtex/tmux-mem-cpu-load + +run_segment() { + type tmux-mem-cpu-load >/dev/null 2>&1 + if [ "$?" -ne 0 ]; then + return + fi + + stats=$(tmux-mem-cpu-load) + if [ -n "$stats" ]; then + echo "$stats"; + fi + return 0 +} |