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
Reload config file without restart #1292
Comments
Having reloading for some options but not others is not worth it in my opinion, since that is just confusing. No one will be able to keep track of which options change and which do not. And implementing it for all options is waaay too much work. If you are willing to implement it for all options, then go ahead, I wont refuse the patch, but less than that is not a good idea, IMO. If you want to implement it, you will basically need to carefully track each option to see how/where it is used and have the reload code change it accordingly. This is basically a lot of boring book-keeping. |
Both iTerm2 and Alacritty support most config options or settings in case of iTerm2 to be changed without a restart but they don't support that with all of them. Why do you think that it's so confusing? As long as it is well documented, which ones require a restart and which ones don't, it should be ok IMHO. |
Because there is no way for an end user to know to expect whether config And not to mention that the config options that most people really want |
+1 I think the entire world wants reloadable config. |
I think at least having a command to reload keyboard mappings from a config file would be enough, since that wouldn't confuse anyone, but would still be useful for the majority of times you'd want to reload the config for. |
What if the reload handles only options that have simple side effects, such as margin and padding? @kovidgoyal Would it be possible/ideal to achieve this through a kitten? Should I research into that? Thanks! |
You can implement it in a kitten or using the remote control facility as |
Not sure if i should be asking here, given that the current status is close, but how is the progress going on this feature? Is there a workaround for similar results (such as, having your window manager close and open kitty at the same time such that it looked as if it were reloaded) while this feature is still being developed? |
Nothing changed regarding the progress of this feature. |
Ah right, well hopefully such feature is implemented in the future, as it can be very handy, in my case to switch color schemes on the fly. Thanks! |
This feature is not being developed. You can control various aspects of |
Yeah, colors can be changed using the remote control protocol. See https://github.com/dexpota/kitty-themes#previews for an example. |
I can see how it would be difficult to support auto-reloading of all configuration options, and I also understand that "some work, others don't" isn't great, but I do think that "keyboard mappings auto-reload, nothing else" is perfectly explainable. I'm not making a judgement on the complexity to make this work out of the box, or even the priority of such a feature compared to others on the list (or the desire for any contributor to actually implement it, for that matter), but I did want to add my vote for such a feature, as it greatly improves the workflow while tweaking your Kitty settings. |
I came up with a hack to reload the config with a tiny kitten. DISCLAIMER: I bet that this doesn't work for all config settings, and for all I know it might crash your kitty if you change the "wrong" setting. However, it works for changing keyboard mappings, which was what I cared about. Use at your own risk.
Also note that it passes an empty list to To use it, save it to
|
+1 to this. I'd love to be able to have a set of "reloadable" options, like e.g. font face, padding/margin, and such, without needing a full kitty restart. My work flow is to start kitty, open 2-3 tabs with at least a couple splits each (servers, compilers, and stuff), and then every time I want to change a kitty setting I need to kill all processes and restart everything. Do you think it would be viable to use kittens to reload individual options (like, e.g., |
In general no. Options are used in both python and C and while kittens |
FYI, in current master there is now a remote control command to adjust margins and padding per window. |
umm... @kovidgoyal , I tried as @i-tub suggested....... EDIT: Nevermind, I found another, cleaner way to do what I wanted. |
Could you share that cleaner way? |
@ThatOneCalculator I just wanted to change the colors, not reload the whole config file. It should be in the Remote control section of the docs |
I just discovered kitty, and my use case for this would be to be able to edit something in the config file and then immediately see the results (and having them persisted as well for future use). My workaround for this (using macOS) is to configure
Combined with vim set up so that it will open the file in the position I left it (see |
This can be accomplished without having to first enable remote control, using the kitty shell window:
However, unfortunately, it doesn't work for new panels you open in the same session, only existing. |
Never knew how much I liked this feature (in Alacritty) until I had to do without it. |
It should work in master and in the next version, see the commit that closed this issue. |
In latest releases Ctrl+Shfit+F5 reloads the config as per the commit mentioned above. |
What do you think of the possibility of reloading the config file without restarting kitty? While this may be a little difficult for some options, like those which are compiled into the shader code at startup, it should be fairly simple for some options that are just copied to some internal variable. I'm not asking to make most options reloadable, I'd just like to start with a couple easy ones.
What do you think about this idea? If you're ok with this, I could make a pull request but I don't know where to start, maybe you can give me a couple tips.
I've read #343, #635 and #684 but I am not quite satisfied with your answer that it's too much work, maybe you change your mind if someone else (me) is willing to implement it.
The text was updated successfully, but these errors were encountered: