nixos-configs/eww/powermenu/powermenu.yuck

56 lines
1.3 KiB
Text
Raw Permalink Normal View History

2023-05-28 18:05:51 -04:00
(defwidget powermenu []
(box :class "powermenu"
:orientation "h"
:space-evenly true
:spacing 20
(button :class "shutdown"
:onclick "systemctl poweroff"
(label :text "襤" :class "content")
)
(button :class "reboot"
:onclick "systemctl reboot"
(label :text "勒" :class "content")
)
(button :class "logout"
2023-06-19 20:51:55 -04:00
:onclick "hyprctl dispatch exit"
2023-05-28 18:05:51 -04:00
(label :text "" :class "content")
)
)
)
(defwidget powermenu-clickhandler []
(button :class "powermenu-clickhandler"
:onclick "eww -c ~/.config/eww close powermenu powermenu-clickhandler"
""
)
)
(defwindow powermenu-clickhandler
:monitor 0
:geometry (geometry :x "0px"
:y "0px"
:width "100%"
:height "100%"
:anchor "center")
:wm-ignore true
2023-06-04 01:41:14 -04:00
(powermenu-clickhandler)
)
2023-05-28 18:05:51 -04:00
(defvar powermenu-visible false)
(defwindow powermenu-reveal
2023-05-28 18:05:51 -04:00
:monitor 0
:stacking "overlay"
2023-05-28 18:05:51 -04:00
:geometry (geometry :x "0px"
:y "0px"
:width "500px"
:height "150px"
:anchor "center")
(revealer
:transition "crossfade"
:reveal powermenu-visible
:duration "550ms"
2023-06-04 01:41:14 -04:00
(powermenu)
)
)