I’m working on a window switching tool for Wayland that’s kinda like Alt-Tab. However, it seems like there’s no compositor agnostic way to do things like:

  • List all currently open windows
  • Ask which window is currently focused
  • Focus a specific window

Therefore, if I want my tool to support multiple compositors, I have to re-implement this logic for each compositor.

Is the motivation security through program isolation? That doesn’t quite make sense to me since programs still can do the above things, they just have to do it compositor specifically: hyprctl clients on Hyprland, niri msg windows for Niri, etc. Also, you could just have a Wayland API that requires elevated privileges for doing these things, which the user would have to opt-in to for a specific program.

I feel like this design of Wayland causes a lot of fragmentation. There are a lot of tools that are for example Hyprland-only.

Could you please enlighten me on why Wayland has this design?

  • Mactan@lemmy.ml
    link
    fedilink
    arrow-up
    24
    arrow-down
    1
    ·
    1 month ago

    everything you could want and more already was dreamt up and has a PR for it, you can thank Gnome for stonewalling everything for half a decade or more

  • majster@lemmy.zip
    link
    fedilink
    arrow-up
    7
    ·
    1 month ago

    Some wise people said that it was originally designed for car infotainment. Everything else is an addition.

  • Chewt@beehaw.org
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    1 month ago

    Best option right now are to use the following protocol extensions

    https://wayland.app/protocols/xdg-activation-v1 this extension covers your setting focus needs, but getting a list of other wayland clients is a bit trickier.

    https://wayland.app/protocols/ext-foreign-toplevel-list-v1 this extension can list clients in theory, but its missing support for both gnome and kde.

    Some of the unstable extensions have wide adoption, so perhaps take a look at each of them to see if they provide the functionality you want. Good luck!

    Edit: was curious and did some more digging. KDE has their own protocol extension for this https://wayland.app/protocols/kde-plasma-window-management

    As for gnome, I couldn’t find anything that seemed suitable, other than writing a gnome extension specifically to support this. I imagine that doesn’t fit within your vision for your project though.

    Anyway, I had fun looking into this. Once again good luck!

  • ChrisG@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    12
    ·
    1 month ago

    Congratulations you have discovered the new hotness being forced upon Linux community (only 17 years in development and counting lol) isn’t so hot.

    My favourite quote from the linked article:

    “Instead of providing a better way of doing something, common features are not supported at all, and instead it’s the job of everyone else in the ecosystem to agree on a standard. That’s not a stunning argument in favor of replacing something that already exists and that has already been standardized in X11!”

    citation -

    Wayland set the Linux Desktop back by 10 years

    https://omar.yt/posts/wayland-set-the-linux-desktop-back-by-10-years

    • Holytimes@sh.itjust.works
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      1 month ago

      We are only ten years behind thanks to gnome to be fair.

      Just picture all the progress we could have made!

    • KullumDaue@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 month ago

      I am not saying that software written in C is bad

      after implying that code written in C is inherently insecure 🥴

  • warmaster@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    2
    ·
    1 month ago

    IIRC Wayland is only a spec, compositora are the implementation. I believe Wayland has a reference competitor, maybe target that?

      • TrollAccount69@lemmy.ml
        link
        fedilink
        arrow-up
        1
        arrow-down
        6
        ·
        1 month ago

        Why don’t you “check out” some code that involves the ops issue and try to solve it instead of trolling people.

          • TrollAccount69@lemmy.ml
            link
            fedilink
            arrow-up
            1
            arrow-down
            3
            ·
            1 month ago

            I don’t want to fix wayland. Wayland is bad.

            Even if my heartfelt love for the op overcame my revulsion for wayland I would not put any effort into fixing this issue because the structural problems with wayland make it a battle with an entrenched system of powerful organizations with skin in the game and outspoken users looking for a fight as opposed to a simple pr.

            Think for a second about the context of what you are aligning yourself with in these replies to me: wayland, a collection of protocols and apis in a trenchcoat, doesn’t have a standardized one for alt tab. That’s not because of a cabal of stereotypes rubbing their hands together and laughing over a meeting table shaped like the Mercator projection, but because the wayland devs abdicated responsibility by not making a reference implementation and that left space open for anyone who wanted to to stake their claim.

            Now rather than looking at the design and deciding that we need 12 foot posts to support the back side of the building as the land slopes off we are at the mercy of whatever the supplier brings to the site today.

            Why would I volunteer my time to that? Why would anyone?

              • TrollAccount69@lemmy.ml
                link
                fedilink
                arrow-up
                1
                arrow-down
                2
                ·
                1 month ago

                Because you’re fine with wayland.

                The op is flailing, trying to use the system you’re at the very least fine with but I now suspect you feel a certain affinity towards but they can’t. They can’t use wayland unless you help. Their various windows are shuffled on top of one another and require the use of a mouse to switch between. You could be helping the op instead of trolling. But you’re not.

                Why are you not helping the op, umbrella?