feat: pkg install/remove toggle and sudo-toggle function #20
Reference in New Issue
Block a user
Delete Branch "feat/pkg-toggle-and-sudo-toggle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
pkgtoggle:pkg <name>...now auto-detects whether each package is installed and installs or removes it accordingly. Force install (-i) and force uninstall (-u) flags added for when you want to skip detection. Shows help when called with no arguments.sudo-toggle: New system function that toggles sudo password enforcement on/off by writing/clearing aNOPASSWDrule in/etc/sudoers.d/nofail-toggle. Useful for temporarily bypassing FIDO key prompts during batch admin tasks.Manual Verification
pkg ripgrepon a machine where ripgrep is not installed — confirm it installs via paru/yay.pkg ripgrepagain (now installed) — confirm it removes the package (-Rns).pkg -i ripgrepwhen already installed — confirm it force-installs without removing.pkg -u ripgrepwhen installed — confirm it force-uninstalls.sudo-toggleonce — confirm it prints🔓 Sudo security: DISABLEDandsudoworks without a password prompt.sudo-toggleagain — confirm it prints🔒 Sudo security: ENABLEDandsudorequires authentication.