Any alternative to exec_always from sway?
I added Kanshi to autostart kanshi = kanshi and it works fine until I change a setting in the Wayfire config. I also experienced this issue in sway https://github.com/emersion/kanshi/issues/43. To fix this, I ran this script in exec_always:
killall -9 kanshi
while pgrep -u $UID -x kanshi >/dev/null; do sleep 1; done
kanshi &
This isn't possible here because of the lack of exec_always. Is there any other alternative to exec_always or any other way?
Wayfire version 0.8.0-e510e70f (May 26 2021, branch 'master')
What does exec_always do in sway?
FWIW, the kanshi problem will also be solved, but in a different way. I'm envisioning an option which tells Wayfire: 'as soon as an external entity has configured the outputs, do not ever read their configuration from the config file'. This is not implemented yet, however.
@ammen99 the command executes a command on config reload while the normal exec runs once on start
@ErikReider Can you elaborate on what you mean by config reload? This may have different meanings depending on the compositor.
@soreau I'm not sure about what sway exactly does but you're able to reload the conf file while waybar does this automatically on save
@ErikReider Can you elaborate on what you mean by config reload? This may have different meanings depending on the compositor.
reload-config is a signal in Wayfire :)
This is the general bug where Wayfire resets the output config set by an external application (kanshi, wdisplays, etc.) when the config file is changed and Wayfire re-parses the config file.
@ammen99 what's weird is that I've removed all of the output lines in the config. It's probably using a default value. Weird that both sway and wayfire have this issue
I added Kanshi to autostart
kanshi = kanshiand it works fine until I change a setting in the Wayfire config.
Can you say what stops working when the problem happens? What happens with kanshi that makes you think there is a problem?
This is the general bug where Wayfire resets the output config set by an external application (kanshi, wdisplays, etc.) when the config file is changed and Wayfire re-parses the config file.
Ah, this bug^^
For this to work we should get rid of output config in wayfire.ini altogether and use default output configuration when wayfire starts without configuration, and kanshi instead when it's available.
For this to work we should get rid of output config in wayfire.ini altogether and use default output configuration when wayfire starts without configuration, and kanshi instead when it's available.
Getting rid of wayfire.ini configurarion is nowhere near good enough. Kanshi does not support mirrored outputs, custom modelines and potentially more things we'll add in the future.
https://github.com/WayfireWM/wayfire/issues/1201#issuecomment-851475688 provides a much better fix, because it still allows for these use-cases where kanshi is not enough.
Getting rid of wayfire.ini configurarion is nowhere near good enough. Kanshi does not support mirrored outputs, custom modelines and potentially more things we'll add in the future.
Sounds like opportunities for improvement in wlr-output-management-unstable protocol.
gde-gnome-bridge depends on setting display options through wf-config currently too! Would rather not have to rewrite all that code just yet :)
But I agree wlr-output-management should be extended. Also, I'm pretty sure it already supports mirroring: just set both outputs to the same x,y position
@ErikReider try the option described in #1202
But I agree wlr-output-management should be extended. Also, I'm pretty sure it already supports mirroring: just set both outputs to the same x,y position
Not really. https://github.com/swaywm/wlr-protocols/issues/101
We could special-case this by saying "equal x/y == mirrored", but this is not described in the protocol, and also a bit counter-intuitive IMO.
Putting low-priority as the kanshi problem was fixed in a different way, and we don't really have a use-case for exec_always
Putting low-priority as the kanshi problem was fixed in a different way, and we don't really have a use-case for
exec_always
There's a valid use-case for exec_always, it lets your autostart script run every time you reload the config. The alternative is monitoring wayfire.ini for changes and restarting the script, but that's not good.
exec-always ~/.scripts/autostart.sh would mean the autostart.sh would run again every wayfire.ini modification
It's an old i3 wm pattern, you've got exec_always and exec. Sway is essentially i3 for Wayland, and some compositors take inspiration from Sway too. So this exec-always design still makes sense for many end users.
If you have a workaround, then the issue is solved. Or just say the compositor won't support it, some compositors don't have that feature anyway :P