-
-
Notifications
You must be signed in to change notification settings - Fork 644
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
Add: Config file #224
Add: Config file #224
Conversation
- create config struct - create config errors - create macro struct TODO create --config option for the file
* use a simple platform dependent config location `ProjectDir` * deserialise from yaml iterate more on config format, maybe be more verbose? * make keybinds a tuple struct same size as newtype, but makes impls easier to add * merge optionally multiple keys for one keybinding easier configuration
First of all, very nice work @a-kenji !! And good call on getting early feedback on this - a lot of this feature is about user experience and I agree this is a good thing to discuss before implementing. I'm mostly going to comment on the UX side of things (as well as address your questions) for now:
Looking forward to iterate on this more and merge it. It's a super important feature and I feel it's in good hands. |
Thanks for the feedback! To:
|
log.txt should just be for debugging... any other instances in the codebase are remnants of a less stable time :)
We can talk about it when it's relevant, but IMO it would be better to unbind everything rather than specifying what you'd like to unbind. Otherwise config files will have to be updated every time we change the default keys.
Sounds good.
Cool.
I think as soon as you update the Help the status bar should be taken care of (maybe with some minor bugs that can be dealt with separately). |
Add key events documentation from termion to the README
Add a clean config option, which makes zellij not look for a default configuration file.
The default location is now correctly used again
@imsnif,
Ah, good to know! Is there a "user" facing logging system planned already? Or is that all the -debug flag?
Currently I put it as a flag Looking for default config file:
I will open an issue for that! I will also open an issue for the status bar. |
@imsnif had suggested I take a look at this, since I'd wanted to do this before when I had time. I have to say that I think it's great and cleaner than I think I'd have come up with. :) The main thing I wondered about are future enhancements (and what you thought about them):
|
Thank you @khs26 for the feedback!
I agree, there should be something done in that regard.
That is a good idea!
I think it is awesome, I thought about adding yet another default mode in order to be able to mimick tmux prefix keys. But allowing anyone to add a new mode, if they please is a more elegant way imo.
I would also have objections to that in its current state. Maybe not in the future. I think we try to get some good defaults for people so they can just start. It might make it harder for example if the config file is somehow wrongly formatted and they just want to work - but can't even get the defaults to work.
It is kind of planned I think, I think it would be a very welcome addition. |
Uses the default configuration for tests, in order to not mess up test cases with different configurations in the config file.
closes #169
This is not 100% finished, but it is ready to get more input - especially now that the default keybinding changes have gone through.
I started writing tests in the integration location, but it seemed maybe that is not the best location for these specific tests. I would need every single field and every function public for that to work. For now I put the tests under /ut/*_test.rs (for unit_tests) for now, would be happy about more input on a good location for them. I haven't finished writing all that I wanted to write for them yet.
Starting zellij without an option:
Should Starting zellij with --config file fail and log the error to stderr?
Or also log to file and use defaults?
Also the format changed now, because my initial idea of having a vec as a possible key in yaml is really uncomfortable to write and too error prone imo, so I settled on following format:
That way it is easy to specify multiple keys in succession , as well as bind multiple different keys to these actions at the same time.