dotfiles/sway/suspend_system.sh

7 lines
170 B
Bash
Raw Normal View History

2023-12-23 20:14:10 -07:00
#!/usr/bin/env bash
if [[ "$(cat /proc/acpi/button/lid/LID0/state | awk '{print $2}')" == closed ]]
then
sudo /usr/local/bin/send_sleep_email.sh
systemctl suspend
fi