PS: This plasmoid is written in python and I simply never programmed in python before this, so there should be a lot of possibilities to improve the source code, fell free to send patchs.
Finally a sensible usable temp widget.
Just one blemish. It reads: 52.000. How can I get rid of the ".000" part? It unnecessarily waste space, more so in my vertical panel forcing me to enlarge.
If you can add CPU and memory usage as well in the same way and give an option to align them verticall for vertical panels, I'll go find and kiss you (on the cheek, that is)!
Solved it by some googling; for other noobs like me:
Open the cputemp.py file inside this folder:
/home/YOUR_USERNAME/.kde/share/apps/plasma/plasmoids/cputemp/contents/code/
Then change the line
sensor = commands.getoutput("sensors -u | grep temp1")
to
sensor = commands.getoutput('sensors -u | grep temp1 | cut --delim="." -f 1')
Now instead of 51.000 ℃, you get 51 ℃.
You can manipulate the ℃ part as well on this line:
self.label.setText(sensor[start:end] + ' ' + chr(176) +'C')
For example, if you change it to
self.label.setText(sensor[start:end] + ' ' +chr(176))
you get 51° instead of 51 ℃.
For mutlicore system, it might be nice to show the average temperature of both cores in the panel, and show a popup with the temperature of the individual cores when you click on it
Installed it, but it didn't work. Then I released that it requires lm_sensors to be installed, so I installed that. Now when I install the plasmoid its kinda half-working - I get the "Degrees C" bit showing, but not the number for the actual temperature. Any ideas?
(Fedora 13 32-bit, KDE 4.5.2)
Ratings & Comments
10 Comments
Finally a sensible usable temp widget. Just one blemish. It reads: 52.000. How can I get rid of the ".000" part? It unnecessarily waste space, more so in my vertical panel forcing me to enlarge. If you can add CPU and memory usage as well in the same way and give an option to align them verticall for vertical panels, I'll go find and kiss you (on the cheek, that is)!
Solved it by some googling; for other noobs like me: Open the cputemp.py file inside this folder: /home/YOUR_USERNAME/.kde/share/apps/plasma/plasmoids/cputemp/contents/code/ Then change the line sensor = commands.getoutput("sensors -u | grep temp1") to sensor = commands.getoutput('sensors -u | grep temp1 | cut --delim="." -f 1') Now instead of 51.000 ℃, you get 51 ℃. You can manipulate the ℃ part as well on this line: self.label.setText(sensor[start:end] + ' ' + chr(176) +'C') For example, if you change it to self.label.setText(sensor[start:end] + ' ' +chr(176)) you get 51° instead of 51 ℃.
For mutlicore system, it might be nice to show the average temperature of both cores in the panel, and show a popup with the temperature of the individual cores when you click on it
Hello, can you give me the output of $ sensors and $ sensors -u so i can try implement something like that thanks
sensors: Quote:k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp: +42.0 C
Core1 Temp: +35.0 C
sensors -u:
Quote:k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:
temp1_input: 41.00
Core1 Temp:
temp3_input: 32.00
Installed it, but it didn't work. Then I released that it requires lm_sensors to be installed, so I installed that. Now when I install the plasmoid its kinda half-working - I get the "Degrees C" bit showing, but not the number for the actual temperature. Any ideas? (Fedora 13 32-bit, KDE 4.5.2)
Hello, can you run in the terminal this: $ sensors and paste here the output? Thanks
Hi, OK, here goes :-) [ian@COOLERMASTER ~]$ sensors atk0110-acpi-0 Adapter: ACPI interface Vcore Voltage: +1.05 V (min = +0.85 V, max = +1.60 V) +3.3 Voltage: +3.30 V (min = +2.97 V, max = +3.63 V) +5 Voltage: +5.02 V (min = +4.50 V, max = +5.50 V) +12 Voltage: +11.93 V (min = +10.20 V, max = +13.80 V) CPU FAN Speed: 888 RPM (min = 600 RPM) CHASSIS1 FAN Speed:1278 RPM (min = 600 RPM) CHASSIS2 FAN Speed:1231 RPM (min = 600 RPM) CHASSIS3 FAN Speed:1205 RPM (min = 800 RPM) CPU Temperature: +28.0°C (high = +60.0°C, crit = +95.0°C) MB Temperature: +23.0°C (high = +45.0°C, crit = +95.0°C) [ian@COOLERMASTER ~]$
Hello itsjustarumour2, I have just updated the plasmoid, can you test it and reply if it works or not? Thanks!
Hi Sezaru, Yes, new version 0.2 is working perfectly! Thanks for all your hard work. Best, itsjustarumour2