undesktop / askpass

GTK3 passphrase dialog for SSH
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Configuration (via CLI or file) #1

Open NuckChorris opened 10 years ago

NuckChorris commented 10 years ago

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

The following options are suggested:

ghost commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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

NuckChorris commented 10 years ago

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

ghost commented 10 years ago

I think JSON, then. INI is horribad.

NuckChorris commented 10 years ago

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

ghost commented 10 years ago

I thought it could? Hm.

NuckChorris commented 10 years ago

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 commented 10 years ago

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

ghost commented 10 years ago

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 commented 10 years ago

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

ghost commented 10 years ago

:+1: