-
Notifications
You must be signed in to change notification settings - Fork 22
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
[FEAT] add flag to remember the latest used editor configuration #34
Comments
great idea! have you seen #30? We should add default colour and default size there! would this already solve your use case? Currently there is no such notion as "state". Satty is basically stateless as all config is passed to it at startup. The configuration file in #30 would be a way to not only describe the initial state but - when writable - also to persist state. Imho that might be the best approach. We should avoid unpredictable options, i.e. specifying A but getting B... |
not entirely since what I'd really like is for the editor to remember the last setting used. This is something that other tools like flameshot do. Having a config file to set the color and size would partially help, but it won't be a nice UX since it'd be very painful having to go to that file each time I want to change them. |
I think the way forward will be to implement the configuration file as a way of persisting state and then use one of the toml editor crates to edit that file when the remember last state option is set |
yes sure, this makes sense. How do you prefer to move forward about this? Can I help #30 to move forward somehow? |
I thought about this again and had some specific doubts about us touching the users config file and also systems where the configuration file is immutable. So I asked the NixOS community over at Reddit [0] and the answers are very useful .. let me summarise
For us that boils down to:
|
Awesome, great. I can start with a draft PR and we can continue iterating there. |
I would prefer the following behaviour/spec
|
great, looking forward! |
I implemented config file handling in #38. It pushes the config into a global variable called |
I generally find myself changing the default color and size very often and I really wish if
satty
could just remember the latest setting used. I guess the most straight forward approach to do this would be to persist the editor config somewhere and then read it every timesatty
is called.For backwards compatibility purposes I was thinking about adding a new flag for this like
--persist-editor-cfg
.WDYT? would a PR be useful?
The text was updated successfully, but these errors were encountered: