2024-04-26 17:22:19 -04:00
|
|
|
(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
|
2024-07-01 16:03:25 -04:00
|
|
|
:monitor 0
|
2024-04-26 17:22:19 -04:00
|
|
|
: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
|
2024-05-13 16:18:49 -04:00
|
|
|
(menubox))
|