Eww: More improvements to radio & css & powermenu
This commit is contained in:
45
modules/home/wayland/apps/eww/bar/windows/powermenu.yuck
Normal file
45
modules/home/wayland/apps/eww/bar/windows/powermenu.yuck
Normal file
@ -0,0 +1,45 @@
|
||||
(defwidget powermenu_entry [label icon onclick]
|
||||
(box :orientation "v" :space-evenly false :class "powermenu-entry"
|
||||
(button :class "powermenu-button" :onclick {onclick}
|
||||
:tooltip "${label}"
|
||||
(label :class "powermenu-icon" :text {icon})
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget powermenu []
|
||||
(box :orientation "h" :space-evenly true :valign "center" :halign "center" :class "powermenu-box"
|
||||
(powermenu_entry :label "Power off"
|
||||
:icon ""
|
||||
:onclick "systemctl poweroff")
|
||||
(powermenu_entry :label "Reboot"
|
||||
:icon ""
|
||||
:onclick "systemctl reboot")
|
||||
(powermenu_entry :label "Lock"
|
||||
:icon ""
|
||||
:onclick "sleep 0.1 && gtklock & eww close powermenu &")
|
||||
|
||||
(powermenu_entry :label "Suspend"
|
||||
:icon ""
|
||||
:onclick "sleep 0.1 && gtklock & systemctl suspend & eww close powermenu &")
|
||||
|
||||
(powermenu_entry :label "Sign out"
|
||||
:icon ""
|
||||
:onclick "hyprctl dispatch exit 0")
|
||||
|
||||
(powermenu_entry :label "Cancel"
|
||||
:icon ""
|
||||
:onclick "eww close powermenu")
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow powermenu
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
:geometry (geometry
|
||||
:anchor "center"
|
||||
:width "120%"
|
||||
:height "120%")
|
||||
:namespace "eww-blur"
|
||||
(powermenu)
|
||||
)
|
Reference in New Issue
Block a user