summaryrefslogtreecommitdiffstats
path: root/kde/post-install/powerdevil/10-enable-suspend.rules
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-04-20 11:16:32 +0200
committer Eric Hameleers <alien@slackware.com>2016-04-20 11:16:32 +0200
commit2a3de09e19fda931b0209fe3f746390f898c5942 (patch)
treee3feac77e0799226dc65cede5c5b15f358483e69 /kde/post-install/powerdevil/10-enable-suspend.rules
parent65bf108b02f76e0e7d3240457058fa8e8cb5afa9 (diff)
downloadktown-2a3de09e19fda931b0209fe3f746390f898c5942.tar.gz
ktown-2a3de09e19fda931b0209fe3f746390f898c5942.tar.xz
Powerdevil needs a new polkit rules file to bring back suspend/hibernate.
Diffstat (limited to '')
-rw-r--r--kde/post-install/powerdevil/10-enable-suspend.rules10
1 files changed, 10 insertions, 0 deletions
diff --git a/kde/post-install/powerdevil/10-enable-suspend.rules b/kde/post-install/powerdevil/10-enable-suspend.rules
new file mode 100644
index 0000000..5ef58ac
--- /dev/null
+++ b/kde/post-install/powerdevil/10-enable-suspend.rules
@@ -0,0 +1,10 @@
+polkit.addRule(
+ function(action, subject) {
+ if ((action.id == "org.freedesktop.upower.suspend" ||
+ action.id == "org.freedesktop.upower.hibernate") &&
+ subject.isInGroup("power"))
+ {
+ return polkit.Result.YES;
+ }
+ }
+);