#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2026 The Dodobian authors
#
# power lock|logout|reboot|poweroff|suspend: the session buttons of the Applications menu, Super+L
# and the buttons of the lock screen. lock asks logind, and dodo-idle.service runs libexec/lock.
case ${1:-} in
lock) exec loginctl lock-session ;;
logout) exec labwc --exit ;;
reboot) exec systemctl reboot ;;
poweroff) exec systemctl poweroff ;;
suspend) exec systemctl suspend ;;
*) echo "usage: ${0##*/} lock|logout|reboot|poweroff|suspend" >&2; exit 2 ;;
esac
