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 = `$`(toPreserves(x)) proc encode*(x: Environment | Select | Options): seq[byte] = encode(toPreserves(x))