I'm trying to create a script that automatically toggles ST from light to dark mode, by changing ~/.xresources and reloading it. This works perfect for new ST instances, but it doesn't reload existing ST windows.
Looking at https://st.suckless.org/patches/xresources-with-reload-signal/ , it should be relatively trivial to implement a signal to reload the resources, but my limited C knowledge is failing me. If you're open to add such support to this fork, would you mind helping me with this issue? :pray:
I've created the patch below and I've confirmed that resource_load() is called for all values when a USR1 signal is sent to the program. However, the terminal doesn't update its colors. I guess this means I'm either not reloading the x resources (and thus updating with the old values) or forcing a redraw incorrectly?
I'm trying to create a script that automatically toggles ST from light to dark mode, by changing
~/.xresources
and reloading it. This works perfect for new ST instances, but it doesn't reload existing ST windows.Looking at https://st.suckless.org/patches/xresources-with-reload-signal/ , it should be relatively trivial to implement a signal to reload the resources, but my limited C knowledge is failing me. If you're open to add such support to this fork, would you mind helping me with this issue? :pray:
I've created the patch below and I've confirmed that
resource_load()
is called for all values when a USR1 signal is sent to the program. However, the terminal doesn't update its colors. I guess this means I'm either not reloading the x resources (and thus updating with the old values) or forcing a redraw incorrectly?