From d2656ce853d4c1c6c4ec800bde4d5cabe40ae30a Mon Sep 17 00:00:00 2001 From: alterNERDtive Date: Mon, 12 Feb 2024 12:20:51 +0100 Subject: [PATCH] feat: desktop-aware -r --- hyprfreeze | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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" }