Clearing primary clipboard (disabling middle mouse paste) makes text selection in GTK impossible

The cross pasting thing is not an issue so long as both applications are on the list, i tried it.

Workaround 1: This doesn’t really solve anything, it’s inferior to workaround 3.

Workaround 2: I need my middle mouse button to still function as a middle mouse button. This is just not an option for almost everyone that wants to disable middle mouse paste. Think about it, why would you want to disable the paste functionality of the middle mouse button if you never actually use the middle mouse button?

Workaround 3: Already covered that Clearing primary clipboard (disabling middle mouse paste) makes text selection in GTK impossible - #13 by rabcor

Workaround 4: I actually created that :rofl: it took me a lot of trial and error and experimentation to get it just right so I’m glad you were able to find it considering it is an older version of a stackexchange answer that has recently been updated. It’s a really solid solution too, if you’re on X, but I’m not on X right now. Although I often find myself wishing I was.

These are all just workarounds though, the solution is for gtk devs to fix this. For that someone needs to report it to them, but it can’t be me cuz the barrier of entry to their gitlab is too high for me to bother.

I didn’t know that, lol. I actually did something similar when I was using i3wm. But the funny thing is that the stack exchange page never popped up in my search when I was looking for a solution back then.

Yeah, my bad. I missed that post since I was on my phone.

It depends on your habit. If you’re not in the habit of randomly highlighting a bunch of text, then it can work. It leaves a time window between the moment you select the text and the moment you actually copied the selected text into the normal clipboard.

Edit:

I’ll have to experiment with this some time. Is there a way to assign a keybinding to the middle button without also taking away its basic functionality.

On X it is easy to assign a command to any key or button without intercepting the event, on wayland it doesn’t seem to be possible at all.

It would theoretically be possible in a few ways but as it stands it doesn’t seem to be…

Is what I thought but this exists so maybe it is possible https://github.com/waycrate/swhkd

I’m gonna try it but kinda skeptical, the only way i have been able to bind a key to anything at all globally is through the compositor itself. like if an application has a global shortcut to trigger some event in it, it straight up won’t even work.

Edit: Yeah nope, doesn’t work.