(defvar reveal_sysmem false)
(defwidget sysmem []
  (revealer-on-hover
    :revealvar reveal_sysmem
    :revealvar-name "reveal_sysmem"
    (metric :label " "
            :value {EWW_RAM.used_mem_perc})
    (sysmem_children)))

(defwidget sysmem_children []
  (box :class "reveal_children"
    :orientation "h"
    :space-evenly false
    :halign "center"
    (metric :label " "
            :value {round((EWW_RAM.total_mem - EWW_RAM.free_mem) / EWW_RAM.total_mem,2) * 100})
    (metric :label " "
            :value {round((EWW_RAM.total_swap - EWW_RAM.free_swap) / EWW_RAM.total_swap,2) * 100})))
