1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-09 19:11:15 +02:00

statusbar: padded percentages

This commit is contained in:
2023-10-17 05:18:46 +02:00
parent 256be15c0f
commit 0c6942bb7d
4 changed files with 22 additions and 12 deletions

View File

@@ -1,3 +1,5 @@
#!/bin/sh
free -h | awk '/^Mem:/ {print "^b#282828^^c#dfdfdf^  ^d^ " $3 "/" $2}'
icon="^b#282828^^c#dfdfdf^  ^d^ "
total=$(free -h | awk '/^Mem:/ {print $3/$2}')
echo "$icon$(printf %3s $(echo ${total##*0.} | cut -c1-2) | tr ' ' ' ')%"