i3conf/bin/sleep.sh
2019-03-23 22:25:08 +01:00

12 lines
264 B
Bash
Executable file

#!/bin/sh
# Small script to lock the screen before sleeping
# suspend to ram or suspend to disk?
if [ $1 = '-r' ]; then
sleeptype="/usr/sbin/s2ram"
elif [ $1 = '-d' ]; then
sleeptype="/usr/sbin/s2disk"
fi
/usr/bin/i3lock -c 000000 && /usr/bin/sudo $sleeptype