From 96d14a4b6853093669a8e6a304ab20671ed7231a Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sun, 28 Aug 2022 23:52:09 -0400 Subject: [PATCH] ENH export geometries for default overrides in config --- config/config.dhall | 69 ++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/config/config.dhall b/config/config.dhall index 0b9752d..bce6d66 100644 --- a/config/config.dhall +++ b/config/config.dhall @@ -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 PlotGeo_ = +let PlotGeo = { Type = { sec_break : Natural, height : Natural, ticks_y : Natural } , 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 = - { Type = { table : TableGeo_.Type }, default.table = TableGeo_::{=} } +let TableGeo_ = + { Type = { table : TableGeo.Type }, default.table = TableGeo::{=} } let FSGeo = { Type = { bar_spacing : Natural, bar_pad : Natural } //\\ SepGeo.Type @@ -28,25 +28,28 @@ let FSGeo = } let GfxGeo = - { Type = SepGeo.Type //\\ PlotGeo.Type //\\ TextGeo.Type - , default = SepGeo::{=} /\ PlotGeo::{=} /\ TextGeo::{=} + { Type = SepGeo.Type //\\ PlotGeo_.Type //\\ TextGeo.Type + , default = SepGeo::{=} /\ PlotGeo_::{=} /\ TextGeo::{=} } let MemGeo = - { Type = TextGeo.Type //\\ PlotGeo.Type //\\ TableGeo.Type - , default = TextGeo::{=} /\ PlotGeo::{=} /\ TableGeo::{=} + { Type = TextGeo.Type //\\ PlotGeo_.Type //\\ TableGeo_.Type + , default = TextGeo::{=} /\ PlotGeo_::{=} /\ TableGeo_::{=} } let ProcGeo = - { Type = GfxGeo.Type //\\ TableGeo.Type - , default = GfxGeo::{=} /\ TableGeo::{=} + { Type = GfxGeo.Type //\\ TableGeo_.Type + , default = GfxGeo::{=} /\ TableGeo_::{=} } let PwrGeo = - { Type = TextGeo.Type //\\ PlotGeo.Type - , default = TextGeo::{=} /\ PlotGeo::{=} + { Type = TextGeo.Type //\\ PlotGeo_.Type + , default = TextGeo::{=} /\ PlotGeo_::{=} } +let AllGeo = + { TextGeo, PlotGeo, TableGeo, FSGeo, GfxGeo, MemGeo, ProcGeo, PwrGeo } + let FileSystem = { Type = { show_smart : Bool, fs_paths : List FSPath, geometry : FSGeo.Type } @@ -78,7 +81,7 @@ let Memory = } let Network = - { Type = { geometry : PlotGeo.Type }, default.geometry = PlotGeo::{=} } + { Type = { geometry : PlotGeo_.Type }, default.geometry = PlotGeo_::{=} } let Processor = { Type = @@ -104,12 +107,24 @@ let Power = } let ReadWrite = - { Type = { devices : List Text, geometry : PlotGeo.Type } - , default.geometry = PlotGeo::{=} + { Type = { devices : List Text, geometry : PlotGeo_.Type } + , default.geometry = PlotGeo_::{=} } let System = Pacman +let AllModules = + { FileSystem + , Graphics + , Memory + , Network + , Pacman + , Power + , Processor + , ReadWrite + , System + } + let ModType = < filesystem : FileSystem.Type | graphics : Graphics.Type @@ -302,22 +317,6 @@ let toConfig = } : Config -in { toConfig - , Block - , Column - , ModType - , Layout - , Panel - , FSPath - , FileSystem - , Graphics - , Memory - , Network - , Pacman - , Processor - , Power - , ReadWrite - , System - , Theme - , mod - } +in { toConfig, Block, Column, ModType, Layout, Panel, FSPath, Theme, mod } + /\ AllModules + /\ AllGeo