Reads a home program's own settings file, %LOCALAPPDATA%\\settings.toml, over built-in defaults (from at-home-tools, AHT-258)
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nelson 570668057a
All checks were successful
Suite release / scope (push) Successful in 34s
Suite release / check-build (none, ubuntu-latest) (ubuntu-latest, none) (push) Has been skipped
Suite release / finalize (push) Has been skipped
Suite release / deliver-prune (push) Has been skipped
Suite release / build (none, ubuntu-latest) (ubuntu-latest, none) (push) Has been skipped
Suite release / reused-checks (push) Has been skipped
Suite release / publish (push) Has been skipped
Suite release / deliver (push) Has been skipped
Suite release / deploy-image (push) Has been skipped
Suite release / reserve (push) Has been skipped
Suite release / check-package (push) Has been skipped
Suite release / module (push) Successful in 47s
ownsettings moves in from at-home-tools, unchanged (#1)
2026-11-29 22:59:15 -08:00
go.mod ownsettings moves in from at-home-tools, unchanged (#1) 2026-11-29 22:59:15 -08:00
go.sum ownsettings moves in from at-home-tools, unchanged (#1) 2026-11-29 22:59:15 -08:00
ownsettings.go ownsettings moves in from at-home-tools, unchanged (#1) 2026-11-29 22:59:15 -08:00
ownsettings_test.go ownsettings moves in from at-home-tools, unchanged (#1) 2026-11-29 22:59:15 -08:00
README.md ownsettings moves in from at-home-tools, unchanged (#1) 2026-11-29 22:59:15 -08:00

ownsettings

Reads a home program's own settings file, %LOCALAPPDATA%\<program>\settings.toml: the top-level TOML settings home-sync's appSettings can set on every home PC (AHT-196). A program registered by its release's manifest or run by its Claude plugin is given no settings as arguments (AHT-231), so each reads its own here, over a built-in default.

  • Read(local, program, into): decodes the file into into, leaving every field the file doesn't set at the default already in it; a missing file changes nothing.
  • File(local, program): the file's path; Local() is %LOCALAPPDATA%.

It was at-home-tools' ownsettings package until shared packages got repositories of their own (AGT-85, AHT-258).

Using it

require forgejo.romaine.life/romaine-life/ownsettings v0.1.0
import "forgejo.romaine.life/romaine-life/ownsettings"

settings := struct{ Interval int }{Interval: 30}
err := ownsettings.Read(ownsettings.Local(), "event-logs", &settings)

Testing

go test ./..., on temporary folders.

Shipping

A library: the release-module topic in pipeline-templates' fleet.json tags each merge that changes the code, and every fleet repository whose go.mod requires it gets a take-up. Forgejo pushes it to its public GitHub copy, which proxy.golang.org serves to builds outside CI.