feat: set COSMIC_VERSION env var
This commit is contained in:
parent
d02ced6297
commit
3ccf897693
3 changed files with 9 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -300,7 +300,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cosmic-session"
|
||||
version = "1.0.0"
|
||||
version = "1.8.0"
|
||||
dependencies = [
|
||||
"color-eyre",
|
||||
"cosmic-dbus-a11y",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "cosmic-session"
|
||||
description = "The session manager for the COSMIC desktop environment"
|
||||
version = "1.0.0"
|
||||
version = "1.8.0"
|
||||
license = "GPL-3.0-only"
|
||||
edition = "2024"
|
||||
rust-version = "1.93"
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue