💾 Archived View for gemini.cyberbot.space › gemlog › aux › tmuxstatusscripts.gmi captured on 2024-02-05 at 09:51:23. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-03-01)
-=-=-=-=-=-=-
#!/bin/bash
IDLE=$(mpstat 1 1 | tail -n 1 | awk '{ print $11 }' | tail -n 1 | awk '{print ($0-int($0)<0.499)?int($0):int($0)+1}')
CPUU=$(expr 100 - $IDLE)
spark $CPUU 0 100 | cut -c -3
#!/bin/bash
total=$(free -m | awk '/^Mem/ {print $3}')
spark $total 0 1992 | cut -b -3
#!/bin/sh
percentage=$(cat /sys/class/power_supply/axp20x-battery/capacity)
status=$(cat /sys/class/power_supply/axp20x-battery/status)
bgauge=$(spark $percentage 0 100 | cut -c -3)
indicator=""
if
[ $status == "Charging" ]; then
echo $bgauge $indicator
else
echo $bgauge
fi