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

Implement a configuration file (e.g. for keybindings, etc.) #46

Closed
jfaltis opened this issue Oct 11, 2019 · 2 comments · Fixed by #112
Closed

Implement a configuration file (e.g. for keybindings, etc.) #46

jfaltis opened this issue Oct 11, 2019 · 2 comments · Fixed by #112

Comments

@jfaltis
Copy link
Contributor

jfaltis commented Oct 11, 2019

Create a config for easy customization of keybindings, program behaviour, etc. It could be located at $HOME/.config/spotify-tui/config.yml.

The current client configurations could be moved into this configuration too.
E.g

---
client:
  - client_id:
  - client_secret:
  - device_id:
  
keybindings:
  - left: h
  - down: j
  - up: k
  - right: l
@Rigellute
Copy link
Owner

This could be an interesting one.

Are there any bindings that don't currently work for you?

@jfaltis
Copy link
Contributor Author

jfaltis commented Oct 15, 2019

I think the current bindings are very nice and appeal to the majority of users. But there are also users who might have other preferences (as you could see about the bindings for playback control #16). Having a config for keybindings would be a nice addition for users who are into customizing everything as much as they can.

My suggestion would be that the default settings/bindings (which satisfy the most users) stay in the source code and the config which is being read can overwrite certain bindings. That way the config file doesn't contain all bindings but only the ones users want to change.

Currently I would not merge the client settings into the config yet and get rid of the client.yml. I think it would be nice if you could set these in the config.yml but the client.yml should stay to make it less of a hassle for users who sync their dotfiles with other computers. This is stuff for a later PR anyways.

I think I would rename src/config.rs to src/client_config.rs and add a src/app_config.rs for keybindings and preferences (etc.).

What do you think?

zacklukem added a commit to zacklukem/spotify-tui that referenced this issue Oct 25, 2019
This will add a `config.yml` file along side the `client.yml` file which
will allow the user to configure custom keybindings.  Currently this
commit only covers global keybindings and not per-screen keybindings but
this could be added in the future. This commit also doesn't currently
allow for overriding default navigation keys (hjkl etc.) but that could
also be added later.

Resolves: Rigellute#46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants