contour icon indicating copy to clipboard operation
contour copied to clipboard

Initial configuration wizard

Open whisperity opened this issue 3 years ago • 0 comments
trafficstars

Given the plethora of configurable and perhaps-important-for-some feature requests (like default shell, history size, #495, #645, permission bits, etc.), I'd like to see an initial setup wizard, similar to that of Zsh, OMZ or P9k/P10k executed when Contour is started for a user the first time.

It shouldn't ask for EVERY minor configuration from the user, but if a config file is not found, it should ask for the user's input and spawn the config file that way.

The proposed approach would be to hardcode, in Contour's code, a type system and a description field for each (important?) config variable, from which the config file can be automatically generated. And the wizard would ask automatically if a config option is flagged, let's say bool InteractiveConfigureAtFirstStart or something...

Also, it would be important to implement the wizard as a terminal application, and not something graphically clicky. It could even be its own separate binary, contour-config, supplied with the release.

  1. If no contour.yaml is found, register this fact, and drop the default configuration into the appropriate location.
  2. Start a default shell and immediately run contour-config.

Users could then re-run contour-config interactively any point later in time, as long as contour-config doesn't show the user the hardcoded defaults, or shows both the hardcoded default and the CURRENT config value from the user's actual config file.

whisperity avatar Apr 25 '22 07:04 whisperity