ENH export geometries for default overrides in config

This commit is contained in:
Nathan Dwarshuis 2022-08-28 23:52:09 -04:00
parent e517b31ea5
commit 96d14a4b68
1 changed files with 34 additions and 35 deletions

View File

@ -10,17 +10,17 @@ let TextGeo = { Type = { text_spacing : Natural }, default.text_spacing = 20 }
let SepGeo = { Type = { sep_spacing : Natural }, default.sep_spacing = 20 } let SepGeo = { Type = { sep_spacing : Natural }, default.sep_spacing = 20 }
let PlotGeo_ = let PlotGeo =
{ Type = { sec_break : Natural, height : Natural, ticks_y : Natural } { Type = { sec_break : Natural, height : Natural, ticks_y : Natural }
, default = { sec_break = 20, height = 56, ticks_y = 4 } , default = { sec_break = 20, height = 56, ticks_y = 4 }
} }
let PlotGeo = { Type = { plot : PlotGeo_.Type }, default.plot = PlotGeo_::{=} } let PlotGeo_ = { Type = { plot : PlotGeo.Type }, default.plot = PlotGeo::{=} }
let TableGeo_ = { Type = { sec_break : Natural }, default.sec_break = 20 } let TableGeo = { Type = { sec_break : Natural }, default.sec_break = 20 }
let TableGeo = let TableGeo_ =
{ Type = { table : TableGeo_.Type }, default.table = TableGeo_::{=} } { Type = { table : TableGeo.Type }, default.table = TableGeo::{=} }
let FSGeo = let FSGeo =
{ Type = { bar_spacing : Natural, bar_pad : Natural } //\\ SepGeo.Type { Type = { bar_spacing : Natural, bar_pad : Natural } //\\ SepGeo.Type
@ -28,25 +28,28 @@ let FSGeo =
} }
let GfxGeo = let GfxGeo =
{ Type = SepGeo.Type //\\ PlotGeo.Type //\\ TextGeo.Type { Type = SepGeo.Type //\\ PlotGeo_.Type //\\ TextGeo.Type
, default = SepGeo::{=} /\ PlotGeo::{=} /\ TextGeo::{=} , default = SepGeo::{=} /\ PlotGeo_::{=} /\ TextGeo::{=}
} }
let MemGeo = let MemGeo =
{ Type = TextGeo.Type //\\ PlotGeo.Type //\\ TableGeo.Type { Type = TextGeo.Type //\\ PlotGeo_.Type //\\ TableGeo_.Type
, default = TextGeo::{=} /\ PlotGeo::{=} /\ TableGeo::{=} , default = TextGeo::{=} /\ PlotGeo_::{=} /\ TableGeo_::{=}
} }
let ProcGeo = let ProcGeo =
{ Type = GfxGeo.Type //\\ TableGeo.Type { Type = GfxGeo.Type //\\ TableGeo_.Type
, default = GfxGeo::{=} /\ TableGeo::{=} , default = GfxGeo::{=} /\ TableGeo_::{=}
} }
let PwrGeo = let PwrGeo =
{ Type = TextGeo.Type //\\ PlotGeo.Type { Type = TextGeo.Type //\\ PlotGeo_.Type
, default = TextGeo::{=} /\ PlotGeo::{=} , default = TextGeo::{=} /\ PlotGeo_::{=}
} }
let AllGeo =
{ TextGeo, PlotGeo, TableGeo, FSGeo, GfxGeo, MemGeo, ProcGeo, PwrGeo }
let FileSystem = let FileSystem =
{ Type = { Type =
{ show_smart : Bool, fs_paths : List FSPath, geometry : FSGeo.Type } { show_smart : Bool, fs_paths : List FSPath, geometry : FSGeo.Type }
@ -78,7 +81,7 @@ let Memory =
} }
let Network = let Network =
{ Type = { geometry : PlotGeo.Type }, default.geometry = PlotGeo::{=} } { Type = { geometry : PlotGeo_.Type }, default.geometry = PlotGeo_::{=} }
let Processor = let Processor =
{ Type = { Type =
@ -104,12 +107,24 @@ let Power =
} }
let ReadWrite = let ReadWrite =
{ Type = { devices : List Text, geometry : PlotGeo.Type } { Type = { devices : List Text, geometry : PlotGeo_.Type }
, default.geometry = PlotGeo::{=} , default.geometry = PlotGeo_::{=}
} }
let System = Pacman let System = Pacman
let AllModules =
{ FileSystem
, Graphics
, Memory
, Network
, Pacman
, Power
, Processor
, ReadWrite
, System
}
let ModType = let ModType =
< filesystem : FileSystem.Type < filesystem : FileSystem.Type
| graphics : Graphics.Type | graphics : Graphics.Type
@ -302,22 +317,6 @@ let toConfig =
} }
: Config : Config
in { toConfig in { toConfig, Block, Column, ModType, Layout, Panel, FSPath, Theme, mod }
, Block /\ AllModules
, Column /\ AllGeo
, ModType
, Layout
, Panel
, FSPath
, FileSystem
, Graphics
, Memory
, Network
, Pacman
, Processor
, Power
, ReadWrite
, System
, Theme
, mod
}