Source i (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
Become a Fan
5.7

Description:
Amarok script for suspend, hibernate, shutdown KDE4 and pausing, stopping or closing Amarok according to playlist settings or elapsed time.
This script is based on the "Sleepy" script 0.9.3 by Thomas Coopman (http://kde-apps.org/content/show.php/sleepy+%28shutdown+script%29?content=113946).
It was edited for usage on KDE4 with qdbus (without HAL). The GUI was slightly reworked (see the screenshot). Besides the translations were removed.

Ratings & Comments

2 Comments

ilpianista

Thanks! ...but why you didn't submit your patches to the original sleepy?

KNCH

You're welcome! Well, I haven't done it because it was only changed for using without HAL, that isn't a real need for everyone who uses the script. And the GUI was changed (just a little bit though), that also wouldn't be useful for everyone. Here is the patch for "action.js" for using the script without HAL: Quote:

--- sleepy/action.js 2011-06-21 16:55:44.711041919 +0200 +++ sleepyKNCH/action.js 2011-06-21 03:58:55.242503560 +0200 @@ -12,6 +12,8 @@ // //You should have received a copy of the GNU General Public License //along with Amarok. If not, see <http://www.gnu.org/licenses/>. +// +// edited by KNCH Importer.loadQtBinding( "qt.core" ); @@ -22,22 +24,22 @@ this.execute = execute; this.pause = pause; this.stop = stop; - this.quit = quit; - this.turnOffScreen = turnOffScreen; + this.quit = quit; + this.turnOffScreen = turnOffScreen; } function suspend() { - var suspend = "qdbus --system org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend 1"; + var suspend = "qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend"; this.execute(suspend); } function hibernate() { - var hibernate = "qdbus --system org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate"; + var hibernate = "qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Hibernate"; this.execute(hibernate); } function shutdown() { - var shutdown = "qdbus --system org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown"; + var shutdown = "qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 1 2 2"; this.execute(shutdown); }

Pling
0 Affiliates
Details
license
version 0.1
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

Other Amarok 1.x Scripts:

Gnome Play Video in Totem
mwheatland
last update date: 19 years ago

Score 5.0

editLyrics-gnome
ZeeD
last update date: 19 years ago

Score 5.0

amarok Alarm
aroth
last update date: 16 years ago

Score 5.0

amaroK Web Collection V xmms
pti-jean
last update date: 16 years ago

Score 5.0

SongLogger
lucatnt
last update date: 17 years ago

Score 5.0

amaroK Web Collection
pti-jean
last update date: 16 years ago

Score 5.0



System Tags