omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Waybar duplication

Open Merovex opened this issue 1 year ago • 17 comments

PXL_20250730_092007617.jpg

When I move between workspaces, I'm starting to get multiple waybars. Image above. I can reset by re-selecting my current theme.

This has happened on a couple themes, so I don't think it is theme specific. It only emerged yesterday when I updated Omarchy.

Merovex avatar Jul 30 '25 09:07 Merovex

pkill -SIGUSR2 waybar or try to launch omarchy-refresh-waybar BEWARE this resets your customization (they will be backed up)

I cannot reproduce this, switching themes or moving between workspaces don't affect the quantity of waybars. Have you customized something that introduced a bug?

ludo237 avatar Jul 30 '25 09:07 ludo237

which version show up when you run omarchy command?

sailoz avatar Jul 30 '25 09:07 sailoz

v.1.7.0

Edit: Also, it appears to happen after the lock screen. I now have 11 stacked instances. Edit 2: I have not changed anything in the waybar.

Merovex avatar Jul 30 '25 09:07 Merovex

I'm also having that issue.

Note: I'm using two different pc with one monitor, so anytime I switch to the other system, the system with Omarchy installed goes locked. Then when I switch back, I find the waybar duplicated like that. I haven't done any customization since I installed Omarchy.

image

Mujhtech avatar Jul 30 '25 13:07 Mujhtech

@Merovex Are you using multiple screens? Are you disconnecting screens? We solved this on returning from the lock screen with a SIGUSR2 refresh to waybar, but it's kinda crude! Would be best to fix this at the root.

dhh avatar Jul 30 '25 14:07 dhh

Hey, @dhh. I am running a single screen, and not disconnecting. Running SER8; Viewsonic monitor; HDMI. I have speakers connected via AUX. My setup is Vanilla Omarchy apart from volume controls.

I didn't notice this until v.1.7.0.

I've seen some other odd behavior on unlock (screen compressed to left 75% of screen, fixed by toggling workspace).

I'll keep an eye on it. There might be an app (e.g. VSC) that's triggering this behavior.

Merovex avatar Jul 30 '25 14:07 Merovex

Hmm! Very strange. Until we figure it out, you can add this to your .config/hypr/hyprland.conf:

bind = SUPER SHIFT, W, exec, pkill -SIGUSR2 waybar

That will relaunch your Waybar and kill the stacking. But of course this shouldn't be needed!

dhh avatar Jul 30 '25 14:07 dhh

Wilco. Thanks.

Merovex avatar Jul 30 '25 14:07 Merovex

Have the same behavior ( stacked waybars ). I had this issue also before update to current v1.7.0.

Issue occurs only when i am switching sources on my monitor not when coming back from lock screen or suspend mode.

My setup is 1 34 UW Monitor connected via HDMI spliter to 2 machines. When i switch source for example to my Win machine and comes back to Omarchy - waybar is stacked.

I tried this on my laptop where i have Omarchy as well. When i connect external monitor and keep both on ( laptop and external ), after switching source on External and coming back only External monitor is having stacked Waybar but laptop screen is ok.

If you need any sysinfo let me know.

rmrten avatar Jul 30 '25 15:07 rmrten

Seems like we need to open a ticket on the waybar Github: https://github.com/Alexays/Waybar. Could you guys get something going on there? So we can get this solved proper. Thanks!

dhh avatar Jul 30 '25 15:07 dhh

Seems like we need to open a ticket on the waybar Github: https://github.com/Alexays/Waybar. Could you guys get something going on there? So we can get this solved proper. Thanks!

I will open ticket and then post link ref here.

rmrten avatar Jul 30 '25 15:07 rmrten

Waybar Github Issue ticket:

https://github.com/Alexays/Waybar/issues/4336

lets hope they will look at it - lots of open tickets over there ;)

rmrten avatar Jul 30 '25 15:07 rmrten

@dhh it looks like the usage of SIGUSR2 exacerbates the problem instead of always fixing it. Perhaps using killall waybar and exec waybar is a better way?

see: https://github.com/Alexays/Waybar/issues/3344#issuecomment-2390661508

JaxonWright avatar Aug 01 '25 15:08 JaxonWright

We tried that already in 1.7.0. It didn't make a difference.

dhh avatar Aug 01 '25 15:08 dhh

Update: I upgraded to v1.8.0, and did something I rarely ever do. I rebooted.

Since then, no Waybar duplication. I don't think that's the right fix.

Merovex avatar Aug 01 '25 19:08 Merovex

Digging through the thread with the original comment from the author https://github.com/Alexays/Waybar/issues/3344#issuecomment-2390661508 a bit more, the issue appears to be caused and exacerbated by the use of SIGUSR2. This aligns with my own experiences too.

In v1.7.0 we did indeed switch to killall waybar / exec waybar in some places but omarchy-theme-set was still using pkill -SIGUSR2 waybar to refresh Waybar. This triggers the issue to start appearing after you change your theme. https://github.com/basecamp/omarchy/blob/b7cbffc91da1fee232026501216a590a2bf588d2/bin/omarchy-theme-set#L40

This aligns with my experiencing the issue getting worse any time I've worked on the theme switcher making this worse and ultimately getting to a 100% full screen of Waybars. 😅

The latest solution proposed by a user in the comment thread https://github.com/Alexays/Waybar/issues/3344#issuecomment-3048824798 is similar to what we're doing now but they kill Waybar before going to sleep / lock vs on resume.

listener {
    timeout = 295
    on-timeout = killall waybar
    on-resume = exec waybar
}

This may be worth giving a try as I have experienced a few times when I have many stacks of Waybars that the kill on resume can still leave my windows in a bit of an oddly sized state until I switch workspaces.

To solve this once and for all, it seems we need to remove all instances of pkill -SIGUSR2 waybar from Omarchy in favor of something like killall waybar && sleep 0.5 && waybar & disown. Even then, we may still want to have the kill on timeout for good measure as a backup.

I'll work up a PR with this in it unless someone gets to it before me.

ryanrhughes avatar Aug 02 '25 02:08 ryanrhughes

Day two after the reboot. Unlocked, and briefly saw 3-4 waybars that appear to have been automatically killed and after a second replaced with a single bar. v1.8.0.

Merovex avatar Aug 02 '25 15:08 Merovex