[eww] Adds my Eww config
This commit is contained in:
50
home-manager/apps/eww/config/power-button.yuck
Normal file
50
home-manager/apps/eww/config/power-button.yuck
Normal file
@@ -0,0 +1,50 @@
|
||||
(defwidget power-button []
|
||||
(box
|
||||
:width 32
|
||||
(button
|
||||
:onclick `eww close power-menu || eww open power-menu`
|
||||
(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")
|
||||
)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user