Added Wayland clipboard support. (#666)

* Fixed MPRIS OpenUri function not respecting ncspot's shuffle setting.

* Added support for Wayland clipboard.

* Formatted code properly using cargo fmt.

* Added is_wayland() function to check if using Wayland.

* Added wayland_clipboard feature flag.
It can be used to enable Wayland clipboard support.
Changed is_wayland() function to check wayland related environment
variables at runtime and not compile time.
This commit is contained in:
Bettehem
2021-12-09 12:55:44 +02:00
committed by GitHub
parent beec2867f0
commit 3324094974
3 changed files with 647 additions and 41 deletions

View File

@@ -38,6 +38,7 @@ dbus-tree = { version = "0.9.2", optional = true }
rand = "0.8"
webbrowser = "0.5"
clipboard = { version = "0.5", optional = true }
wl-clipboard-rs = { version = "0.4", optional = true }
url = "2.2"
strum = "0.23.0"
strum_macros = "0.23.1"
@@ -57,7 +58,8 @@ default-features = false
[features]
share_clipboard = ["clipboard"]
share_selection = ["clipboard"] # Use the primary selection for sharing - linux only
wayland_clipboard = ["wl-clipboard-rs"] # Support wayland clipboard - linux only
share_selection = ["clipboard", "wl-clipboard-rs"] # Use the primary selection for sharing - linux only
alsa_backend = ["librespot-playback/alsa-backend"]
pulseaudio_backend = ["librespot-playback/pulseaudio-backend"]
rodio_backend = ["librespot-playback/rodio-backend"]