yabai-config/scripts/moveWindowToRight.sh

18 lines
379 B
Bash
Raw Permalink Normal View History

2023-03-06 01:24:40 +08:00
#!/bin/sh
curWindowId="$(yabai -m query --windows --window | jq -re ".id")"
inputAction=$1
case $inputAction in
'display')
$(yabai -m window --display next || yabai -m window --display first)
;;
'space')
$(yabai -m window --space next || yabai -m window --space first)
;;
*)
$(yabai -m window --space $inputAction)
;;
esac
$(yabai -m window --focus "$curWindowId")