petits-scripts-persos/lock_and_suspend
Adrian Amaglio 679a0ff8ce big update
2023-01-24 23:56:39 +01:00

4 lines
163 B
Bash
Executable File

#!/bin/sh
# Lock screen and suspend if enabled in config file
i3lock -e -c 000000 -u && [ "$(cat "$XDG_RUNTIME_DIR/enable_suspend")" != off ] && systemctl suspend