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?

  • Chewt@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 hours 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!

  • Mactan@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    3 hours 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

  • warmaster@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    4 hours ago

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

  • Ardor von Heersburg@discuss.tchncs.de
    link
    fedilink
    arrow-up
    9
    ·
    8 hours ago

    Some design choices if Wayland are really weird.

    That said do you know of the wlr foreign toplevel management protocol? A lot of the smaller compositors support it. But yes a lot like e.g. Mutter and I think kwin do not.

  • kehet@sopuli.xyz
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    8 hours ago

    There’s probably a PR or a thread somewhere with a bunch of very angry nerds fighting over whether this is even a useful feature and there’s no API because they can’t reach a compromise. There is no design.

    • L_Acacia@lemmy.ml
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      edit-2
      6 hours ago

      Gnome board members most likely blocking it while embezzling donations

  • ChrisG@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    8
    ·
    8 hours 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

        • ranzispa@mander.xyz
          link
          fedilink
          arrow-up
          4
          arrow-down
          3
          ·
          6 hours ago

          A piece of software using another piece of software does not mean forcing anything on anyone.

          Moreover, KDE runs on X11 and I don’t know of any distribution which does not provide Xorg in their repositories.

            • ranzispa@mander.xyz
              link
              fedilink
              arrow-up
              6
              arrow-down
              3
              ·
              6 hours ago

              So what?

              Should they support X11 forever despite the fact that even the maintainers of X11 are barely maintaining X11?

              Are they forcing you to do anything?

              • JTskulk@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                5 hours ago

                I’m not saying KDE should do one thing or another, I understand that maintaining code, even unchanging code as you claimed, takes effort.

                Yes, they’re going to force me to switch to Wayland on this machine. I’m on X because I need autokey, pyautogui, and TeamViewer. I need to look into alternatives and switch, except I don’t have the option of replacing TeamViewer.

                I’m not really partisan in the whole X vs Wayland jihad, I run Wayland on my 2 other machines and don’t notice any difference.

                • eldavi@lemmy.ml
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  4 hours ago

                  and don’t notice any difference.

                  The tldr of why Wayland was adopted in the first place and the next hotness will also be forced upon us as well. Lol

  • majster@lemmy.zip
    link
    fedilink
    arrow-up
    6
    ·
    9 hours ago

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

    • ranzispa@mander.xyz
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      6 hours ago

      Works on my desktop, much better than X. What problems do you have with wayland?

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

        The design of it is not compatible with the old paradigm of graphical interfaces which were the ones created by teams of researchers trying to figure out how to most effectively open a dialogue between computer and user. There is no reference implementation. It’s broken in a million little ways. No xscreensaver.

        But if I had to name just one main thing: the whole point of wayland is to make it easier for the programmers of x to handle a large complex codebase, which they accomplished by throwing everything out and starting over from scratch instead of migrating to tools, process and even languages that make that precise problem easier to manage and at the time of waylands conception we had forty fucking years of history showing vast improvement in the tools, processes and languages aimed at big complex shit.

        The fact that anyone will defend the decision to abandon x for the absolute slop delivery tube that wayland became in an age where we have access to, like it or not, the ultimate programming tool in the form of cheap and fast large language models is insane.

        All time L.