#!/usr/bin/env bash
# The top bar's power icon (waybar custom/power): opens the forgeOS power menu
# (Lock, Log out, Reboot, Power off), or closes it if it is already open.
set -u

menu=/usr/share/forgeos/quickshell/powermenu.qml

# An open menu answers the IPC call and closes; otherwise start one.
qs ipc --path "$menu" call powermenu close >/dev/null 2>&1 && exit 0
exec quickshell --no-duplicate --path "$menu"
