I have a laptop with Fedora 41 KDE spin installed, onto which I’ve installed Sway. While for the most part everything works fine, one problem I’ve been running into is that when I reload my config, tray disappears. The rest of the bar is present, just the tray is gone (the little section with wifi/bluetooth/minimized applications/etc). This happens whether or not I’ve modified my config file. I’ve tried moving tray to the left or center section but it doesn’t make a difference. And killing waybar and starting it manually doesn’t fix it. The only thing that brings my tray back is rebooting, and it’s gone as soon as I do another config reload.
Is there anything I can do to stop this from happening? Or at least is there something I can do to make it come back without rebooting?
I’m reloading with $mod+shift+c, which I believe reloads both since the keybind is set in sway config (bindsym $mod+Shift+c reload) but it also reloads waybar’s configuration.
I meant reload (default binding of $mod+ctrl+c). I’m using my own local configs in ~/.config/sway/ and ~/.config/waybar that are just the prepackaged configurations from sway-config-fedora which I’ve been adjusting for my own requirements.
I suspect that because the tray is a separate process forked from the (original) waybar instance, it gets lost when only the parent (Sway) gets renewed. Waybar would have to be fully restarted in that case.
I previously tried killing and restarting waybar which didn’t help, and I don’t have any keybinds set for $mod+ctrl+c (unless that’s a nonconfigurable default? It doesn’t appear to do anything though).
I do notice that it seems to only happen after I’ve been logged in for a little while. If I reboot and try reloading in the first 5-10 minutes, the tray comes back like normal. But after it’s been sitting for a while (half an hour or so?) the problem starts happening.
I see this error in the log which shows up as soon as I hit the reload keybind. I’m not sure if it’s related or not.
[error] Host: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: No such object path ‘/StatusNotifierWatcher’
“Restart” in sway restarts sway, in particular it restarts processes which sway starts on startup. This is what you may want to use to restart sway and waybar.
Bindings differ, of course.
If you just want to reload the (way)bar you can killall -SIGUSR1 waybar.
I remember that setting up the tray was finicky with swaybar, but I didn’t have to use special settings with waybar’s tray module.
Note that you can start waybar on the commandline (terminal) and watch its output.