forked from GH-forks/hyprfreeze
fix: only grep for loginctl sessions with a seat
If a session has no seat, it’s a TTY session. This will still break if a user has more than 1 graphical session. For now, that’s out of scope.
This commit is contained in:
parent
a87584a1a8
commit
bebc1aa0af
1 changed files with 1 additions and 1 deletions
2
coolant
2
coolant
|
@ -120,7 +120,7 @@ function getPidByProp() {
|
|||
function detectEnvironment() {
|
||||
if [ $(command -v loginctl) ]; then
|
||||
local Desktop Type
|
||||
eval "$(loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type -p Desktop)"
|
||||
eval "$(loginctl show-session $(loginctl | grep $(whoami) | grep seat | awk '{print $1}') -p Type -p Desktop)"
|
||||
DESKTOP=$Desktop
|
||||
SESSION=$Type
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue