Files
ags/widget/modules/PowerMenu.tsx
T
2025-03-10 21:51:05 +07:00

26 lines
957 B
TypeScript

import { Astal, App } from "astal/gtk3";
export default function PowerMenu() {
const { TOP, RIGHT } = Astal.WindowAnchor
const powermenulist = [
{action: "/home/tola/.config/ags/scripts/powermenu lock", label: ""},
{action: "/home/tola/.config/ags/scripts/powermenu suspend", label: ""},
{action: "/home/tola/.config/ags/scripts/powermenu logout", label: ""},
{action: "/home/tola/.config/ags/scripts/powermenu reboot", label: ""},
{action: "/home/tola/.config/ags/scripts/powermenu poweroff", label: ""}
]
return <window
anchor={TOP | RIGHT}
name="powermenu"
className="Powermenu"
application={App}
visible={false}
>
<box>
{powermenulist.map(data => (
<button onClicked={data.action}>{data.label}</button>
))}
</box>
</window>
}