piker icon indicating copy to clipboard operation
piker copied to clipboard

the boss, `conf.toml`

Open goodboy opened this issue 4 years ago • 1 comments

i'm thinking we might as well have a top level config file for users to choose and tweak a lot of optional/variable settings we starting to acquire.

Some options i can think of off-hand,

[allocation.default]
size_units = 'currency'
limit = 5e3
slots = 4

[allocation.options]
size_units = 'units'
limit = 10
slots = 1

[allocation.peeneez]
size_units = 'percent_of_port'
limit = 20
slots = 6

[style]
colorscheme = 'default'

[tractor]
port = 6116

[ui]
update_throttle = 60  # Hz

opinions welcome obvsly.


TODO:

  • support write-triggers-UI-update
    • [ ] probably we can use watchfiles by the pydantic author:
      • https://github.com/samuelcolvin/watchfiles
      • [ ] most notable is the awatch api: https://watchfiles.helpmanual.io/api/watch/#watchfiles.awatch
      • should get similar functionality as from alacritty, namely dynamic config reloading on file writes
      • [ ] for font size auto-scaling, we need to handle DPI changes when a window gets moved to a diff display: https://github.com/pikers/piker/pull/523/files#r1237362101
  • [x] font size and style settings
    • added in #523 which apparently makes it all work on windows as well B)
    • [ ] relatedly supporting using the traditional ctl +/- to grow or shrink the font size and subsequently resize all UI widget sizes around the changes.
      • note many of our custom widgets in particular already have api facilities for this, we just need some kind of std interface and kb handler to trigger it all

goodboy avatar Sep 06 '21 20:09 goodboy

A version of this actually already landed in #489 and is being added to in both #486 and #523 🏄🏼

Oh and we ended up jsut going with conf.toml for filename.

goodboy avatar Jun 21 '23 18:06 goodboy