mirror of
https://github.com/aome510/spotify-player.git
synced 2026-04-26 09:25:49 +03:00
[GH-ISSUE #393] OpenSpotifyLinkFromClipboard does not work on Wayland #1145
Labels
No labels
bug
documentation
enhancement
good first issue
help wanted
pull-request
question
third-party
third-party
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-player#1145
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sewnie on GitHub (Mar 11, 2024).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/393
Describe the bug
The action OpenSpotifyLinkFromClipboard to paste a spotify URL in spotify_player does not function on Wayland
To Reproduce
Expected behaviour
It will get pasted and opened
Log and backtrace
@aome510 commented on GitHub (Mar 12, 2024):
The error is pretty self-explained:
DisplayParsingError(DisplayNotSet). Can you try to run in the terminal thecopy_commandin your config (default toxclip -sel cfor linux) to see if that works?You can also try different
copy_command, e.g the one recommended for wayland@sewnie commented on GitHub (Mar 12, 2024):
Thats for copying. This issue is for pasting.
The routines used for copying
execute_copy_commandis not specific to a system clipboard, unlike pasting, which uses a library and imports XCB. That is why it doesn't work, because the logs are from a library not a specific program error.@aome510 commented on GitHub (Mar 12, 2024):
ahhh, my bad. Will see if there is a way to fix this with the
copypastalibrary.@sewnie commented on GitHub (Apr 16, 2024):
Yay
@aome510 commented on GitHub (Apr 16, 2024):
https://github.com/alacritty/copypasta has support for wayland but it's pretty limited (require window pointer for clipboard access). #411 replaces use of library with
paste_command(similar tocopy_command), so you should be able to define custom one for your use case@sewnie commented on GitHub (Apr 19, 2024):
It does not function:
@aome510 commented on GitHub (Apr 19, 2024):
Did you define a new
paste_command? The default isxclip@sewnie commented on GitHub (Apr 19, 2024):
What? You said the new library doesn't require that anymore, and is automatic.
@sewnie commented on GitHub (Apr 19, 2024):
Wait. Now I'm confused, earlier it was using this library which was automatic? Why did copying need a command then..?
@aome510 commented on GitHub (Apr 19, 2024):
I didn't say anything about using library and is automatic. I did say
Library supports
waylandbut is limited and not easy to integrate to the application@sewnie commented on GitHub (Apr 19, 2024):
Sorry for the misunderstanding, and that is very unfortunate. I've scoured all over GitHub for any other suitable clipboard libraries and it seems there isn't. Don't get me wrong, using the
copy_commandandpaste_commandapproach is acceptable, but it's very inconvenient for your users, including myself.Programs such as helix have many many checks for a suitable clipboard provider, and yazi executing all clipboard providers for a suitable one. I suggest you take the helix approach (seen here). Again, it is very unfortunate Rust does not have a universal clipboard :(
@aome510 commented on GitHub (Apr 19, 2024):
Thanks for the suggestion. I'll think about what is the best way to handle this
@aome510 commented on GitHub (Apr 21, 2024):
@apprehensions implemented in #421. Can you try the latest
master?@sewnie commented on GitHub (Apr 22, 2024):
You might want to consider running some of these commands in the background, running
wl-copycauses spotify_player to freeze becausewl-copyneeds to run in the background.@sewnie commented on GitHub (Apr 22, 2024):
Scratch that, i'm not sure why this doesn't work, but it should.
I have this same issue with my editor and i don't know why.
@aome510 commented on GitHub (Apr 22, 2024):
Not sure what happened. I don't have linux machine, so couldn't really test the change myself. I do think that I implemented the command spawning logic similar to
helix