mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 14:31:23 +00:00
feat(cli, flatpak): implemented kill action for pwsp-cli.
use it instead of pkill in the flatpak wrapper
This commit is contained in:
@@ -18,6 +18,8 @@ pub trait Executable {
|
||||
|
||||
pub struct PingCommand {}
|
||||
|
||||
pub struct KillCommand {}
|
||||
|
||||
pub struct PauseCommand {
|
||||
pub id: Option<u32>,
|
||||
}
|
||||
@@ -93,6 +95,13 @@ impl Executable for PingCommand {
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Executable for KillCommand {
|
||||
async fn execute(&self) -> Response {
|
||||
Response::new(true, "killed")
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Executable for PauseCommand {
|
||||
async fn execute(&self) -> Response {
|
||||
|
||||
@@ -24,6 +24,10 @@ impl Request {
|
||||
Request::new("ping", vec![])
|
||||
}
|
||||
|
||||
pub fn kill() -> Self {
|
||||
Request::new("kill", vec![])
|
||||
}
|
||||
|
||||
pub fn pause(id: Option<u32>) -> Self {
|
||||
let mut args = vec![];
|
||||
let id_str;
|
||||
|
||||
Reference in New Issue
Block a user