Skip to content

hyprbars cause waybar to shift in certain conditions #604

@oliwoli

Description

@oliwoli

Waybar used as a top bar has some extra space above, as if it's leaving space for hyprbars.
I'm speculating that the shift is happening because waybar starts before hyprpm reload finishes. And maybe there's a race condition happening or so.

Here's part of my hyprland.conf

exec-once = hyprpm reload
exec-once = dunst
exec-once = hypridle
# some more execs here, removed to simplify
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = sleep 3 && $HOME/.config/hypr/scripts/random-wallpaper.sh

exec-once = hyprsunset
exec-once = waybar

It's happening persistently when rebooting / first initialization. Running hyprctl reload fixes it. But adding the command at the end of my hyprland.conf didn't fix it. Maybe doing something like
exec: sleep 2 & hyprctl reload would work but that felt too janky for me.

My current fix is to add this windowrule:

windowrule {
  name = waybar-fix
  match:title = "" # waybar doesn't have a title (?)
  no_blur = true
  no_dim = true
  no_shadow = true
  rounding = 0
  rounding_power = 0
  immediate = true
  opaque = true
  no_anim = true
  decorate = false
  hyprbars:no_bar = true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions