yadm-config/.config/scripts/anyrun/Windows.sh

12 lines
301 B
Bash
Executable file

#!/bin/env sh
options=$(hyprctl -j clients | jq 'map({"\(.title)": .pid}) | add')
result=$(echo $options | jq 'keys | map("\(.)\n") | add' -r | anyrun --plugins libstdin.so)
pid=$(echo $options | jq ".[\"$result\"]")
if [[ $pid == "null" ]]; then
exit 0
fi
hyprctl dispatch focuswindow pid:$pid