snowflake/home/programs/eww/config/widgets/menu.yuck
notohh f5034dca81
All checks were successful
ci/woodpecker/cron/flake-lock-update Pipeline was successful
eww: enable
2024-05-13 16:18:49 -04:00

71 lines
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 1
: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))