#!/usr/bin/env bash
# Power actions for the Control Center dropdown — compositor-agnostic.
set -u
. "$(dirname "$0")/wm.sh"
eww close control-center panel-backdrop 2>/dev/null
case "${1:-}" in
  lock)     wm_lock ;;
  logout)   wm_exit ;;
  sleep)    systemctl suspend ;;
  reboot)   systemctl reboot ;;
  shutdown) systemctl poweroff ;;
esac
