Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.28k stars 689 forks source link

waybar height changes to accomodate unicode emojis in window titles #2026

Open llyyr opened 1 year ago

llyyr commented 1 year ago

The height of the window title text sometimes causes waybar's height to increase (from 17px to 24px in this case). This messes with positioning with sway and such. There should be an option for the height to be fixed, even if it means some text might overflow.

Example emoji that does it: 🎙

Example style.css

* {
  font-family: "Noto Sans Mono"; 
  font-size: 9pt;
  padding-top: 0;
  padding-bottom: 0;
}

Fwiw I could only find two fonts that this is an issue with, Sarasa Gothic, Noto Sans Mono and Iosevka. But waybar's height should remain the same regardless of what the modules do if that's what the user wants.

Kacper-Kondracki commented 11 months ago

@Alexays Please address this issue. I can confirm that it messes with sway positioning. It causes all windows to resize. And the worst of all, it occasionally causes my chromium based browser (brave) to freeze when a tab has unicode character that cause the bar to resize to accommodate it. It is just problematic.

Kacper-Kondracki commented 10 months ago

Found a workaround. Setting a negative margins to a module margin-top: -50px; margin-bottom: -50px hacks it, so larger unicode characters no longer change height of the bar.

josch commented 5 months ago

Your microphone emoji doesn't trigger this bug for me. But this one does:

zenity --title="༺" --entry
paolomainardi commented 4 months ago

@Kacper-Kondracki, it works, but the tray icons disappear for some reason.

paolomainardi commented 4 months ago

Did anyone try some other solutions?

mrdgo commented 3 months ago

I also observe this behavior. For example when listening to JARYMANE mixes on YouTube. They use a weird symbol in the video titles. For now, thanks @Kacper-Kondracki . But I would happily welcome a more mature solution.