forked from Shinonome/dots-hyprland
70 lines
1.9 KiB
Plaintext
Executable File
70 lines
1.9 KiB
Plaintext
Executable File
(defwidget winpower []
|
|
(box
|
|
:space-evenly false
|
|
:orientation "v"
|
|
:style "
|
|
${anim_open_winpowermenu ? 'transition: 200ms cubic-bezier(0.05, 0.7, 0.1, 1);' : 'transition: 150ms cubic-bezier(0.3, 0, 0.8, 0.15);'}
|
|
${rev_winpowermenu ? '' : 'margin-bottom: -700px; margin-top: 700px;'}
|
|
"
|
|
(eventbox
|
|
:valign "start"
|
|
:onclick "scripts/toggle-winpowermenu.sh --close &"
|
|
:onmiddleclick "scripts/toggle-winpowermenu.sh --close &"
|
|
:onrightclick "scripts/toggle-winpowermenu.sh --close &"
|
|
(box
|
|
:class "box-that-is-there" :style "min-height: 1px;"
|
|
)
|
|
)
|
|
(box
|
|
:class "winpower-window"
|
|
:orientation "v"
|
|
:width 161
|
|
:space-evenly false
|
|
(button
|
|
:onclick "systemctl suspend &"
|
|
:class "winpower-button"
|
|
(box
|
|
:space-evenly false
|
|
(image :class "win-segoeicon"
|
|
:class "winpower-buttonicon"
|
|
:path "images/svg/dark/moon.svg"
|
|
:image-width 20 :image-height 20
|
|
)
|
|
(label :class "winbartext" :text "Sleep")
|
|
)
|
|
)
|
|
(button
|
|
:onclick "systemctl poweroff &"
|
|
:class "winpower-button"
|
|
(box
|
|
:space-evenly false
|
|
(label :xalign 0 :class "winpower-buttonicon win-segoeicon" :text "")
|
|
(label :xalign 0 :class "winbartext" :text "Shut down")
|
|
)
|
|
)
|
|
(button
|
|
:onclick "systemctl reboot &"
|
|
:class "winpower-button"
|
|
(box
|
|
:space-evenly false
|
|
(label :xalign 0 :class "winpower-buttonicon win-segoeicon" :text "")
|
|
(label :xalign 0 :class "winbartext" :text "Restart")
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defwindow winpowermenu
|
|
:wm-ignore true
|
|
:monitor 0
|
|
:focusable true
|
|
:namespace "noblur"
|
|
:geometry (geometry
|
|
:x "1140px"
|
|
:y "126px"
|
|
:width 161
|
|
:anchor "bottom left"
|
|
)
|
|
(winpower)
|
|
) |