52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
Plaintext
(defwidget power-button []
|
|
(box
|
|
:width 32
|
|
(button
|
|
;; :onclick `eww close power-menu || eww open power-menu`
|
|
:onclick `/home/drew/.config/rofi/powermenu/type-2/powermenu.sh`
|
|
(box
|
|
:orientation "h"
|
|
(label :text "⏻")
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defwindow power-menu
|
|
:monitor '[ "<secondary>", "DP-1" ]'
|
|
:geometry (geometry
|
|
:x "8px"
|
|
:y "8px"
|
|
:anchor "top right"
|
|
)
|
|
:stacking "overlay"
|
|
:exclusive false
|
|
:focusable false
|
|
(box
|
|
:class "power-menu stand-alone"
|
|
:orientation "v"
|
|
:halign "start"
|
|
:spacing 10
|
|
;; (button
|
|
;; :onclick "hyprlock"
|
|
;; :halign "start"
|
|
;; (label :text "🔒 Lock")
|
|
;; )
|
|
(button
|
|
:onclick "eww close power-menu && systemctl suspend"
|
|
:halign "start"
|
|
(label :text "⏾ Suspend")
|
|
)
|
|
(button
|
|
:onclick "eww close power-menu && systemctl reboot"
|
|
:halign "start"
|
|
(label :text "⟳ Reboot")
|
|
)
|
|
(button
|
|
:onclick "eww close power-menu && systemctl poweroff"
|
|
:halign "start"
|
|
(label :text "⏻ Shutdown")
|
|
)
|
|
)
|
|
)
|