forked from GH-forks/hyprfreeze
feat: if desktop cannot be auto detected, assume Hyprland
This commit is contained in:
parent
73b4073b61
commit
32e32bc6e5
1 changed files with 2 additions and 5 deletions
|
@ -122,12 +122,9 @@ function getPidByProp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function detectEnvironment() {
|
function detectEnvironment() {
|
||||||
local Type
|
|
||||||
local Desktop
|
local Desktop
|
||||||
eval "$(loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type -p Desktop)"
|
eval "$(loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Desktop)"
|
||||||
[ -z "$Type" ] && echo "Could not determine session type via \`loginctl\`." && exit 1
|
[ -z "$Desktop" ] && echo "Could not determine desktop environment via \`loginctl\`. Assuming Hyprland." && Desktop="hyprland"
|
||||||
[ -z "$Desktop" ] && echo "Could not determine desktop environment via \`loginctl\`." && exit 1
|
|
||||||
SESSION=$Type
|
|
||||||
DESKTOP=$Desktop
|
DESKTOP=$Desktop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue