From 58a46c793bde14ec777efea4a2be697f150be5f9 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Wed, 30 Oct 2024 22:14:10 -0700 Subject: [PATCH] pipewire-controller: trying to send sigusr1 to xrootdatetime --- home/modules/pipewire-controller.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/home/modules/pipewire-controller.nix b/home/modules/pipewire-controller.nix index 2d28fa8..8704b0e 100644 --- a/home/modules/pipewire-controller.nix +++ b/home/modules/pipewire-controller.nix @@ -44,6 +44,28 @@ let .output() .expect("Unable to play audio via mpv"); } + + let xrootdatetime_pid_raw = + Command::new("systemctl") + .args([ + "--user", + "show", + "--property", "MainPID", + "--value", "xrootdatetime" + ]) + .output(); + + if let Ok(xrootdatetime_pid_raw) = xrootdatetime_pid_raw { + if let Ok(xrootdatetime_pid) = str::from_utf8(&xrootdatetime_pid_raw.stdout[..]) { + let _ = Command::new("kill") + .args([ + "-s", + "SIGUSR1", + xrootdatetime_pid + ]) + .spawn(); + } + } } ''; in