Alexays / Waybar

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

[hyprland/language] not rendering dvorak-ucw #3521

Open jzitnik-dev opened 2 months ago

jzitnik-dev commented 2 months ago

Hi, I'm trying to set a custom formatting in hyprland/language to show CZ Dvorak when I'm using dvorak-ucw keyboard variant with cz keyboard layout.

In my waybar config I have this:

"hyprland/language": {
  "format-cs": "CZ",
  "format-en": "US",
  "format-cs-dvorak-ucw": "CZ Dvorak"
}

In my hyprland config I have this:

kb_layout = cz,us,cz
kb_variant = ,,dvorak-ucw

The CZ and US works fine but the CZ Dvorak is not. It doesn't show anything.

Even when I have no formatting at all Czech and English (US) is showing but dvorak-ucw is not.

There are no error messages in waybar when I'm changing the keyboard layout.

0x455241 commented 2 months ago

This is a recent regression, format-en-intl no longer works either.

jzitnik-dev commented 2 months ago

Found the cause of the issue. It is because of poor parsing of hyprland IPC activelayout. If the layout has a , in its name, everything before the last , fill be cropped out thus making the layout name invalid.

Looks like this is impossible to fix because of the format that hyprland is sending the IPC activelayout.