syndicate_utils/src/schema/rofi.nim

19 lines
433 B
Nim

import
preserves, std/tables
type
Environment* = Table[Symbol, string]
Select* {.preservesRecord: "rofi-select".} = object
`option`*: string
`environment`*: Environment
Options* {.preservesRecord: "rofi-options".} = object
`options`*: seq[string]
proc `$`*(x: Environment | Select | Options): string =
`$`(toPreserve(x))
proc encode*(x: Environment | Select | Options): seq[byte] =
encode(toPreserve(x))