diff options
Diffstat (limited to 'testing/source/vtown/kde/post-install/powerdevil')
4 files changed, 42 insertions, 0 deletions
diff --git a/testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules b/testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules new file mode 100644 index 00000000..2a8a5a70 --- /dev/null +++ b/testing/source/vtown/kde/post-install/powerdevil/10-enable-ck2-power.rules @@ -0,0 +1,12 @@ +polkit.addRule( + function(action, subject) { + if ( (action.id == "org.freedesktop.consolekit.system.restart" || + action.id == "org.freedesktop.consolekit.system.restart-multiple-users" || + action.id == "org.freedesktop.consolekit.system.stop" || + action.id == "org.freedesktop.consolekit.system.stop-multiple-users") + && subject.isInGroup("power") ) { + return polkit.Result.YES; + } + } +); + diff --git a/testing/source/vtown/kde/post-install/powerdevil/10-enable-elogind-power.rules b/testing/source/vtown/kde/post-install/powerdevil/10-enable-elogind-power.rules new file mode 100644 index 00000000..db499206 --- /dev/null +++ b/testing/source/vtown/kde/post-install/powerdevil/10-enable-elogind-power.rules @@ -0,0 +1,12 @@ +polkit.addRule( + function(action, subject) { + if ( (action.id == "org.freedesktop.login1.reboot" || + action.id == "org.freedesktop.login1.reboot-multiple-sessions" || + action.id == "org.freedesktop.login1.power-off" || + action.id == "org.freedesktop.login1.power-off-multiple-sessions") + && subject.isInGroup("power") ) { + return polkit.Result.YES; + } + } +); + diff --git a/testing/source/vtown/kde/post-install/powerdevil/10-enable-powerdevil-discrete-gpu.rules b/testing/source/vtown/kde/post-install/powerdevil/10-enable-powerdevil-discrete-gpu.rules new file mode 100644 index 00000000..f001848e --- /dev/null +++ b/testing/source/vtown/kde/post-install/powerdevil/10-enable-powerdevil-discrete-gpu.rules @@ -0,0 +1,9 @@ +polkit.addRule( + function(action, subject) { + if ( action.id == "org.kde.powerdevil.discretegpuhelper.hasdualgpu" && + subject.isInGroup("power") ) { + return polkit.Result.YES; + } + } +); + diff --git a/testing/source/vtown/kde/post-install/powerdevil/10-enable-upower-suspend.rules b/testing/source/vtown/kde/post-install/powerdevil/10-enable-upower-suspend.rules new file mode 100644 index 00000000..4bccfb01 --- /dev/null +++ b/testing/source/vtown/kde/post-install/powerdevil/10-enable-upower-suspend.rules @@ -0,0 +1,9 @@ +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; + } + } +); |