[feature request] foot.ini: add include/import directive #555

Closed
opened 5 months ago by tinywrkb · 5 comments

Having an include directive in the config to load other config files is useful for quickly switching themes, dark/light mode without having to use a template processor for re-generating the whole config.

This probably would be useful for theme generation automation tools like pywall.

A relevant feature that would be nice to have is config files watcher and automatically applying the settings to the open terminal windows.

Having an include directive in the config to load other config files is useful for quickly switching themes, dark/light mode without having to use a template processor for re-generating the whole config. This probably would be useful for theme generation automation tools like pywall. A relevant feature that would be nice to have is config files watcher and automatically applying the settings to the open terminal windows.
Owner

This probably would be useful for theme generation automation tools like pywall.

Would be useful for themes. Period ;)

A relevant feature that would be nice to have is config files watcher and automatically applying the settings to the open terminal windows.

Ah, this one... It's never really been brought up before, but I've been expecting it to be requested at some point, and have tried to make up my mind about it.

My personal view, for now, is that this is out of scope for foot. I suspect a nontrivial amount of code will be needed to handle dynamic reconfiguration, which doesn't quite mesh with foot's goal of being lightweight. That said, I will consider contributions that prove me wrong ;)

> This probably would be useful for theme generation automation tools like pywall. Would be useful for themes. Period ;) > A relevant feature that would be nice to have is config files watcher and automatically applying the settings to the open terminal windows. Ah, this one... It's never really been brought up before, but I've been expecting it to be requested at some point, and have tried to make up my mind about it. My personal view, for now, is that this is out of scope for foot. I suspect a nontrivial amount of code will be needed to handle dynamic reconfiguration, which doesn't quite mesh with foot's goal of being lightweight. That said, I will consider contributions that prove me wrong ;)
dnkl added the
enhancement
label 5 months ago

A relevant feature that would be nice to have is config files watcher and automatically applying the settings to the open terminal windows.

Personally I'm against this. It is overengineering and breaks KISS principle. Really don't like this feature in alacritty and even more don't like periodic cheking for updated version in kitty. Simple things are beautiful. Just my opinion)

> A relevant feature that would be nice to have is config files watcher and automatically applying the settings to the open terminal windows. Personally I'm against this. It is overengineering and breaks KISS principle. Really don't like this feature in alacritty and even more don't like periodic cheking for updated version in kitty. Simple things are beautiful. Just my opinion)
dnkl added this to the 1.8.0 milestone 5 months ago
dnkl referenced this issue from a commit 5 months ago
Poster

Thanks for the replies and for pushing this forward.

@cglogic I understand your objection so I want to add that I personally only care about being able to reload the theme or specifically switch between dark and light variants without being forced to close the terminal window and open a new one.
This is the only reason why I suggested watching the config.
I suspect that other users like myself who care about their eyes switch between theme variants and would apperciate such feature.

I should've opened a dedicated bug report but I predicted that there will be pushback against it so I mentioned it in passing.
Should I open a feature request for dark & light theme variants setting and a dark mode toggle keybind?

Thanks for the replies and for pushing this forward. @cglogic I understand your objection so I want to add that I personally only care about being able to reload the theme or specifically switch between dark and light variants without being forced to close the terminal window and open a new one. This is the only reason why I suggested watching the config. I suspect that other users like myself who care about their eyes switch between theme variants and would apperciate such feature. I should've opened a dedicated bug report but I predicted that there will be pushback against it so I mentioned it in passing. Should I open a feature request for dark & light theme variants setting and a dark mode toggle keybind?
dnkl closed this issue 5 months ago
dnkl referenced this issue from a commit 5 months ago
Owner

I would suggest using either a utility like pywal, or a script of your own, that uses OSC sequences to change the color scheme at run-time. The script can either update only the instance its running in, or broadcast it to all PTYs (thus updating all open terminal windows).

It should also be possible to bind it to a key combo in foot. The trick then would be figuring out which PTY the terminal is bound to.

Of course, if you want to broadcast to all PTYs, an easier solution is to bind it to a global key in your compositor.

The lastest foot version in git supports changing all colors in the 256 palette (this includes the 8+8 base colors), the foreground/background colors, the highlight/selection colors, cursor colors, and background alpha.

I would suggest using either a utility like pywal, or a script of your own, that uses OSC sequences to change the color scheme at run-time. The script can either update only the instance its running in, or broadcast it to all PTYs (thus updating all open terminal windows). It should also be possible to bind it to a key combo in foot. The trick then would be figuring out which PTY the terminal is bound to. Of course, if you want to broadcast to all PTYs, an easier solution is to bind it to a global key in your compositor. The lastest foot version in git supports changing all colors in the 256 palette (this includes the 8+8 base colors), the foreground/background colors, the highlight/selection colors, cursor colors, and background alpha.
Poster

@dnkl the OSC sequences solution sounds great, it should fit my needs. I'm looking forward for the next release.
Thanks for the detailed answer!

@dnkl the OSC sequences solution sounds great, it should fit my needs. I'm looking forward for the next release. Thanks for the detailed answer!
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.