• rtxn@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        6 months ago

        Yes. X11 replaced X10’s obsolete cut buffers (which can be modified by any process) with state-of-the-art selections. There are three selections in X11: a primary, a secondary, and a clipboard.

        In modern desktops, the primary selection is overwritten every time you select some text (including in the terminal), which makes its content very ephemeral. You can paste it with the middle mouse button.

        The secondary selection is generally not used, but it’s present in the specification, and you can use xclip -selection secondary to access it. Wayland doesn’t seem to have a secondary selection.

        The clipboard selection is what most people understand to be THE clipboard. You have to write to it explicitly (through a keyboard shortcut, API, or CLI tool), and its content persists until it is overwritten, explicitly cleared, or the X server is killed. While the primary and secondary can only contain text, the clipboard can contain many kinds of data.

        • whats_all_this_then@programming.devOP
          link
          fedilink
          arrow-up
          0
          ·
          6 months ago

          Okay I had no.idea. So on Plasma, I’m guessing when I copy anything, it’s writing it both the primary selection, and the clipboard selection and that’s how it stays in the clipboard manager thingy?

        • QuazarOmega@lemy.lol
          link
          fedilink
          English
          arrow-up
          0
          ·
          6 months ago

          In modern desktops, the primary selection is overwritten every time you select some text

          ( °O°)
          You just opened a whole new world for me, it works in Wayland too