mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-04 22:57:21 +02:00
15 lines
543 B
Plaintext
15 lines
543 B
Plaintext
/*
|
|
* Allow users in privileged gamemode group to run cpugovctl &
|
|
* gpuclockctl without authentication
|
|
*/
|
|
polkit.addRule(function (action, subject) {
|
|
if ((action.id == "com.feralinteractive.GameMode.governor-helper" ||
|
|
action.id == "com.feralinteractive.GameMode.gpu-helper" ||
|
|
action.id == "com.feralinteractive.GameMode.cpu-helper") ||
|
|
action.id == "com.feralinteractive.GameMode.procsys-helper") &&
|
|
subject.isInGroup("@GAMEMODE_PRIVILEGED_GROUP@"))
|
|
{
|
|
return polkit.Result.YES;
|
|
}
|
|
});
|