From 0c010f0904b06745bfe0143081057a05b42e02ca Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sun, 12 Oct 2025 14:19:24 -0400 Subject: [PATCH] Add option to install corectrl w/passwordless startup --- applications.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/applications.go b/applications.go index 3e7f7b6..b16762b 100644 --- a/applications.go +++ b/applications.go @@ -10,7 +10,7 @@ import ( func applications() { for { 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 { case 1: return @@ -82,6 +82,9 @@ func applications() { fallthrough case 10: 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; + } +}); +`