From 2373fe45ea2c0f1c11f03b558a9ba03ebefae127 Mon Sep 17 00:00:00 2001 From: Revaz Nakhutsrishvili Date: Sat, 31 Aug 2024 22:11:26 +0400 Subject: simple sway-bar --- bin/statusbar | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 bin/statusbar 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 -- cgit v1.2.3-70-g09d2