aboutsummaryrefslogtreecommitdiff
path: root/config/i3/scripts/shutdown
blob: 62f6ae1c6cc411dba2c08c1b2ba121cf8ebaec14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

export SUDO_ASKPASS=/tmp/shutdown-askpass.sh


echo '#!/bin/sh
echo "SETDESC Please enter password to shutdown system
SETPROMPT Password:
SETTITLE Sudo password for system shutdown
GETPIN" | pinentry | grep -E "^D " | sed "s/^D //"' > $SUDO_ASKPASS
chmod +x $SUDO_ASKPASS

sudo -A shutdown -h now