feat: move to async POSIX signal handler

Instead of trying to handle signals for every step of the `cursive`
event loop, move the signal handling into its own asynchronous task and
send callbacks to `cursive` when a signal arrives.
This commit is contained in:
Thomas Frans
2023-10-07 18:34:49 +02:00
committed by Henrik Friedrichsen
parent 209d8e260b
commit a067ab2ae2
3 changed files with 49 additions and 15 deletions

View File

@@ -66,6 +66,7 @@ wl-clipboard-rs = {version = "0.7", optional = true}
[target.'cfg(unix)'.dependencies]
signal-hook = "0.3.0"
signal-hook-tokio = { version = "0.3.1", features = ["futures-v0_3"] }
[dependencies.rspotify]
default-features = false