diff --git a/hyprfreeze b/hyprfreeze index 278db09..27fb249 100755 --- a/hyprfreeze +++ b/hyprfreeze @@ -99,12 +99,17 @@ function getPidByName() { function getPidByProp() { debugPrint "Getting PID by prop..." - if ! command -v hyprprop; then - echo "You need to install 'hyprprop' to use this feature. (https://github.com/vilari-mickopf/hyprprop)" + if [[ "hyprland" == "$DESKTOP" ]]; then + if ! command -v hyprprop; then + echo "You need to install 'hyprprop' to use this feature. (https://github.com/vilari-mickopf/hyprprop)" + exit 1 + fi + + PID=$(hyprprop | jq '.pid') + else + echo "Selecting the target window by mouse is currently not supported on $DESKTOP." exit 1 fi - - PID=$(hyprprop | jq '.pid') debugPrint "PID by prop: $PID" }