Created
November 15, 2013 00:30
-
-
Save detrohutt/7477018 to your computer and use it in GitHub Desktop.
Save as /etc/polkit-1/rules.d/40-custom.rules and RESET i3!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- */ | |
// Custom user-defined rules for polkit | |
// | |
// See the polkit(8) man page for more information | |
// about configuring polkit. | |
polkit.addRule(function(action, subject) { | |
if (action.id == "org.freedesktop.login1.suspend" || | |
action.id == "org.freedesktop.login1.suspend-multiple-sessions" || | |
action.id == "org.freedesktop.login1.hibernate" || | |
action.id == "org.freedesktop.login1.hibernate-multiple-sessions" || | |
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" || | |
action.id == "org.freedesktop.login1.reboot" || | |
action.id == "org.freedesktop.login1.reboot" && | |
subject.isInGroup("power")) { | |
return polkit.Result.YES; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment