4.2 KiB
4.2 KiB
- Require all app names be set somewhere in the app registry, even if no variables need to
be supplied (such as "gnome," which just calls a script based on scheme). This helps
explicitly define the scope of "*" for applications, and can allow users to keep their
config files without involving them in any
autoconfcall. scheme: autois a valid specification, but it will always resolve to eitherlightordark. "auto" is not a valid scheme choice when it comes to naming, but it can be used when makingautoconfcalls to set palettes that reflect the scheme that is currently set (just think of the analogous setting in the browser: auto just means to infer and set the local scheme to whatever the system scheme is set to).- Due
/call, we no longer have explicit, hard-coded scheme commends inset_theme.py. Calls to GNOME's portal or to MacOS system settings can now just be seen as another "app" with a configurable script, reactive to the passed scheme option. - Here's the palette/scheme spec model
- If specific
schemeandpaletteare provided, files prefixed with<scheme>-<palette>,any-<palette>, or<scheme>-anyare matched, in that order, for each unique file tail, for each app. - If
paletteis provided byschemeis not, it defaults toautoand will attempt to infer a specific value, yielding the same case as above. - If
schemecannot be inferred whenauto, or is explicitly set toany, onlyany-<palette>file prefixes are matched. The idea here is thatanyindicates that a theme file is explicitly indifferent to the specification of that option, and won't interfere in an unintended way. The termnonewould work exactly the same here;anyseems like it might be misleading, indicating it will match with any specific palette. In any case (no pun intended), palettes should create files with ananyscheme if want to be considered as a possible setting when theschemeis any option, i.e.,light/dark/any. - The same goes for
palette, although it will default toanywhen unspecified. Thus, only commands/files that changeschemewill be considered whenpaletteisn't given. (I suppose we could also consider anautodefault here that attempts to determine app-specific palettes that are currently set, and switch to their oppositeschemecounterparts if available. You could still explicitly provideanyto ensure you just isolate theschemeswitch, butautocould allow something like a dark to light switch that applies to gnome (only supports scheme), changes kitty to "tone4-light" (a light counterpart the currently set palette is available), and Discord remains the same (as a hypothetical app for which we've created a dark palette but no a light one)). I guess the main takeaway withany/autois the following: ifautocan resolve to the concrete option currently set for a given app, behave as if that option was given. Whenanyis provided (orautofails to infer a concrete setting), isolate that property (eitherschemeorpalette) and ensure it doesn't change (even when another might, and doing so by only matching theme files that have actually usedany, indicating they actually deliver on the agreed upon behavior here). - If neither are given, (depending on what we decide), both would be
autoand should do nothing (simply determine theschemeandpalettecurrently set, requiring no updates). If both areany, this should also do nothing;anyis meant to "freeze" that property, so we'd just be freezing both of the possible variables. One or both of these options could serve as a meaningful refresh, however, either re-symlinking the relevant/expected files and/or calling the refresh commands for each apps to ensure expected settings are freshly applied.
- If specific
- Config TOML accepts either
config_dirorconfig_map, nothing else and only one of the two. - Refresh scripts should likely specify a shell shabang at the top of the file
appscan serve as a dotfiles folder- Support symlinking whole folders?
anymight prefer to match configs with none over specific options, but will match any