nwg-piotr / nwg-panel

GTK3-based panel for sway and Hyprland Wayland compositors
MIT License
629 stars 43 forks source link

Workaround for hyprctl empty devices lists #318

Closed nwg-piotr closed 2 weeks ago

nwg-piotr commented 2 weeks ago

On just started Hyprland 0.43.0 hyprctl devices happens (in most cases) to return empty devices lists: {'mice': [], 'keyboards': [], 'tablets': [], 'touch': [], 'switches': []}. When it happens, this fix skips the KeyboardLayout module UI creation, in order to prevent the entire panel from hanging. BTW: if you restart the panel after awhile, the module should start properly. Related Hyprland issue: https://github.com/hyprwm/Hyprland/issues/7843.