summarylogtreecommitdiffstats
path: root/indicator-cpufreq.rules
blob: c0c6bfaf2b0b2e85cf9e71068ce231ed4fc9530e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* Original:
 * [Change CPU Frequency scaling]
 * Identity=unix-group:wheel
 * Action=com.ubuntu.indicatorcpufreqselector.setfrequencyscaling
 * ResultActive=yes
 */

polkit.addRule(function(action, subject) {
  if ((action.id == "com.ubuntu.indicatorcpufreqselector.setthrottle")
    && subject.local
    && subject.active) {
    return polkit.Result.YES;
  }
});

polkit.addRule(function(action, subject) {
  if ((action.id == "com.ubuntu.indicatorcpufreqselector.setfrequencyscaling")
    && subject.local
    && subject.active) {
    return polkit.Result.YES;
  }
});

polkit.addRule(function(action, subject) {
  if ((action.id == "com.ubuntu.indicatorcpufreqselector.setpsturbo")
    && subject.local
    && subject.active) {
    return polkit.Result.YES;
  }
});

polkit.addRule(function(action, subject) {
  if ((action.id == "com.ubuntu.indicatorcpufreqselector.sethyperthreads")
    && subject.local
    && subject.active) {
    return polkit.Result.YES;
  }
});

polkit.addRule(function(action, subject) {
  if ((action.id == "com.ubuntu.indicatorcpufreqselector.setgputhrottle")
    && subject.local
    && subject.active) {
    return polkit.Result.YES;
  }
});