#!/usr/bin/env bash if [[ $(acpi -a | awk '{print $3}') == "on-line" ]]; then swaylock else systemctl suspend-then-hibernate fi