diff options
| author | Syndamia <kamen@syndamia.com> | 2023-04-21 08:58:31 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2023-04-21 08:58:39 +0300 |
| commit | 29fedb13ef41f94d4c383c8207a02497694d622a (patch) | |
| tree | d2b8ac24b8b813f4f27c943609bdb339f2b53024 /.b/etc/elogind/system-sleep | |
| parent | ba512800b679fe257183e512417df6adffe6b80d (diff) | |
| download | dotfiles-29fedb13ef41f94d4c383c8207a02497694d622a.tar dotfiles-29fedb13ef41f94d4c383c8207a02497694d622a.tar.gz dotfiles-29fedb13ef41f94d4c383c8207a02497694d622a.zip | |
[.a/sys/lock.sh] Updated suspending to be properly managed by elogind
Diffstat (limited to '.b/etc/elogind/system-sleep')
| -rwxr-xr-x | .b/etc/elogind/system-sleep/run-lock.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.b/etc/elogind/system-sleep/run-lock.sh b/.b/etc/elogind/system-sleep/run-lock.sh new file mode 100755 index 0000000..35e6691 --- /dev/null +++ b/.b/etc/elogind/system-sleep/run-lock.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Thanks https://wiki.gentoo.org/wiki/Elogind#Suspend.2FHibernate_Resume.2FThaw_hook_scripts +case $1/$2 in + pre/*) # Put here any commands expected to be run when suspending or hibernating. + export DISPLAY=:0 + sudo -H -u kamen bash -c '~/.a/sys/lock.sh && until xdotool search --onlyvisible --classname i3lock; do sleep 0.2; done' + ;; + post/*) # Put here any commands expected to be run when resuming from suspension or thawing from hibernation. + ;; +esac |
