aboutsummaryrefslogtreecommitdiff
path: root/config/i3/scripts/shutdown
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-04-16 17:42:27 +0200
committerKarel Kočí <cynerd@email.cz>2017-04-16 17:42:27 +0200
commita2f5a33f548aa6e9077c17dd00a692eb12d736bd (patch)
treebfaec002f914aa6d57dcc25a4946db5262c840ef /config/i3/scripts/shutdown
parent7889bb003e7834fe9f8cac4da05e8f78285b0491 (diff)
downloadmyconfigs-a2f5a33f548aa6e9077c17dd00a692eb12d736bd.tar.gz
myconfigs-a2f5a33f548aa6e9077c17dd00a692eb12d736bd.tar.bz2
myconfigs-a2f5a33f548aa6e9077c17dd00a692eb12d736bd.zip
Update system pm control in i3
Diffstat (limited to 'config/i3/scripts/shutdown')
-rwxr-xr-xconfig/i3/scripts/shutdown13
1 files changed, 13 insertions, 0 deletions
diff --git a/config/i3/scripts/shutdown b/config/i3/scripts/shutdown
new file mode 100755
index 0000000..62f6ae1
--- /dev/null
+++ b/config/i3/scripts/shutdown
@@ -0,0 +1,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