mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Simpler command structure
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user