dotfiles/fsroot/etc/apm/suspend

10 lines
229 B
Plaintext
Raw Normal View History

2022-10-02 00:16:21 +02:00
#!/bin/sh
2024-07-25 17:10:48 +02:00
# pkill -USR1 xidle
# Get the current Xsession user
_user=$(ps -o user= -p $(pgrep -f Xsession))
pkill xlock
# Run xlock as the Xsession user
doas -u $_user env DISPLAY=:0 XAUTHORITY=/home/$_user/.Xauthority slock &