i wanted to share my cpu monitor dashboard widget
There is no need to install anything because the python script will do that for you.
You can change the temperature unit from °C to °F and the HTML will change the output automatically.
The cpu monitor widget adopts the theme when changes are made by hudiy.
Please do the first run with internet connection so the script can install missing python3 packages
I recommend to install all the hudi fonts system wide:
-Run these commands one after the other
Code: Select all
mkdir -p ~/.local/share/fonts
cp /home/pi/.hudiy/share/assets/fonts/*.ttf ~/.local/share/fonts/
fc-cache -fv-Edit the file: "/home/pi/.hudiy/share/config/dashboards.json"
-Add the following line to the file:
Code: Select all
{ "type": "web", "size": "medium_narrow", "url": "file:///home/pi/scripts/cpu_widget.html" },Code: Select all
{ "type": "web", "size": "medium_narrow", "url": "file:///home/pi/scripts/cpu_widget.html" }-Put the python file "can_widget.py" in the folder you like
-Set the correct permissions with shell
Code: Select all
sudo chmod +x can_widget.py-Run the script via command
Code: Select all
python3 cpu_widget.pyHow to autostart:
-Login into the shell
-Run the command
Code: Select all
crontab -e-Add the following line at the bottom (make sure to adjust the path if needed):
Code: Select all
@reboot /usr/bin/python3 /home/pi/scripts/cpu_widget.py