mirror of
https://github.com/rwinkhart/cachyos-postinstall-helper.git
synced 2026-08-28 04:46:52 -04:00
Add option to install corectrl w/passwordless startup
This commit is contained in:
+15
-1
@@ -10,7 +10,7 @@ import (
|
|||||||
func applications() {
|
func applications() {
|
||||||
for {
|
for {
|
||||||
var doAll bool
|
var doAll bool
|
||||||
choice := front.InputMenuGen("Application to install:", []string{"BACK", "ALL", "yay-bin", "zsh", "htop", "neovim", "virt-manager (also installs qemu-desktop+libvirt)", "librewolf-bin", "zed", "steam"})
|
choice := front.InputMenuGen("Application to install:", []string{"BACK", "ALL", "yay-bin", "zsh", "htop", "neovim", "virt-manager (also installs qemu-desktop+libvirt)", "librewolf-bin", "zed", "steam", "corectrl"})
|
||||||
switch choice {
|
switch choice {
|
||||||
case 1:
|
case 1:
|
||||||
return
|
return
|
||||||
@@ -82,6 +82,9 @@ func applications() {
|
|||||||
fallthrough
|
fallthrough
|
||||||
case 10:
|
case 10:
|
||||||
managePackages("-S", []string{"steam"})
|
managePackages("-S", []string{"steam"})
|
||||||
|
case 11:
|
||||||
|
managePackages("-S", []string{"corectrl"})
|
||||||
|
writeFile(mountPoint+"/etc/polkit-1/rules.d/90-corectrl.rules", corectrlPolkit, "root", 0644)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,3 +290,14 @@ const zed = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
const corectrlPolkit = `polkit.addRule(function(action, subject) {
|
||||||
|
if ((action.id == "org.corectrl.helper.init" ||
|
||||||
|
action.id == "org.corectrl.helperkiller.init") &&
|
||||||
|
subject.local == true &&
|
||||||
|
subject.active == true &&
|
||||||
|
subject.isInGroup("your-user-group")) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
`
|
||||||
|
|||||||
Reference in New Issue
Block a user