
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
Sleep script like the old Nightingale. At the moment sleepy supports suspend, hibernate, shutdown and stopping amarok.
Also supports to turn off the screen when enabled. This option will lock the screen and turn it off after 10 seconds.
10 years ago
0.9.3
Added dutch and czech translations
0.9.2
Made translations possible and added french translation
0.9.1
Fixed some typos (thanks bashlnx!)
0.9
- Use Hal now to suspend, hibernate and shutdown. This means (hopefully) that sleepy also works for users who don't have a full kde installation.
- Added the option to quit Amarok.
- There are 2 categories of actions now: General and Amarok actions, both can be set independly.
0.8.2
fixed the pause function before shutting down.
0.8.1
fixed a bug in turn the screen off.
0.8
added the option to turn off the screen.
0.7.1
support for stopping amarok
custom messages for each action
0.7
support for shutdown
0.6
support for suspend and hibernate
triggers are: time based, songs played, play stopped.
10 years ago
0.9.3
Added dutch and czech translations
0.9.2
Made translations possible and added french translation
0.9.1
Fixed some typos (thanks bashlnx!)
0.9
- Use Hal now to suspend, hibernate and shutdown. This means (hopefully) that sleepy also works for users who don't have a full kde installation.
- Added the option to quit Amarok.
- There are 2 categories of actions now: General and Amarok actions, both can be set independly.
0.8.2
fixed the pause function before shutting down.
0.8.1
fixed a bug in turn the screen off.
0.8
added the option to turn off the screen.
0.7.1
support for stopping amarok
custom messages for each action
0.7
support for shutdown
0.6
support for suspend and hibernate
triggers are: time based, songs played, play stopped.
evilblade
6 years ago
Report
poomerang
9 years ago
are you still mantaining this script?
It should be updated as hal is getting deprecated: it's no more in use in KDE 4.6 (so for instance Kubuntu 11.04 doesn't install hal) in Gnome and in Xfce 4.8.
Major distributions are planning to drop or have already dropped it (see http://wiki.debian.org/HALRemoval https://wiki.ubuntu.com/Halsectomy http://fedoraproject.org/wiki/Features/HalRemoval)
ConsoleKit might be a replacement but i'm not quite sure
Greetings, and thanks for the script anyways!
Report
poomerang
9 years ago
no clues about suspend/hibernate though
Report
poomerang
9 years ago
Report
poomerang
9 years ago
--- action.js 2010-08-23 16:25:33.000000000 +0200
+++ action2.js 2011-09-15 12:19:23.932470146 +0200
@@ -27,17 +27,17 @@
}
function suspend() {
- var suspend = "qdbus --system org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend 1";
+ var suspend = "qdbus --system org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.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 --system org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.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 --system org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop";
this.execute(shutdown);
}
check to have consolekit and upower installed in order for this to work (this should be default in all "modern" distros)
cheers
Report
pamputt
11 years ago
Report
tmske
11 years ago
Report
pamputt
11 years ago
Report
tmske
11 years ago
Report
martosurf
10 years ago
Report
tmske
10 years ago
Report
tmske
10 years ago
Report
martosurf
10 years ago
Report
ilpianista
11 years ago
thanks
Report
ilpianista
11 years ago
--- sleepy/action.js~ 2009-10-18 14:09:24.000000000 +0200
+++ sleepy/action.js 2009-10-21 02:21:18.214389001 +0200
@@ -58,6 +58,7 @@
this.suspend = suspend;
this.hibernate = hibernate;
this.shutdown = shutdown;
+ this.stop = stop;
this.execute = execute;
}
@@ -76,6 +77,11 @@
this.execute(shutdown);
}
+function stop(p) {
+ var stop = "Amarok.Engine.Stop(true)";
+ this.execute(stop);
+}
+
function execute(p) {
//print("execute:::");
//print(p);
--- sleepy/gui.js~ 2009-10-18 14:06:54.000000000 +0200
+++ sleepy/gui.js 2009-10-21 02:23:58.954369985 +0200
@@ -80,7 +80,11 @@
if (this.dialog.actionBox.action.currentIndex == 1) {
a = function() {x.action.hibernate();};
} else {
- a = function() {x.action.shutdown();};
+ if (this.dialog.actionBox.action.currentIndex == 2) {
+ a = function() {x.action.shutdown();};
+ } else {
+ a = function() {x.action.stop();};
+ }
}
}
this.track.setAction(a);
--- sleepy/gui.ui~ 2009-10-18 14:06:12.000000000 +0200
+++ sleepy/gui.ui 2009-10-21 02:16:29.954417689 +0200
@@ -215,6 +215,11 @@
<string>Shutdown</string>
</property>
</item>
+ <item>
+ <property name="text">
+ <string>Amarok Stop</string>
+ </property>
+ </item>
</widget>
</widget>
<widget class="QLabel" name="infoDisabled">
Report
tmske
11 years ago
I also added custom messages for each action.
If you have other requests you can always ask them and I'll see what I can do.
Report
ilpianista
11 years ago
Report