snowflake/home/programs/eww/config/widgets/menu.yuck
notohh fa03a425ad
programs: add eww
i should settle on a bar xddd
2024-04-26 17:22:19 -04:00

71 lines
No EOL
1.7 KiB
Text

(defwidget menu []
(button
:onclick "eww open menu-window"
(label
:text "⏻"
:class "menu-widget")))
(defwidget menubox []
(box
:orientation "v"
:space-evenly true
:class "menubox"
:spacing 0
(box :class "menubox-header"
:orientation "h"
(label :halign "start" :text time)
(label :halign "end" :text "おかえりなさい!"))
(box :class "info-box"
:orientation "h"
(circular-progress
:class "cpu"
:start-at 0
:thickness 6
:clockwise true
:value {EWW_CPU.avg}
(label
:style "font-size: 24px; margin-right: 0.1rem;"
:text "󰍛"))
(circular-progress
:class "mem"
:start-at 0
:thickness 6
:clockwise true
:value {EWW_RAM.used_mem_perc}
(label
:style "font-size: 24px; margin-right: 0.8rem;"
:text ""))
(circular-progress
:class "storage"
:start-at 0
:thickness 6
:clockwise true
:value {EWW_RAM.used_mem_perc}
(label
:style "font-size: 24px;"
:text ""))
(label
:text " ${uptime}")
)
(box :class "menubox-widgets"
:orientation "h"
(button :class "menubox-widgets text" :onclick "reboot now" "")
(button :class "menubox-widgets text" :onclick "shutdown now" "")
(button :class "menubox-widgets text" :onclick "eww close menu-window" "")))
)
(defwindow menu-window
:monitor 2
:windowtype "dock"
:geometry (geometry
:x "0.9%"
:y "1.5%"
:width "25%"
:height "600px"
:anchor "top right")
:stacking "fg"
:windowtype "dock"
:wm-ignore true
:exclusive false
(menubox))