hotfix: add more resiliency to WM
This commit is contained in:
parent
415139d207
commit
8ce557cf24
1 changed files with 4 additions and 2 deletions
|
@ -49,10 +49,12 @@ fn main() {
|
||||||
} else if cfg!(unix) {
|
} else if cfg!(unix) {
|
||||||
let xdg_current_desktop = var("XDG_CURRENT_DESKTOP");
|
let xdg_current_desktop = var("XDG_CURRENT_DESKTOP");
|
||||||
let desktop = desktop_env().to_string();
|
let desktop = desktop_env().to_string();
|
||||||
if !xdg_current_desktop.is_err() && (desktop != "Unknown: Unknown") {
|
if desktop != "Unknown: Unknown" {
|
||||||
wm = desktop;
|
wm = desktop;
|
||||||
} else {
|
} else if !xdg_current_desktop.is_err() {
|
||||||
wm = xdg_current_desktop.unwrap();
|
wm = xdg_current_desktop.unwrap();
|
||||||
|
} else {
|
||||||
|
wm = "N/A".to_string();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
wm = "N/A".to_string();
|
wm = "N/A".to_string();
|
||||||
|
|
Loading…
Reference in a new issue