mirror of
https://github.com/Zerodya/hyprfreeze.git
synced 2024-11-10 01:18:49 +01:00
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() {
|
||||
local Type
|
||||
local Desktop
|
||||
eval "$(loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type -p Desktop)"
|
||||
[ -z "$Type" ] && echo "Could not determine session type via \`loginctl\`." && exit 1
|
||||
[ -z "$Desktop" ] && echo "Could not determine desktop environment via \`loginctl\`." && exit 1
|
||||
SESSION=$Type
|
||||
eval "$(loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Desktop)"
|
||||
[ -z "$Desktop" ] && echo "Could not determine desktop environment via \`loginctl\`. Assuming Hyprland." && Desktop="hyprland"
|
||||
DESKTOP=$Desktop
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue