Wattson
KDE4 Extensions
Score 64%
Description:

This is a plasmoid for viewing power used by laptop. Now configurable
Last changelog:

5 years ago

** Version 1.0 beta **
Using upower now.
Can accept format strings
No more ticks. Gets notified by upower
- Needs more testing
** Version 0.3 **
Handles dark themes.
** Version 0.2 **
Added confuguration for Device and Ticks

SalsaDoom

3 years ago

Like this plasmoid! But it seems to have a few display issues, running on KDE 4.12.4 at least. When in the panel, it is too short, and the text gets cut off. When as a desktop widget, it can only be a square of varying size -- which is a bit odd when it only has a line of text in the middle. Otherwise, its great :)

Report

AdaMin

5 years ago

Thank you!

Report

AdaMin

5 years ago

Hi!

Thank you for your work!

I would like to write ebuilds for your app, but i have some problems with it:

Could you please fix the "X-KDE-PluginInfo-Version" entries in the .desktop files?

Call the packages wattson-versionsnumber.xz ?

Add them here as an attachement instead of dropbox (if possible)?

--------------------------

Another thing (in the beta version): there is no place any more for the app in the taskbar. Especially if i would like to get the percentage also. Could you add an option to have a less detailed output like 10W 95%?

Thanks again and have a nice day!

Report

admiral0

5 years ago

Use format %wW %p%%

I'll migrate to github asap. In the meantime patch it in the ebuild.

Report

admiral0

5 years ago

oooh, i got it. I'll add extended formats in 1.1

Report

AdaMin

5 years ago

Hi!

Thank you for your work!

I would like to write ebuilds for your app, but i have some problems with it:

Could you please fix the "X-KDE-PluginInfo-Version" entries in the .desktop files?

Call the packages wattson-versionsnumber.xz ?

Add them here as an attachement instead of dropbox (if possible)?

--------------------------

Another thing (in the beta version): there is no place any more for the app in the taskbar. Especially if i would like to get the percentage also. Could you add an option to have a less detailed output like 10W 95%?

Thanks again and have a nice day!

Report

gravy

7 years ago

Nice way how to implement this and many other simple info is the applet Command Watch

http://kde-look.org/content/show.php/Command+Watch?content=84523

For example if you want to see the discharging power and temperature use this script

#!/bin/sh

T=`cat /proc/acpi/thermal_zone/THRM/temperature | awk '{print $2}'`

A=`cat /sys/class/power_supply/BAT1/current_now`
B=`cat /sys/class/power_supply/BAT1/voltage_now`
sleep 1
#echo $A $B
A=$A+`cat /sys/class/power_supply/BAT1/current_now`
B=$B+`cat /sys/class/power_supply/BAT1/voltage_now`
sleep 1
#echo $A $B
A=$A+`cat /sys/class/power_supply/BAT1/current_now`
B=$B+`cat /sys/class/power_supply/BAT1/voltage_now`
A=`echo $A | bc`
B=`echo $B | bc`
#echo $A $B

if cat /sys/class/power_supply/BAT1/status | grep Full > /dev/null
then C=""
else
if cat /proc/acpi/battery/BAT1/state | grep discharging > /dev/null
then C="-"
else C="+"
fi
fi
echo -e $T C \\t \\t $C`echo $A*$B/9000000000000 | bc ` W

Report

admiral0

7 years ago

Command Watch bothers [ba]sh, and that's not optimal for a laptop. Why do you think i didn't do a scripted plasmoid :) ?

Anyway, i'll consider adding Temperature info and coloured output.

Report

joth666

7 years ago

Some, I hope, useful hints in how to install the plasmoid (feel free to add them to the README file).

First, and most important, the local and system-wide
instructions are identical.

Systemwide should look like this:

cd /where/you/downloaded_the_archive
tar -xvf 126981-wattson.tar.bz2
cd wattson
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_BUILD_TYPE=release ../
make
sudo make install
kbuildsycoca4 --noincremental

Local like this:

cd /where/you/downloaded_the_archive
tar -xvf 126981-wattson.tar.bz2
cd wattson
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --localprefix` -DCMAKE_BUILD_TYPE=release ../
make
make install
kbuildsycoca4 --noincremental

That way it doesn't matter where KDE is installed (say /usr or /opt for example) or whether the directory is called .kde or .kde4.

Restarting plasma should not be necessary (wasn't for me). And in cases when it might be, it should be done like this:

kquitapp plasma-desktop in newer versions, 4.4 at least and possibly even 4.3 (can't remember), rather than kquitapp plasma (which, indeed, is what it should be like in 4.2)

Report

Blahord

7 years ago

I made a small change, so it will show the current consumption for all batteries. One number for each battery.

You can fint the changes here: http://linux-ecke.de/wattson_new.tar.gz

Report

admiral0

7 years ago

There are not only batteries there. There are also AC plugs...

I find it more useful to make BAT? choice intelligent and choose update time(currently @ 7secs)

Report

Blahord

7 years ago

It is your plasmoid. To whatever you like to do.

I made theese changes, because i do not have BAT1 (bu BAT0). So i made it more intelligent and shoe every battery.

Report

admiral0

7 years ago

You can also install system wide:

tar xzvf wattson*.tar.gz
cd wattson*
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
sudo make install
kbuildsycoca4

(restart plasma)

Report

lordlukas

7 years ago

In kubuntu the installation goes fine but then the plasmoid isn't there.

I think there are some problems with the address of the installed files

Report

admiral0

7 years ago

Did you try to restart plasma?
Could you do a "ls ~/.kde*"?

Report

lordlukas

7 years ago

yes I tried. Also your previous mail is wrong, because it assumes that kde directory is kde4. I did that and it created .kde4 Your README files states

cmake -DCMAKE_INSTALL_PREFIX=$KDEDIRS ..

that should be right, but again wattson doesn't appear into the plasmoids.

Report

admiral0

7 years ago

Did you verify that $KDEDIRS is set?
Delete .kde4 then.
Try with either $KDEDIR (unlikely) or ~/.kde

You have also eyes to see where is your kde conf dir in home :P

Report

lordlukas

7 years ago

yes, yes, yes.

And it isn't in the installed plasmoids, neither in .kde directory.

Report

lordlukas

7 years ago

system wide works, I suggest to change the README

Report

admiral0

7 years ago

tar xzvf wattson*.tar.gz
cd wattson*
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/.kde4/
make
make install
kbuildsycoca4

Report

5 years ago

** Version 1.0 beta **
Using upower now.
Can accept format strings
No more ticks. Gets notified by upower
- Needs more testing
** Version 0.3 **
Handles dark themes.
** Version 0.2 **
Added confuguration for Device and Ticks

File (click to download) Version Description Filetype Packagetype License Downloads Date Filesize OCS-Install DL
Details
version
1.0-beta
updated Nov 13 2011
added Jul 02 2010
downloads today
0
page views today 1