Difference between revisions of "KThinkBat"

From ThinkWiki
Jump to: navigation, search
Line 68: Line 68:
 
==Download==
 
==Download==
  
* [https://lepetitfou.dyndns.org/KThinkBat Download from the KThinkBat Site]
+
* [https://lepetitfou.dyndns.org/KThinkBat#Download Download from the KThinkBat Site]
  
 
[[Category:Tools]] [[Category:Gentoo]]
 
[[Category:Tools]] [[Category:Gentoo]]

Revision as of 01:17, 21 January 2006

Description

KThinkBat is a laptop battery monitor for the KDE-Kicker. It is inspired by the Windows Application "Battery Maximizer" which is included with ThinkPads.

On ThinkPads it uses the SMAPI BIOS through the tp_smapi driver. It shows you the current power consumption of the laptop and brings support for a second battery.

Homepage: https://lepetitfou.dyndns.org/KThinkBat

Author: Tobias Roeser

Latest Version (2006/01/19): 0.1.5_beta1

Screenshot

KThinkBat.png

Offline Mode: You see how much power left and how much is consumed at the moment.

KThinkBat ac.png

Online Mode: You see the loading-power.

Installation

KThinkBat uses the autotools. For a standard installation use

./configure
make
su -c 'make install'

Gentoo

You can use the the ebuild from this portage overlay, category/package: app-laptop/kthinkbat.

Patches

Here's a small patch that changes the color of the current power consumtion text to white ( for dark background). Furthermore it changes the battery gauge's size (looks nicer if you place the kicker vertical).

!! This patch is made for kthinkbat 0.1.4 !!

diff -ur kthinkbat.orig/src/kthinkbat.cpp kthinkbat/src/kthinkbat.cpp
--- kthinkbat.orig/src/kthinkbat.cpp    2005-12-15 22:54:28.000000000 +0100
+++ kthinkbat/src/kthinkbat.cpp 2005-12-15 23:32:10.000000000 +0100
@@ -101,7 +101,7 @@
 void KThinkBat::paintEvent(QPaintEvent* event)
 {
     // Werte fr Gauge und Rand
-    QSize gaugeFill(40, 18);
+    QSize gaugeFill(40, 14);
     QSize gHalfDot(4, 4);
     QSize offset(4, 4);

@@ -135,9 +135,10 @@
     painter.drawPolyline(border);

     // Prozent-Anzeige
-    painter.drawText( offset.width() + 12, offset.height() + gaugeFill.height() - 5, QString().number(batValue));
+    painter.drawText( offset.width() + 14, offset.height() + gaugeFill.height() - 2, QString().number(batValue));

     // aktueller Verbrauch in W
+    painter.setPen ( "white" );
     painter.drawText( offset.width(), offset.height() + gaugeFill.height() + 12, QString().number((mWH + 500)/1000) + " " + unity );

     painter.end();


Download