Added X11/Wayland detection for copy command#10
Added X11/Wayland detection for copy command#10eeeXun merged 5 commits intoeeeXun:masterfrom muvment:muvment-patch-2
Conversation
|
Great. But I prefer if os.Getenv("XDG_SESSION_TYPE") == "x11"
...
else
...Also, please add |
|
For sure! Just realised perhaps I should have opened this as an "enhancement" issue before opening the PR, since I don't know anything about the Go language, my bad. UPDATE Ok, so I've reading up and trying things, and I think I got it to work with native go syntax, could you give it a look? I added or "(Linux) xclip for X11 What do you think? |
|
Nice, your patch works for me.
I prefer the latter. |
|
Great! So you wanna change |
|
The switch os.Getenv("XDG_SESSION_TYPE") {
case "x11":
...
case "wayland":
...
}
It looks so great. |
|
Ok, let me have a look. |
|
Something like this? edit It's working for me on Wayland |
|
Yes |
|
Great! I'll change it now |
If Linux platform is detected, check if it's using X11 or Wayland server, then execute corresponding copy command.
|
Lol, who would have thought it would be that simple, it took me just a minute, I was thinking it would take me another hour or so 😂️. |
|
Btw, how you comment snippets of code with syntax colour highlighting? |
Add the language to the end of first line backquote, eg. ```go |
|
Cool! Thanks! And thanks for the Go info, I ended up learning some Go along the way. In any case, much appreciated and have a good one 💪️🙏️ |
If Linux platform is detected, check if it's using X11 or Wayland server, then execute corresponding copy command.