diff options
author | Revaz Nakhutsrishvili <r@revaz.xyz> | 2024-08-31 22:11:26 +0400 |
---|---|---|
committer | Revaz Nakhutsrishvili <r@revaz.xyz> | 2024-08-31 22:11:26 +0400 |
commit | 2373fe45ea2c0f1c11f03b558a9ba03ebefae127 (patch) | |
tree | 4f58c1de5de2fadd99da16f24eb22eaa63cb9a80 |
simple sway-bar
-rwxr-xr-x | bin/statusbar | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/statusbar b/bin/statusbar new file mode 100755 index 0000000..5d29e54 --- /dev/null +++ b/bin/statusbar @@ -0,0 +1,8 @@ +while true +do + cpu=$(top -bn1 | grep load | awk '{printf "%.2f\n", $(NF-2)}') + memory=$(free -m | awk 'NR==2{printf "%s/%sMB (%.2f%%)\n", $3,$2,$3*100/$2 }') + date=$(date +"%a %d/%m/%Y %H:%M") + echo "CPU: $cpu% | MEM: $memory | $date" + sleep 10 +done |