in my config file exists…
exec-once = zsh -c 'sleep 1' && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar && waybar
Why? Because waybar crashes sometimes when I turn my monitor off/on, I documented this here: https://github.com/Alexays/Waybar/issues/3047
…this opens waybar if it crashes… and if that crashes, it opens another waybar
Is there a less ridiculous way of making waybar open every time when waybar crashes, giving me better fault tolerance?
This would have the additional benefit of collecting output files for future debugging. I’m not sure if systemd units can run Wayland applications, though.
Putting something like this should probably work, though?
[Unit] Description=Waybar PartOf=graphical-session.target After=graphical-session.target [Service] Type=exec Restart=on-failure ExecStart=waybar [Install] WantedBy=graphical-session.target