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

statusbar: added special case for inet

This commit is contained in:
2023-10-17 20:01:38 +02:00
parent c9eda035e8
commit 4e277ed808
2 changed files with 4 additions and 5 deletions

View File

@@ -2,4 +2,6 @@
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 ' ' ' ')%"
percent=${total##*0\.}
percent=$(printf %3s $(echo ${percent##*0} | cut -c1-2) | tr ' ' ' ')%
echo "$icon $percent"