cabal-club / cabal-client

interface for writing peer-to-peer chat clients
GNU General Public License v3.0
95 stars 14 forks source link

Idea: A method for storing / loading general client settings #3

Open cinnamon-bun opened 5 years ago

cinnamon-bun commented 5 years ago

Something like

client.getSettings()
client.saveSettings(settingsObject)

Where settingsObject is an arbitrary JSONable object.

This would be for local client settings like notification options, color themes or light mode vs dark mode, auto-emojification, etc.

hackergrrl commented 4 years ago

We now have ~/.cabal/v1/config.yaml, but cabal-client doesn't expose it yet (clients are accessing it directly). This seems like a perfect place to expose settings like this.

cblgh commented 4 years ago

@noffle that's the cli config file. i remember @nikolaiwarner wanting to keep cli and desktop configs separate

other than that, yeah i've been thinking along similar lines of re-using ~/.cabal/v1/config.yml :)

hackergrrl commented 4 years ago

@nikolaiwarner What was the motivation for that? Could we consolidate it by having 'cli:' and 'desktop:' subkeys?

nikolaiwarner commented 4 years ago

I'm cool with consolidating. I think I advocated for them be as similar as possible so config files could be interchangeable and sharable.

Also, Desktop stores its config as json atm.

Would future client softwares register their preferred subkey with cabal-client?