Lithium Power Manager

System Software

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
Score 81%
Description:

Lithium is a power manager application that lives in the system tray. It is designed to be similar to KPowersave and guidance-power-manager.

REQUIREMENTS:
Cmake v2.4+
KDE 4.X

On (K)Ubuntu install:
libxss-dev
libxcb-dpms0-dev
kdebase-workspace-dev

On Gentoo:
libXScrnSaver
libxcb

INSTALLING:
Extract the tarball
$ cd li-0.1.1
$ cmake .
$ make
# make install


Last changelog:

10 years ago

v0.1.1:
* Added DPMS Support
* Added Presentation and Acoustic Power schemes
* Changed config dialog
* Added Battery details dialog when left clicking on the system tray icon.

Beno1

10 years ago

Would it be possible to somehow integrate PowerTop into this program? That would be great!

Report

Hamburger1984

10 years ago

Fist of all: great work!

Second: a request - could you incorporate some disk power management features? (goal: reducing spin down cycles for laptop-hdds)

http://en.opensuse.org/Disk_Power_Management

Thanks and keep up the good work!

Andreas

Report

manik

9 years ago

Are there going to be any updates? I find it more stable than the power devil so if you think about fixing the minor annoyances it would be better.
--manik

Report

google01103

10 years ago

For some reason I needed to kill the running app after it disappeared from my panel and the name "li" was not the most obvious one - please consider changing it to "lithiun"

Report

duanmaotu

10 years ago

good work!
one problem:
there's no idle action for selection, it only shows "no action". Did I miss some depencies?

Report

Rebelyouth

10 years ago

Hi ,

I compiled the new KDE 4 Power Management package “Lithium” for Kubuntu Hardy x86.

Visit me !!!

http://rebelyouth.wordpress.com

Report

google01103

10 years ago

and not lithium, bit confusing

Report

jaem

10 years ago

I've just tried it in Kubuntu, and I love it. Simple and clean, while making the important information and controls easily accessible. Way to go.

Report

explinux83

10 years ago

Very very good application; I love this application.

Regard

Report

friendly-demon

10 years ago

Excellent app. I just wanted to have said that. Also... if you ever plan on including translations, contact me if you need a dutch one. I'll be pleased to provide you one.

Report

chapter78

10 years ago

Excellent work! Is there a development source repository for this application?

Report

kevin79

10 years ago

I'm trying to install this but I keep getting errors during 'make'. I'm using Kubuntu 8.04, 64bit and KDE 4.1.

Quote:[ 16%] Generating ui_config.h
Generating lithium.moc
Scanning dependencies of target li
[ 33%] Building CXX object CMakeFiles/li.dir/li_automoc.o
[ 50%] Building CXX object CMakeFiles/li.dir/lithium.o
In file included from /home/kevin/plasmoids/li/lithium.cpp:46:
/home/kevin/plasmoids/li/lithium.h:24:40: error: solid/control/powermanager.h: No such file or directory
In file included from /home/kevin/plasmoids/li/lithium.cpp:48:
/home/kevin/plasmoids/li/powerscheme.h:129:7: warning: no newline at end of file
/home/kevin/plasmoids/li/lithium.cpp:330:40: error: kworkspace/kdisplaymanager.h: No such file or directory
/home/kevin/plasmoids/li/lithium.cpp:333:2: warning: #warning Replace this hack after KRunner is fixed
In file included from /home/kevin/plasmoids/li/lithium.cpp:46:
/home/kevin/plasmoids/li/lithium.h:26: error: ‘Solid::Control’ has not been declared
/home/kevin/plasmoids/li/lithium.h:26: error: ‘PowerManager’ is not a namespace-name
/home/kevin/plasmoids/li/lithium.h:26: error: expected namespace-name before ‘;’ token
/home/kevin/plasmoids/li/lithium.h:81: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.h:81: error: expected ‘,’ or ‘...’ before ‘method’
/home/kevin/plasmoids/li/lithium.h: In member function ‘int Lithium::brightness() const’:
/home/kevin/plasmoids/li/lithium.h:57: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.h: In member function ‘void Lithium::setBrightness(int)’:
/home/kevin/plasmoids/li/lithium.h:74: error: ‘PM’ has not been declared
In file included from /home/kevin/plasmoids/li/lithium.cpp:48:
/home/kevin/plasmoids/li/powerscheme.h: At global scope:
/home/kevin/plasmoids/li/powerscheme.h:27: error: ‘Solid::Control’ has not been declared
/home/kevin/plasmoids/li/powerscheme.h:27: error: ‘PowerManager’ is not a namespace-name
/home/kevin/plasmoids/li/powerscheme.h:27: error: expected namespace-name before ‘;’ token
/home/kevin/plasmoids/li/powerscheme.h:45: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/powerscheme.h:45: error: ISO C++ forbids declaration of ‘SuspendMethod’ with no type
/home/kevin/plasmoids/li/powerscheme.h:45: error: expected ‘;’ before ‘autoSuspendMethod’
/home/kevin/plasmoids/li/powerscheme.h:46: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/powerscheme.h:46: error: expected ‘,’ or ‘...’ before ‘method’
/home/kevin/plasmoids/li/powerscheme.h:110: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/powerscheme.h:110: error: ISO C++ forbids declaration of ‘CpuFreqPolicy’ with no type
/home/kevin/plasmoids/li/powerscheme.h:110: error: expected ‘;’ before ‘cpuFreqPolicy’
/home/kevin/plasmoids/li/powerscheme.h:111: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/powerscheme.h:111: error: expected ‘,’ or ‘...’ before ‘policy’
/home/kevin/plasmoids/li/powerscheme.h:121: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/powerscheme.h:121: error: ISO C++ forbids declaration of ‘CpuFreqPolicy’ with no type
/home/kevin/plasmoids/li/powerscheme.h:121: error: expected ‘;’ before ‘m_policy’
/home/kevin/plasmoids/li/powerscheme.h:122: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/powerscheme.h:122: error: ISO C++ forbids declaration of ‘SuspendMethod’ with no type
/home/kevin/plasmoids/li/powerscheme.h:122: error: expected ‘;’ before ‘m_suspendMethod’
/home/kevin/plasmoids/li/lithium.cpp: In constructor ‘PowerInfoTooltip::PowerInfoTooltip(QSystemTrayIcon*)’:
/home/kevin/plasmoids/li/lithium.cpp:67: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:67: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp: In member function ‘void PowerInfoTooltip::addBatteryInfo(QWidget*, QBoxLayout*)’:
/home/kevin/plasmoids/li/lithium.cpp:145: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:147: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:147: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:148: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp: In constructor ‘Lithium::Lithium(KAboutData*)’:
/home/kevin/plasmoids/li/lithium.cpp:245: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:245: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:246: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:247: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:248: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp: In member function ‘void Lithium::detectedActivity()’:
/home/kevin/plasmoids/li/lithium.cpp:316: warning: unused variable ‘scheme’
/home/kevin/plasmoids/li/lithium.cpp: In member function ‘void Lithium::checkIdle()’:
/home/kevin/plasmoids/li/lithium.cpp:378: error: ‘class PowerScheme’ has no member named ‘autoSuspendMethod’
/home/kevin/plasmoids/li/lithium.cpp:384: error: ‘class PowerScheme’ has no member named ‘autoSuspendMethod’
/home/kevin/plasmoids/li/lithium.cpp: In member function ‘void Lithium::initSchemes()’:
/home/kevin/plasmoids/li/lithium.cpp:422: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:423: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:423: error: expected `;' before ‘method’
/home/kevin/plasmoids/li/lithium.cpp:424: error: ‘method’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp:427: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:428: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:428: error: expected `;' before ‘policy’
/home/kevin/plasmoids/li/lithium.cpp:429: error: ‘policy’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp:442: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:443: error: expected type-specifier before ‘PM’
/home/kevin/plasmoids/li/lithium.cpp:443: error: expected `>' before ‘PM’
/home/kevin/plasmoids/li/lithium.cpp:443: error: expected `(' before ‘PM’
/home/kevin/plasmoids/li/lithium.cpp:443: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:443: error: expected `)' before ‘;’ token
/home/kevin/plasmoids/li/lithium.cpp:451: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:452: error: expected type-specifier before ‘PM’
/home/kevin/plasmoids/li/lithium.cpp:452: error: expected `>' before ‘PM’
/home/kevin/plasmoids/li/lithium.cpp:452: error: expected `(' before ‘PM’
/home/kevin/plasmoids/li/lithium.cpp:452: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:452: error: expected `)' before ‘;’ token
/home/kevin/plasmoids/li/lithium.cpp: In member function ‘void Lithium::initContextMenu()’:
/home/kevin/plasmoids/li/lithium.cpp:468: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:468: error: expected `;' before ‘sMethods’
/home/kevin/plasmoids/li/lithium.cpp:470: error: ‘PM’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp:470: error: template argument 1 is invalid
/home/kevin/plasmoids/li/lithium.cpp:470: error: invalid type in declaration before ‘;’ token
/home/kevin/plasmoids/li/lithium.cpp:471: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:472: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:473: error: ‘PM’ is not a class or namespace
/usr/include/qt4/QtCore/qglobal.h: At global scope:
/usr/include/qt4/QtCore/qglobal.h: In instantiation of ‘QForeachContainer<int>’:
/home/kevin/plasmoids/li/lithium.cpp:477: instantiated from here
/usr/include/qt4/QtCore/qglobal.h:1977: error: ‘int’ is not a class, struct, or union type
/usr/include/qt4/QtCore/qglobal.h:1977: error: ‘int’ is not a class, struct, or union type
/home/kevin/plasmoids/li/lithium.cpp: In member function ‘void Lithium::initContextMenu()’:
/home/kevin/plasmoids/li/lithium.cpp:477: error: ‘class QForeachContainer<int>’ has no member named ‘i’
/home/kevin/plasmoids/li/lithium.cpp:477: error: ‘class QForeachContainer<int>’ has no member named ‘e’
/home/kevin/plasmoids/li/lithium.cpp:477: error: ‘class QForeachContainer<int>’ has no member named ‘i’
/home/kevin/plasmoids/li/lithium.cpp:477: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:477: error: expected `;' before ‘method’
/home/kevin/plasmoids/li/lithium.cpp:478: error: ‘sMethods’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp:478: error: ‘method’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp:483: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:487: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:491: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:495: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:510: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:510: error: expected `;' before ‘current’
/home/kevin/plasmoids/li/lithium.cpp:511: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:511: error: expected `;' before ‘policies’
/home/kevin/plasmoids/li/lithium.cpp:513: error: ‘PM’ cannot appear in a constant-expression
/home/kevin/plasmoids/li/lithium.cpp:513: error: template argument 1 is invalid
/home/kevin/plasmoids/li/lithium.cpp:513: error: invalid type in declaration before ‘;’ token
/home/kevin/plasmoids/li/lithium.cpp:514: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:515: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:516: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:517: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:518: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:522: error: ‘class QForeachContainer<int>’ has no member named ‘i’
/home/kevin/plasmoids/li/lithium.cpp:522: error: ‘class QForeachContainer<int>’ has no member named ‘e’
/home/kevin/plasmoids/li/lithium.cpp:522: error: ‘class QForeachContainer<int>’ has no member named ‘i’
/home/kevin/plasmoids/li/lithium.cpp:522: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:522: error: expected `;' before ‘policy’
/home/kevin/plasmoids/li/lithium.cpp:523: error: ‘policies’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp:523: error: ‘policy’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp:528: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:531: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:534: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:537: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:540: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:543: error: ‘PM’ is not a class or namespace
/home/kevin/plasmoids/li/lithium.cpp:549: error: ‘current’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp: In member function ‘void Lithium::setCpuFreq(QAction*)’:
/home/kevin/plasmoids/li/lithium.cpp:604: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:604: error: expected `;' before ‘policy’
/home/kevin/plasmoids/li/lithium.cpp:605: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:605: error: ‘policy’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp: At global scope:
/home/kevin/plasmoids/li/lithium.cpp:602: warning: unused parameter ‘action’
/home/kevin/plasmoids/li/lithium.cpp: In member function ‘void Lithium::setPowerScheme(PowerScheme*)’:
/home/kevin/plasmoids/li/lithium.cpp:618: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:620: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:622: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:652: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:652: error: ‘class PowerScheme’ has no member named ‘cpuFreqPolicy’
/home/kevin/plasmoids/li/lithium.cpp:654: error: ‘class PowerScheme’ has no member named ‘cpuFreqPolicy’
/home/kevin/plasmoids/li/lithium.cpp: In member function ‘void Lithium::suspend(QAction*)’:
/home/kevin/plasmoids/li/lithium.cpp:663: error: ‘PM’ has not been declared
/home/kevin/plasmoids/li/lithium.cpp:663: error: expected `;' before ‘method’
/home/kevin/plasmoids/li/lithium.cpp:664: error: ‘method’ was not declared in this scope
/home/kevin/plasmoids/li/lithium.cpp: At global scope:
/home/kevin/plasmoids/li/lithium.cpp:661: warning: unused parameter ‘action’
/home/kevin/plasmoids/li/lithium.cpp:667: error: variable or field ‘suspend’ declared void
/home/kevin/plasmoids/li/lithium.cpp:667: error: ‘PM’ has not been declared
In file included from /home/kevin/plasmoids/li/lithium.cpp:983:
/usr/include/qt4/QtCore/qglobal.h: In constructor ‘QForeachContainer<T>::QForeachContainer(const T&) [with T = int]’:
/home/kevin/plasmoids/li/lithium.cpp:477: instantiated from here
/usr/include/qt4/QtCore/qglobal.h:1974: error: using invalid field ‘QForeachContainer<T>::i’
/usr/include/qt4/QtCore/qglobal.h:1974: error: request for member ‘begin’ in ‘((QForeachContainer<int>*)this)->QForeachContainer<int>::c’, which is of non-class type ‘const int’
/usr/include/qt4/QtCore/qglobal.h:1974: error: using invalid field ‘QForeachContainer<T>::e’
/usr/include/qt4/QtCore/qglobal.h:1974: error: request for member ‘end’ in ‘((QForeachContainer<int>*)this)->QForeachContainer<int>::c’, which is of non-class type ‘const int’
make[2]: *** [CMakeFiles/li.dir/lithium.o] Error 1
make[1]: *** [CMakeFiles/li.dir/all] Error 2
make: *** [all] Error 2

Report

C

dilettante

10 years ago

Kevin, install kdebase-workspace-dev in adept. This should solve your problem.

Report

Mar91

10 years ago

My pc isn't a laptop but lithium recognize that i have a battery. Maybe an hal problem? How can i check this?

Report

Fall

10 years ago

I've prepared PKGBUILD for Arch.
Get it at http://aur.archlinux.org/packages.php?ID=19054 or via yaourt.

Enjoy :-)

Report

f3lip3

10 years ago

I use Kubuntu, thanks.
I have a similar application, but in very aplha state, if you interesting see this link http://kde-apps.org/content/show.php/PowerManager?content=86544&PHPSESSID=fc1baacc336fd1ed36d9297d5cb9e844. Now I wanted to make a plasmoid for my application.

Report

C

dilettante

10 years ago

Hmm... You'll need a dataengine for that. I suggest you use kde4powersave as your starting point if you want to make a plasmoid. :) Try svn co svn://anonsvn.kde.org/home/kde/trunk/playground/utils/kde4powersave

Report

f3lip3

10 years ago

The error is:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
X11_Xscreensaver_LIB (ADVANCED)

Maybe X11_Xscreensaver_LIB should be written in uppercase? I try this and cmake works but make show me this error:

CMakeFiles/li.dir/lithium.o: In function `Lithium::checkIdle()':
/home/f3lip3/apps/li/lithium.cpp:347: undefined reference to `XScreenSaverAllocInfo'
/home/f3lip3/apps/li/lithium.cpp:348: undefined reference to `XScreenSaverQueryInfo'
collect2: ld returned 1 exit status
make[2]: *** [li] Error 1
make[1]: *** [CMakeFiles/li.dir/all] Error 2
make: *** [all] Error 2

I try to add #include <X11/extensions/scrnsaver.h> but I got many errors.

Report

C

dilettante

10 years ago

Do you by any chance of a libXss.so in /usr/lib, /usr/X11R6/lib or any other library directory?

On Gentoo this is provided by libXScrnSaver. I'm looking for the corresponding debian package. What distro are you using?

Report

C

dilettante

10 years ago

Try installing libxss-dev if you are on Ubuntu (and I'm guessing on plain Debian as well). Not sure what rpm provides it for Mandriva, Fedora and openSuse though.

Report

KopfEnton

10 years ago

thank you so much :')

Report

C

dilettante

10 years ago

Haha:) No prob man :D Still got a lot of work to do on it though

Report

10 years ago

v0.1.1:
* Added DPMS Support
* Added Presentation and Acoustic Power schemes
* Changed config dialog
* Added Battery details dialog when left clicking on the system tray icon.

product-maker 10 61

File (click to download) Version Description PackagetypeArchitecture Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
0.1.1
updated Aug 17 2008
added Aug 11 2008
downloads today
0
page views today 2
System Tags app software