Add option to install corectrl w/passwordless startup

This commit is contained in:
2025-10-12 14:19:24 -04:00
parent 688fcaa994
commit 0c010f0904
+15 -1
View File
@@ -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;
}
});
`