feat: set COSMIC_VERSION env var

This commit is contained in:
Vukašin Vojinović 2026-09-04 19:24:06 +02:00 • committed by Michael Murphy
parent d02ced6297
commit 3ccf897693
3 changed files with 9 additions and 2 deletions

View file

@ -166,6 +166,13 @@ async fn start(
env_vars.push(("XDG_SESSION_TYPE".to_string(), "wayland".to_string()));
systemd::set_systemd_environment("XDG_SESSION_TYPE", "wayland").await;
// expose the session version
env_vars.push((
"COSMIC_VERSION".to_string(),
env!("CARGO_PKG_VERSION").to_string(),
));
systemd::set_systemd_environment("COSMIC_VERSION", env!("CARGO_PKG_VERSION")).await;
#[cfg(feature = "systemd")]
let _inhibit_fd = if *is_systemd_used() {
match get_systemd_env().await {