diff --git a/bin/omarchy-menu b/bin/omarchy-menu index f1dfc905..7173c2fa 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -168,7 +168,7 @@ show_share_menu() { } show_toggle_menu() { - local options="󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n󱂬 Workspace Layout\n Window Gaps\n 1-Window Ratio\n󰍹 Monitor Scaling\n Direct Boot" + local options="󱄄 Screensaver\n󰔎 Nightlight\n󱫖 Idle Lock\n󰍜 Top Bar\n󱂬 Workspace Layout\n Window Gaps\n 1-Window Ratio\n󰍹 Monitor Scaling\n Direct Boot\n󰟵 Passwordless Sudo" case $(menu "Toggle" "$options") in *Screensaver*) omarchy-toggle-screensaver ;; @@ -180,6 +180,7 @@ show_toggle_menu() { *Gaps*) omarchy-hyprland-window-gaps-toggle ;; *Scaling*) omarchy-hyprland-monitor-scaling-cycle ;; *"Direct Boot"*) present_terminal omarchy-config-direct-boot ;; + *"Passwordless Sudo"*) present_terminal omarchy-sudo-passwordless ;; *) back_to show_trigger_menu ;; esac } diff --git a/bin/omarchy-sudo-passwordless b/bin/omarchy-sudo-passwordless index 1ac400bb..d0cde92b 100755 --- a/bin/omarchy-sudo-passwordless +++ b/bin/omarchy-sudo-passwordless @@ -14,6 +14,8 @@ if [[ $1 && ! $1 =~ ^[0-9]+$ ]]; then exit 1 fi +echo "Toggle passwordless sudo..." + # Safety: if the file exists but the timer doesn't (e.g. after reboot), clean up if sudo test -f "$NOPASSWD_FILE" && ! systemctl is-active "${TIMER_NAME}.timer" &>/dev/null; then sudo rm "$NOPASSWD_FILE" @@ -33,7 +35,7 @@ if sudo test -f "$NOPASSWD_FILE"; then fi else echo "" - echo "⚠️WARNING: This will allow ANY process running as your user to" + echo "⚠️ WARNING: This will allow ANY process running as your user to" echo "execute ANY command as root WITHOUT a password for ${MINUTES} minutes." echo "" echo "This is useful for AI agents that need to run sudo commands,"