Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration (via CLI or file) #1

Open
NuckChorris opened this issue Apr 10, 2014 · 12 comments
Open

Configuration (via CLI or file) #1

NuckChorris opened this issue Apr 10, 2014 · 12 comments

Comments

@NuckChorris
Copy link
Member

We should add a system to handle configuration settings from CLI or file (maybe environment variable?)

The following options are suggested:

  • --dots=[integer] — the number of dots to display
@ghost
Copy link

ghost commented Apr 10, 2014

Nah, the number of dots should be calculated. Make the width of each dot height * 0.75 (so they're not square, since that looks bad) and then calculate the number of dots that should be displayed in the available space.

@NuckChorris
Copy link
Member Author

While I like the thought of not adding configuration (in fact, I think I might implement that at least as a default), this could be useful in some cases as an override. for example in #2 I mention the possibility of expanding it to OTP, which is always 6 digits.

@ghost
Copy link

ghost commented Apr 10, 2014

Yeah, having an override would be useful. For config, could use json-glib or such?

@NuckChorris
Copy link
Member Author

It's either JSON or INI, since we have both with GLib. No gconf or dconf.

@ghost
Copy link

ghost commented Apr 10, 2014

I think JSON, then. INI is horribad.

@NuckChorris
Copy link
Member Author

INI is shit, yeah. But JSON is definitely not an option if json-glib can't pretty-print it into the file.

@ghost
Copy link

ghost commented Apr 10, 2014

I thought it could? Hm.

@NuckChorris
Copy link
Member Author

If it can, we're good. The next question is where the fuck do we cram such a thing, and do we need a config file at all? Most use-cases of the dots thing can set a flag. Maybe environment variable or flag?

@NuckChorris
Copy link
Member Author

glib-json's API looks like shit, not that Glib.KeyFile looks much better.

@ghost
Copy link

ghost commented Apr 10, 2014

Uh... I don't actually know if this will need one. It probably won't. But config file format is a good discussion to have anyway, especially for future projects

@NuckChorris
Copy link
Member Author

Definitely. For public record, everything sucks. But at least it's not gconf/dconf.

@ghost
Copy link

ghost commented Apr 10, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant