21 lines
383 B
Bash
Executable File
21 lines
383 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Directory containing the script
|
|
DIR="$HOME/.config/hypr"
|
|
|
|
# Rofi sudo askpass helper
|
|
export SUDO_ASKPASS="$DIR/scripts/rofi_askpass"
|
|
|
|
# Check if a command is provided
|
|
if [ -z "$1" ]; then
|
|
echo "Usage: $0 <command>"
|
|
exit 1
|
|
fi
|
|
|
|
# Execute the application with sudo
|
|
if ! sudo -E -A "$@"; then
|
|
echo "Failed to execute command with sudo."
|
|
exit 1
|
|
fi
|
|
|