summaryrefslogtreecommitdiff
path: root/ar/.local/bin/statusbar/sb-memory
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-01-11 05:20:33 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-01-11 05:20:33 +0900
commit13a9ed632e1ddea0135a5069d620a9451d0d6bd3 (patch)
tree254d2b664ba689987b84997fb5c5c0f5caf467ad /ar/.local/bin/statusbar/sb-memory
parent17c7070beb1d6c152e15b79dcf72ae4bffc8ce85 (diff)
updates
Diffstat (limited to 'ar/.local/bin/statusbar/sb-memory')
-rwxr-xr-xar/.local/bin/statusbar/sb-memory12
1 files changed, 9 insertions, 3 deletions
diff --git a/ar/.local/bin/statusbar/sb-memory b/ar/.local/bin/statusbar/sb-memory
index 5b06d29..01eb0e6 100755
--- a/ar/.local/bin/statusbar/sb-memory
+++ b/ar/.local/bin/statusbar/sb-memory
@@ -10,9 +10,15 @@ case $BLOCK_BUTTON in
esac
width=$(xrandr | grep "\*" | awk '{print $1}' | sed 's/x[0-9]*//g' | head -n1)
+nvme_temp=$(sensors 2>/dev/null |
+ awk '/Composite:/ {gsub(/[+°C]/,"",$2); print $2; exit}')
if [ -n "$width" ] && [ "$width" -eq "$width" ] 2>/dev/null; then
- [ "$width" -lt 1920 ] &&
- free --mebi | sed -n '2{p;q}' | awk '{printf ("šŸ%d%%\n", ($3/$2)*100+0.5 )}' ||
- free --mebi | sed -n '2{p;q}' | awk '{printf ("šŸ%dGB/%dGB", $3/1000+0.5,$2/1000+0.5)}'
+ if [ "$width" -lt 1920 ]; then
+ free --mebi | sed -n '2{p;q}' |
+ awk -v t="$nvme_temp" '{printf "šŸ’¾%s° šŸ%d%%\n", t, ($3/$2)*100+0.5}'
+ else
+ free --mebi | sed -n '2{p;q}' |
+ awk -v t="$nvme_temp" '{printf "šŸ’¾%s° šŸ%dGB/%dGB", t, $3/1000+0.5, $2/1000+0.5}'
+ fi
fi