i3conf/bin/sleep.sh

13 lines
264 B
Bash
Raw Permalink Normal View History

#!/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