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,7 +1,12 @@
#!/bin/sh
icon="^b#282828^^c#dfdfdf^  ^d^ "
if [ "$1" = "amd" ]; then
sensors | awk '/Tctl/ {print "^b#282828^^c#dfdfdf^  ^d^ " $2}'
temp=$(sensors | awk '/Tctl/ {print $2}')
elif [ "$1" = "intel" ]; then
sensors | awk '/Core 0/ {print "^b#282828^^c#dfdfdf^  ^d^ " $3}'
temp=$(sensors | awk '/Tctl/ {print $3}')
fi
temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
echo "$icon$temp°C"