feat(startup settings): use /proc/{pid}/environ

This commit is contained in:
Nova
2022-12-10 09:17:37 -05:00
parent 7a4d557c61
commit 40bcd61b98
5 changed files with 68 additions and 33 deletions

View File

@@ -213,6 +213,18 @@ impl CoreSurface {
});
}
pub fn pid(&self) -> Option<i32> {
Some(
self.weak_surface
.upgrade()
.ok()?
.client()?
.get_credentials(&self.dh)
.ok()?
.pid,
)
}
pub fn wayland_state(&self) -> Arc<Mutex<WaylandState>> {
self.state.upgrade().unwrap()
}