Skip to content

WrapMemoryProps

Attributes:

attr Memory

Memory: MemoryProps

Type: MemoryProps

A native component within hitokage that displays current memory information.

See ComponentProps

Example

monitor = hitokage.monitor.get_primary()

 local mem_str =
  '{{pad "left" (round (div used 1024) 1) 4}} ({{ pad "left" (concat (round (mult (div used total) 100) 1) "%") 4 }})'

---@type MemoryProps
memory_props = { format = mem_str }

monitor:attach({
  children = {
    Memory = memory_props,
  },
})

The mounted API is documented here: Memory