suspend update

This commit is contained in:
Adrian Amaglio 2022-03-11 13:43:31 +01:00
parent 35f8cdfba0
commit d49f19e48b
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,3 @@
#!/bin/sh
# Lock screen and suspend if enabled in config file
DISPLAY=:0 i3lock -e -c 000000 -u && [ -z "$(grep off "/run/user/1000/enable_suspend")" ] && systemctl suspend
i3lock -e -c 000000 -u && [ -z "$(grep off "/run/user/1000/enable_suspend")" ] && systemctl suspend

View File

@ -1,5 +1,5 @@
#!/bin/sh
if [ -z "$(grep off "/run/user/1000/enable_suspend")" ] ; then
if [ -z "$(grep off "$XDG_RUNTIME_DIR/enable_suspend")" ] ; then
echo off > "$XDG_RUNTIME_DIR/enable_suspend"
notify-send "Sleep mode is now" "off"
else