How to make a bindsym on sway only work if a window is xwayland
I'm trying to improve the clipboard sync situation, i've realized that if I can make it so that a bindsym only applies when an xwayland window is in focus, I can basically do
And it'll automatically sync the clipboard... however, I can't find a way to make the bindsym only run on xwayland windows, as, if this runs on a wayland window, it'll just overwrite the wayland clipboard with the last xwayland clipboard.
I've discovered you can match all xwayland windows with "swaymsg [shell='xwayland']" but I can't figure out how to make a bindsym only work if that is in focus
^^ that SHOULD WORK in theory, but it doesn't, because xclip outputs what it remembers as soon as the command starts, and as a result, the string gets messed up... I cannot figure out for the life of me why running "xclip -o | wl-copy" fixes it but not that. please help.
Not answering your question, but since i haven't noticed any clipboard issues on GNOME does Sway maybe have an option to fix the Wayland<->xwayland sync ?
I googled what the brackets do but I still don't understand why that fixes it, but it does. Thank you so much. You cannot imagine how much annoyance this issue has caused me over the years.
edit: SCRATCH THAT
I've found a situation where xclip -o outputs the correct thing, but wl-paste is outputting something different and incorrect, even if I run my bindsym
xclip -o | wl-copy would fix this, if i ran it from alacritty, however, sway isn't doing it right.