mirror of https://github.com/tiyn/dotfiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
300 B
16 lines
300 B
1 year ago
|
#!/bin/sh
|
||
|
|
||
|
icon="^b#282828^^c#dfdfdf^ ^d^"
|
||
|
|
||
|
temp=""
|
||
|
|
||
|
if command -v nvidia-smi > /dev/null; then
|
||
|
temp=$(nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader)
|
||
|
temp=$(printf %3s $(echo ${temp##*+} | sed "s/\..*//") | tr ' ' ' ')
|
||
1 year ago
|
else
|
||
|
echo ""
|
||
|
return
|
||
1 year ago
|
fi
|
||
|
|
||
|
echo "$icon $temp°C"
|