1
0
Fork 1
mirror of https://github.com/Zerodya/hyprfreeze.git synced 2024-09-19 15:33:20 +02:00

feat: desktop-aware -r

This commit is contained in:
alterNERDtive 2024-02-12 12:20:51 +01:00
parent dc6636de41
commit d2656ce853
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1

View file

@ -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"
}