-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Apps
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login


Sponsoring


-
- Content .- Fans  .- Knowledge Base  . 

KTemperature

   1.9  

KDE Logging/Monitoring

Score 82%
KTemperature
zoom


KTemperature
zoom


KTemperature
zoom


Link:  Link
Minimum required   KDE 3.3.x
Downloads:  8799
Submitted:  May 27 2005
Updated:  Oct 10 2005

Description:

KTemperature is an application to monitor the system temperature. I was motivated to develop this utility because I could not find a simple system tray resident application for monitoring the system temperature using the ACPI interface.

The application obtains the system temperature from the file /proc/acpi/thermal_zone/THRM/temperature .

I have been using Linux and Open Source for quite sometime and this is my first contribution. I hope this will lead to
many more contributions from me.

SuSE 9.2 rpm for the i686 platform is available for download.
The available rpm also works for SuSE 9.3.
The rpm available for download can be installed on SuSE 10.0 as well.




Changelog:

Version 1.1
Added check for the presence of /proc/acpi/thermal_zone/THRM/temperature file. If the file is not present the temperature will be displayed as NA.

Version 1.2
Corrected typo.
Visual representation of the "hotness" of the system.
The system maximum temperature can be provided as an input. The system tray icon will change redness depending on the ratio of provided maximum temperature to the current temperature.

Version 1.3
Configurable temperature monitoring interface, can be anything as long as the temperature can be obtained by doing a read operation on the file.
Stored configuration. The configuration is stored in $HOME/.ktemperatue and read on startup.
Increased sensitivity of redness to temperature changes.

Version 1.4
Auto adjusting text font. The color of the text adjusts to a compliment of the background color, This ensures that the text is clearly visible irrespective of the redness of the systray icon.
More prominent text. The text is bold faced and the font of the text is bigger.

Version 1.5
Changes of parameters (polling interval and max, temperature) take instantaneous effect without having to restart the application.
Boundary values cases of redness, the calculation of redness difference between the background and the foreground has been modified to ensure a minimum difference.
Text alignment, the temperature text will be aligned in the middle both vertically and horizontally.

Version 1.6
Auto loading of the neccessary ACPI thermal module and its dependencies if, required. The root password is checked prior to loading the modules.
Detection of two variants of the thermal interface, namely
/proc/acpi/thermal_zone/THRM and
/proc/acpi/thermal_zone/THM

Version 1.7
The ACPI thermal interface was being detected by searching the /proc/modules file. However, that approach will lead to an irritating request for root password in cases where the module in compiled into the kernel. The thermal interface detection has been modified to take care of the above case.

Version 1.8
Added Pause, Restart and Update options in the right click menu for more control of polling.
Cleaned the auto detection of ACPI thermal interface. The first file in the thermal_zone directory(other than .. and .)is taken as the temperature file.
Fixed the width of the main window to be always greater than the width of widest child window.

Version 1.9
Changed the implementation of 'redness' from RGB space to HSV space for greater sensitivity.
The background color changes from green at minimum temperature to red at maximum temperature.
The text is always constant and will have a clear contrast all temperatures.
Replace memcpy with strcpy in monitor interface selection.
Interface(s) selected in the drop down list will be honoured when the Set button is clicked after the selection.
Used grid layout for the main widget.

Version 1.9-1
Created archive to include version information.
Added keyboard shortcuts to right click menu options.
Added caption to root password dialog.

I would like to acknowledge the suggestions that I have received. The changes have been made taking into account these suggestions.




LicenseGPL
(Source for KTemperature 1.9-1)
(i686 rpm for SuSE 9.2, 9.3 and SuSE 10.0)
Send to a friend
Subscribe
Other  Apps  from avasaralak
Report inappropriate content



goto page: prev   1  2  3  4 

-

 suggestions

 
 by blilly on: Jun 2 2005
 
Score 50%

1. change text color for good contrast with the background. Dark text on a dark background isn't very legible

2. maybe add graphing capability (e.g. like knemo has)


Reply to this

-
.

 Re: suggestions

 
 by avasaralak on: Jun 3 2005
 
Score 50%

Since the background color of the system tray changes depending on the system temperature, I think there is no one color that will be consistently visible all the time. However, I will try to make the text bolder.


Reply to this

-

 more suggestions

 
 by blilly on: Jun 6 2005
 
Score 50%

Thanks for listening.

However, there's still a problem: consider what happens when (under defaults) the temperature is 52 C.
red = 123, green = blue = 132. Text
is R=132, G=B=123; very low contrast.
Ideally, you'd want to work in HSV,
with complementary hue, similar saturation, and widely different value.

Also, now the text is too big; it's clipped after the first digit.

And one more issue is that changes made in the dialog box don;t take effect until ktemperature is quit and restarted.

A quick hack for the first two issues (black text on light background, white on dark) and a fix for the third is:

*** src/ktemperaturewidget.cpp.original Mon Jun 6 13:56:17 2005
--- src/ktemperaturewidget.cpp Mon Jun 6 14:17:11 2005
***************
*** 87,92 ****
--- 87,94 ----
{
fprintf(configFilePtr,"%d %d %s",pollIntreval,maxSysTemperature,monitorInterface);
fclose(configFilePtr);
+ rednessStep = 255.0/(maxSysTemperature - 35.0);
+ pollTimer->start( pollIntreval * 1000 );
}
hide();
}
***************
*** 106,112 ****
FILE* temperatureFile;
QColor sysTrayColor,textColor;
char temperatureString[32];
! int red,blue,green;

//temperatureFile = fopen("/proc/acpi/thermal_zone/THRM/temperature","r");
temperatureFile = fopen(monitorInterface,"r");
--- 108,114 ----
FILE* temperatureFile;
QColor sysTrayColor,textColor;
char temperatureString[32];
! int red,blue,green, v;

//temperatureFile = fopen("/proc/acpi/thermal_zone/THRM/temperature","r");
temperatureFile = fopen(monitorInterface,"r");
***************
*** 132,138 ****
blue = 255 - red;

sysTrayColor.setRgb(red,blue,green);
! textColor.setRgb(255 - red,255 - green,255 - blue);
trayObject->setPaletteBackgroundColor (sysTrayColor);
trayObject->setPaletteForegroundColor(textColor);
trayObject->repaint();
--- 134,144 ----
blue = 255 - red;

sysTrayColor.setRgb(red,blue,green);
! v = (red * 29 + green * 59 + blue * 11) / 100;
! if (v >=128)
! textColor.setRgb(0,0,0);
! else
! textColor.setRgb(255,255,255);
trayObject->setPaletteBackgroundColor (sysTrayColor);
trayObject->setPaletteForegroundColor(textColor);
trayObject->repaint();
*** src/main.cpp.original Mon Jun 6 14:11:04 2005
--- src/main.cpp Mon Jun 6 14:12:38 2005
***************
*** 48,54 ****
KApplication app;
KTemperatureWidget *mainWin = 0;
KSystemTray *systemTray = 0;
! QFont sysTrayFont("Times New Roman", 20, QFont::Bold);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

/// @todo do something with the command line args here
--- 48,54 ----
KApplication app;
KTemperatureWidget *mainWin = 0;
KSystemTray *systemTray = 0;
! QFont sysTrayFont("Times New Roman", 16, QFont::Bold);
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

/// @todo do something with the command line args here


Reply to this

-
.

 Re: more suggestions

 
 by avasaralak on: Jun 6 2005
 
Score 50%

Good catch. I overlooked the case since my laptop runs quite hot (always around 60), hence everything was ok for me. Will quite certainly incorporate the changes.


Reply to this

-

 very nice

 
 by rickvernam on: Jun 19 2005
 
Score 50%

first, this is very complimentary to my laptop, it is a portable space heater as much as it is a laptop!

Anyway...an option in the right-click menu to 'update now' would be nice.


Reply to this

-

 Re: very nice

 
 by avasaralak on: Jun 22 2005
 
Score 50%

Added Pause, Restart and Update options to the right click menu.


Reply to this

-

 bugs

 
 by blilly on: Jun 22 2005
 
Score 50%

1 when changing file source, the string isn't properly terminated. Patch:
*** src/ktemperaturewidget.cpp.orig Wed Jun 22 09:47:29 2005
--- src/ktemperaturewidget.cpp Wed Jun 22 09:47:37 2005
***************
*** 191,197 ****

void KTemperatureWidget::monitorInterfaceSelect_urlSelected(const QString& selectedInterface)
{
! memcpy(monitorInterface, selectedInterface.ascii(), selectedInterface.length());
}

/*!
--- 191,197 ----

void KTemperatureWidget::monitorInterfaceSelect_urlSelected(const QString& selectedInterface)
{
! memcpy(monitorInterface, selectedInterface.ascii(), selectedInterface.length()+1);
}

/*!

2. The right side of the "Open file dialog" button still seems to be cut off.

3. when changing file source, changes from the pull-down menu don't take effect. The open file dialog has to be used every time

4. Contrast is still very low ca. 48 C.
This probably can't be fixed satisfactorily in RGB space. I'll post a separate set of suggested patches to handle this issue in HSV space.


Reply to this

-

 improved contrast

 
 by blilly on: Jun 22 2005
 
Score 50%

The following patch changes the background color from low-saturation green at 37 C through yellow and orange to fully-saturated red at the maximum temperature (which can;t be set lower than 38 C to avoid divide-by-zero errors); below 37 C, the color becomes a progrssively more saturated blue.
Text is set for good contrast with the background.

(don't blame me for kde-apps.org screw-ups of patch text)

*** src/ktemperaturewidgetbase.ui.orig Wed Jun 22 11:04:29 2005
--- src/ktemperaturewidgetbase.ui Wed Jun 22 11:08:24 2005
***************
*** 126,132 ****
70


! 0


80
--- 126,132 ----
70


! 38


80
*** src/ktemperaturewidget.cpp.orig Wed Jun 22 10:47:44 2005
--- src/ktemperaturewidget.cpp Wed Jun 22 11:17:45 2005
***************
*** 91,97 ****
fclose(configFilePtr);
}
monitorInterfaceSelect->setProperty("url", monitorInterface);
- rednessStep = 255.0/(maxSysTemperature - 35.0);
pollTimer = new QTimer( this );
connect( pollTimer, SIGNAL(timeout()),this, SLOT(checkTemperature()));
pollTimer->start( pollIntreval * 1000 );
--- 91,96 ----
***************
*** 116,122 ****
pollTimer->start( pollIntreval * 1000 );

maxSysTemperature = sysMaxTempInput->value();
- rednessStep = 255.0/(maxSysTemperature - 35.0);

configFilePtr = fopen(configFile,"w");
if(configFilePtr == NULL)
--- 115,120 ----
***************
*** 141,148 ****
FILE* temperatureFile;
QColor sysTrayColor,textColor;
char temperatureString[32];
! int bgRed,fgRed;
!
//temperatureFile = fopen("/proc/acpi/thermal_zone/THRM/temperature","r");
temperatureFile = fopen(monitorInterface,"r");
if(temperatureFile == NULL)
--- 139,147 ----
FILE* temperatureFile;
QColor sysTrayColor,textColor;
char temperatureString[32];
! int temperature, hue, saturation, value, green_temp;
!
! green_temp = sysMaxTempInput->minValue() - 1;
//temperatureFile = fopen("/proc/acpi/thermal_zone/THRM/temperature","r");
temperatureFile = fopen(monitorInterface,"r");
if(temperatureFile == NULL)
***************
*** 154,178 ****
fscanf(temperatureFile,"%s",temperatureString);
fclose(temperatureFile);

! bgRed = (int)((atoi(temperatureString) - 35.0) * rednessStep);
! if(bgRed < 0)
! {
! bgRed = 0;
! }
! if(bgRed > 255)
! {
! bgRed = 255;
! }
!
! fgRed = 255 - bgRed;
!
! if((bgRed - fgRed) < 100)
! {
! fgRed = bgRed - 100;
! }
!
! sysTrayColor.setRgb(bgRed,255 - bgRed,255 - bgRed);
! textColor.setRgb(fgRed,255 - fgRed,255 - fgRed);
trayObject->setPaletteBackgroundColor (sysTrayColor);
trayObject->setPaletteForegroundColor(textColor);
trayObject->repaint();
--- 153,178 ----
fscanf(temperatureFile,"%s",temperatureString);
fclose(temperatureFile);

! temperature = atoi(temperatureString);
! hue = (maxSysTemperature - temperature) * 120 / (maxSysTemperature - green_temp); /* green at green_temp, red at maxSysTemperature */
! if (hue < 0)
! hue = 0; /* red */
! if (hue > 240)
! hue = 240; /* blue */
! #define MINSAT 100
! saturation = MINSAT + abs((255 - MINSAT) * (temperature - green_temp) / (maxSysTemperature - green_temp)); /* minimum at green_temp, fully saturated at maxSysTemperature */
! if (saturation > 255)
! saturation = 255;
! if (saturation < MINSAT)
! saturation = MINSAT;
!
! sysTrayColor.setHsv(hue,saturation,255);
! if (hue 127? 0: 255);
trayObject->setPaletteBackgroundColor (sysTrayColor);
trayObject->setPaletteForegroundColor(textColor);
trayObject->repaint();


Reply to this

-
.

 configure: error

 
 by maxxrad on: Jun 24 2005
 
Score 50%

I am getting the following error while compiling:

configure: error: We need a working libXext to proceed.

I had to execute the following to get it this far:

[root@lypo ktemperature]# ./configure --x-includes=/usr/X11R6/include/ --x-libraries=/usr/X11R6/lib/

how do I get it to find the libXext?? It is installed.
I am running Fedora Core 4

thanks


Don Dupy
Reply to this

-

 Re: configure: error

 
 by avasaralak on: Jun 24 2005
 
Score 50%

Do you libXext.so or libXext.so.* ? If you do not have libXext.so, can you try creating a link libXext.so to libXext.so.* ?


Reply to this

-
.

 Re: Re: configure: e

 
 by maxxrad on: Jun 24 2005
 
Score 50%

In my /usr/X11R6/lib I have a libXext.so.6.4 and a link to it that is libXext.so.6. Do I need to make just a libXext.so and link it to libXext.so.6?


Don
Reply to this

-

 Re: Re: Re: configur

 
 by avasaralak on: Jun 24 2005
 
Score 50%

Try ln -s libXext.so.6 libXext.so.


Reply to this

-
.

 Re: conf

 
 by maxxrad on: Jun 25 2005
 
Score 50%

that didn't work.
any other ideas?


Reply to this

-

 Re: Re: conf

 
 by avasaralak on: Jun 26 2005
 
Score 50%

Actually I have 2 links to libXext.so.6.4 namely
libXext.so and libXext.so.6
I tried configure removing each link and it failed after I removed the link from libXext.so.6 to libXext.so.6.4 complaining about kde-config returning a null path to kdelibs.
Do you kde-config insatlled ?


Reply to this

-
.

 Version numbers

 
 by vadimt on: Jun 26 2005
 
Score 50%

Please add version numbers to your source archives. The way it currently is complicates the creation of packages in some distributions.

For instance, Gentoo keeps md5 sums of the tar.gz files, and will refuse to install if it changes, which will happen when you release a new version.

Please name your archives like this:
ktemperature-1.9.tar.gz

And make sure you never change a file once released, as it will cause problems.

The archive should decompress into a directory that also includes the version number.

Once you do this, I will contribute a Gentoo ebuild and submit it to the Gentoo bug tracker.


Reply to this

-

 Re: Version numbers

 
 by avasaralak on: Jun 26 2005
 
Score 50%

Thank you for the suggestion. Henceforth I will upload with the version number.


Reply to this

goto page: prev   1  2  3  4 

Add commentBack






-
-
How do you like Plasma 5?
 The best KDE Desktop ever.
 Definitely a nice improvement.
 Not decided yet. Haven't tried it yet.
 I do not like some of the changes.
 KDE is taking the wrong way.
 I am still sticking with KDE 3.5.
 I have no opinion, but wanted to vote anyway.

resultmore
 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
Events RSS   

Participate
Groups
Forum
Add App
Public API
About KDE-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2003-2014 KDE-Apps.org Team  
All rights reserved. KDE-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.