Skip to content

feat: system wide config - #667

Merged
robertwidfen merged 1 commit into
Satty-org:mainfrom
RobertMueller2:feat_system_config
Oct 2, 2026
Merged

robertwidfen merged 1 commit into
Satty-org:mainfrom
RobertMueller2:feat_system_config

Conversation

@RobertMueller2

Copy link
Copy Markdown
Member

Closes: #630

Changes configuration.rs code slightly to allow a system wide config file in XDG_CONFIG_DIRS/satty/config.toml (usually /etc/xdg/satty/config.toml).

File not found on any specified config (--config) is still fatal, I think this is sensible. For the system and user config, they're used if present and skipped via external BaseDirectories::find_config_files if not present.

This PR clashes with #664.

Design choices:

  • shortcuts are extended (I suppose it would suck if this wasn't the case), there is always none to unset
  • fallback fonts vec is extended, additional fonts on user side wouldn't hurt much
  • palette and custom colours are overwritten. otherwise it might be tricky to prevent a full style toolbar on user side, depending on how many entries packagers provide via system config. I didn't feel like providing any special notation to clear this.

Closes: Satty-org#630

Changes configuration.rs code slightly to allow a system wide config
file in XDG_CONFIG_DIRS/satty/config.toml (usually
/etc/xdg/satty/config.toml).

File not found on any specified config (--config) is still fatal, I
think this is sensible. For the system and user config, they're used if
present and skipped via external BaseDirectories::find_config_files if
not present.

This PR clashes with Satty-org#664.

Design choices:

- shortcuts are extended (I suppose it would suck if this wasn't the
  case), there is always none to unset
- fallback fonts vec is extended, additional fonts on user side wouldn't hurt much
- palette and custom colours are overwritten. otherwise it might be
  tricky to prevent a full style toolbar on user side, depending on how many
  entries packagers provide via system config. I didn't feel like
  providing any special notation to clear this.
@robertwidfen

Copy link
Copy Markdown
Collaborator

lgtm

#664 requires work anyway and it is in a very early stage - I got annoyed to switching config when switching branches and needed a quick solution. In fact I thing #664 should be split into "handling errors more gracefully" and maybe "notify on errors" if it can be done in a proper way.

@robertwidfen
robertwidfen merged commit a495981 into Satty-org:main Oct 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System configuration file (= default values and doc)

2 participants