Originally Posted by
philinux
Question is how come udisks doesn't need sudo but hddtemp does. I'd be interested if anyone knows.
Don't know the answer to that one, but r-senior's answer, installing hddtemp with the SUID, allowing it to be run by regular users
is the way to use hddtemp with conky.
Then you can just use in conky...
Code:
${execpi 10 hddtemp -n /dev/sda}
To change color according to temperature you can also send it to a colorize script...
ColorTempHDD.sh
Code:
#!/bin/bash
# colorize.sh
# by: Crinos512
COOL=25
WARM=50
if [[ $1 < $COOL ]]
then echo "\${color7}"$1 # COOL
elif [[ $1 > $WARM ]]
then echo "\${color9}"$1 # HOT
else echo "\${color8}"$1 # WARM
fi
exit 0
Set your temp ranges.
Define color7, color8 and color9 in your conky config or change "color7" etc to a color in the script...eg "color FF0000" or "color red"
eg this is my conky line...
Code:
${execpi 10 hddtemp -n /dev/sda | xargs /home/glen/conky/ColorTemp/ColorTempHDD.sh}°C
You can use copies of the same script to colorize cpu and gpu temps.
Bookmarks