Finding PID of Xorg is not robust
Closed this issue · 1 comments
NickHu commented
For instance, on my system (NixOS), the binary is called X
and I need this patch to make this tool work:
diff --git a/src/main.rs b/src/main.rs
index 89724de..688faf2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -138,7 +138,7 @@ fn main() -> Result<(), String> {
>= 1
{
Backend::Sway
- } else if String::from_utf8(Command::new("pidof").arg("Xorg").output().unwrap().stdout)
+ } else if String::from_utf8(Command::new("pidof").arg("X").output().unwrap().stdout)
.unwrap()
.len()
>= 1