[GH-ISSUE #219] [Onboarding] Start ironbar with default config if one doesn't exist #8528

Closed
opened 2026-05-23 03:52:38 +01:00 by JakeStanger · 2 comments
Owner

Originally created by @donovanglover on GitHub (Jul 3, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/219

Is your feature request related to a problem? Please describe.
Currently when a user tries ironbar for the first time they're greeted with an error message.

Describe the solution you'd like
Ironbar should create a default config if one doesn't exist and start as expected.

Describe alternatives you've considered
Alternatively show a more helpful error message to the user, possibly asking them to run a command to copy an example config.

Originally created by @donovanglover on GitHub (Jul 3, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/219 **Is your feature request related to a problem? Please describe.** Currently when a user tries `ironbar` for the first time they're greeted with an error message. **Describe the solution you'd like** Ironbar should create a default config if one doesn't exist and start as expected. **Describe alternatives you've considered** Alternatively show a more helpful error message to the user, possibly asking them to run a command to copy an example config.
Author
Owner

@JakeStanger commented on GitHub (Jul 3, 2023):

I've held off this so far for a couple of reasons:

  • Firstly, the general approach I've taken with Ironbar, especially in regards to config, is to be pretty un-opinionated. Any base configuration I provide is going to be different to what a good proportion of users want. This also includes the config file format.
  • Secondly, I don't want to jump the gun. It's still (fairly) early days and adding a default config becomes yet another thing to maintain and consider with each update and any breaking changes.

That said, two more things:

  • The fact that it errors on startup currently is not the intended behaviour. Ironbar should without a config, and each module should work (even if they display nothing) with no configuration other than type. I'd consider any exceptions to that a bug, so I'll get the "File not found" issue sorted as a priority.
  • I do fully understand that for most new users, having something display is a nicer experience than an empty bar you have to set up yourself.

It may be, unless it turns out there's a strong consensus one way or the other, that I'll handle this in multiple phases, so that something is at least displayed when unconfigured.

Short-term, perhaps the answer is to have a very simple default config that's loaded when no file exists. This could just contain the clock module and a label informing you to configure it. Some messages can also be written to the console with details.

Long term I'd like to have some kind of interactive config builder, either through the CLI, or maybe even a UI of its own (we can dream!).

<!-- gh-comment-id:1619013758 --> @JakeStanger commented on GitHub (Jul 3, 2023): I've held off this so far for a couple of reasons: - Firstly, the general approach I've taken with Ironbar, especially in regards to config, is to be pretty un-opinionated. Any base configuration I provide is going to be different to what a good proportion of users want. This also includes the config file format. - Secondly, I don't want to jump the gun. It's still (fairly) early days and adding a default config becomes yet another thing to maintain and consider with each update and any breaking changes. That said, two more things: - The fact that it errors on startup currently is not the intended behaviour. Ironbar *should* without a config, and each module *should* work (even if they display nothing) with no configuration other than `type`. I'd consider any exceptions to that a bug, so I'll get the "File not found" issue sorted as a priority. - I do fully understand that for most new users, having *something* display is a nicer experience than an empty bar you have to set up yourself. It may be, unless it turns out there's a strong consensus one way or the other, that I'll handle this in multiple phases, so that something is at least displayed when unconfigured. Short-term, perhaps the answer is to have a very simple default config that's loaded when no file exists. This could just contain the `clock` module and a label informing you to configure it. Some messages can also be written to the console with details. Long term I'd like to have some kind of interactive config builder, either through the CLI, or maybe even a UI of its own (we can dream!).
Author
Owner

@JakeStanger commented on GitHub (Jul 3, 2023):

The linked PR handles this well enough for now I think - it includes a hard-coded config, so it's not going to get forgotten in any breaking changes etc. It provides a bare minimum (focused + clock) and informs the user it's the default config. Some logging has also been added with a link to the wiki to make this obvious.

<!-- gh-comment-id:1619185880 --> @JakeStanger commented on GitHub (Jul 3, 2023): The linked PR handles this well enough for now I think - it includes a hard-coded config, so it's not going to get forgotten in any breaking changes etc. It provides a bare minimum (focused + clock) and informs the user it's the default config. Some logging has also been added with a link to the wiki to make this obvious.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#8528
No description provided.