diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-08-30 00:50:14 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-08-30 00:50:14 +0200 |
| commit | bba0c17c6c0bc310e44ae45b9573d2dc99b8157f (patch) | |
| tree | efb8b4a3c9091d91f53905d69919935b33b5b1cd /.config/tmux/right-status.sh | |
| parent | 4a29c3cc90b48048961331de31c2229cfd71055f (diff) | |
| download | dotfiles-bba0c17c6c0bc310e44ae45b9573d2dc99b8157f.tar.gz dotfiles-bba0c17c6c0bc310e44ae45b9573d2dc99b8157f.zip | |
Changed tmux
Diffstat (limited to '.config/tmux/right-status.sh')
| -rwxr-xr-x | .config/tmux/right-status.sh | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/.config/tmux/right-status.sh b/.config/tmux/right-status.sh deleted file mode 100755 index a14bbe3..0000000 --- a/.config/tmux/right-status.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# Get CPU average -getCPU=$[100-$(vmstat 1 2|tail -1|awk '{print $15}')] - -# Grab the second line of the ouput produced by the command: free -g (displays output in Gb) -getMem=$(free -h | sed -n '2p') -getMemPct=$(free -g | sed -n '2p') - -# Split the string in secondLine into an array -read -ra ADDR <<< "$getMem" -read -ra ADDRPct <<< "$getMemPct" - -# Get the total RAM from arrays -totalRam="${ADDR[1]//[^0-9.0-9]/}" -totalRamPct="${ADDRPct[1]}" - -# Get the used RAM from arrays -usedRam="${ADDR[2]//[^0-9.0-9]/}" -usedRamPct="${ADDRPct[2]}" - -# Calculate and display the percentages -pct="$(($usedRamPct*100/$totalRamPct))" -usage="$usedRam/$totalRam" -#echo "cpu:$getCPU% | mem:$pct% ($usage""G)" -echo "Cpu:$getCPU% | Mem:$pct% |" - |
