(defvar reveal_powermenu false)
(defwidget powermenu []
  (revealer-on-hover
    :revealvar reveal_powermenu
    :class "powermenu"
    :revealvar-name "reveal_powermenu"
    (button :onclick 'scripts/bar/powermenu poweroff system-shutdown-symbolic "systemctl poweroff"'
      "")
    (powermenu_children)))

(defwidget powermenu_children []
  (box :class "reveal_children"
    :orientation "h"
    :space-evenly false
    :halign "center"
    (button :onclick 'scripts/bar/powermenu reboot system-reboot-symbolic "systemctl reboot"'
      "")
    (button :onclick 'scripts/bar/powermenu suspend weather-clear-night-symbolic "systemctl suspend"'
      "")
    (button :onclick 'scripts/bar/powermenu lock system-lock-screen-symbolic "sp-lock"'
      "")
    (button :onclick 'scripts/bar/powermenu logout system-log-out-symbolic "swaymsg exit"'
      "")))
