Skip to content

Commit

Permalink
implement support for stack arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Amar1729 committed Dec 19, 2021
1 parent 67d2b50 commit 2106f7a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions _yabai
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

# DIR_SEL := north | east | south | west
#
# WINDOW_SEL := prev | next | first | last | recent | mouse | largest | smallest | DIR_SEL | window id
# WINDOW_SEL := prev | next | first | last | recent | mouse | largest | smallest | STACK_SEL | DIR_SEL | window id
#
# STACK_SEL := stack.prev | stack.next | stack.first | stack.last | stack.recent
#
# DISPLAY_SEL := prev | next | first | last | recent | arrangement index (1-based)
#
Expand Down Expand Up @@ -154,7 +156,7 @@ function _yabai_config {
_arguments "4: :(($args_space))"

if [[ $line[5] == "layout" ]]; then
_arguments "5: :(bsp float)"
_arguments "5: :(bsp float stack)"
fi
# fi
;;
Expand Down Expand Up @@ -207,19 +209,19 @@ function _yabai_space {
_arguments "3: :(padding gap mission-control show-desktop)"
;;
--layout)
_arguments "3: :(bsp float)"
_arguments "3: :(bsp float stack)"
;;
esac
}

function _yabai_window_inner {
idx=$1
case $line[$idx] in
--focus|--swap|--warp)
--focus|--swap|--warp|--stack)
_arguments "$idx: :__window_sel"
;;
--insert)
_arguments "$idx: :($(__dir_sel))"
_arguments "$idx: :($(__dir_sel) stack)"
;;
--resize)
_arguments "$idx: :(top: left: bottom: right: top_left: top_right: bottom_right: bottom_left: abs:)"
Expand Down

0 comments on commit 2106f7a

Please sign in to comment.