Simpler command structure

This commit is contained in:
David Heinemeier Hansson
2026-04-29 14:54:03 +02:00
parent e76d7544d3
commit 12d8e001ab
@@ -1,7 +1,7 @@
#!/bin/bash
# Toggle passwordless sudo for the current user.
# Usage: omarchy-sudo-passwordless-toggle [MINUTES]
# Usage: omarchy-sudo-passwordless [MINUTES]
# First run: enables passwordless sudo for 15 minutes (after confirmation).
# Second run: disables it early.
@@ -10,7 +10,7 @@ TIMER_NAME="omarchy-nopasswd-expire-${USER}"
MINUTES=${1:-15}
if [[ $1 && ! $1 =~ ^[0-9]+$ ]]; then
echo "Usage: omarchy-sudo-passwordless-toggle [MINUTES]" >&2
echo "Usage: omarchy-sudo-passwordless [MINUTES]" >&2
exit 1
fi
@@ -52,7 +52,7 @@ else
echo ""
echo "Passwordless sudo has been ENABLED. It will automatically disable in ${MINUTES} minutes."
echo "Note: if you restart before then, run omarchy-sudo-passwordless-toggle again to disable it."
echo "Note: if you restart before then, run omarchy-sudo-passwordless again to disable it."
else
echo "Aborted. No changes made."
fi