8 lines
295 B
Bash
8 lines
295 B
Bash
#!/bin/dash
|
|
|
|
isFocused=$(yabai -m query --windows --window | jq -re ".id")
|
|
echo $isFocused
|
|
if [[ -z "$isFocused" ]]; then # -z >> true if it's null
|
|
$(yabai -m window --focus $(yabai -m query --windows | jq -re ".[] | select((.visible == 1) and .focused != 1).id" | head -n 1))
|
|
echo hi
|
|
fi |