AdamWagner / stackline

Visualize yabai window stacks on macOS. Works with yabai & hammerspoon.
955 stars 47 forks source link

Feature Request: Infinite scroll through stack. #94

Open abaj8494 opened 2 years ago

abaj8494 commented 2 years ago

I think having the option to enable infinite scroll in the conf.lua file would be great. The behaviour of this option would mean that running yabai -m window --focus stack.next on the bottom-most window in the stack would cause stackline to loop through to the first window in the stack. Similarly, running stack.prev on the first window should bring focus to the last window.

Thank you for your work thus far @AdamWagner 😃 .

sendhil commented 2 years ago

@br1ttle - if it's helpful, I wrote a small Python script for myself that might help - https://github.com/sendhil/yabai-stack-navigator.

gronk-droid commented 2 years ago

@br1ttle @sendhil

I would recommend looking at skhd. All of the functionality of the stacks is provided by yabai, not stackline. If you want infinite scroll then using skhd will let you do this using the error codes that yabai will throw. Here is some skhd code demonstrating how I achieved this so that it works with the same shortcut.

# go to previous stacked set or last one if at the top
lctrl + lalt - up: yabai -m window --focus stack.prev || yabai -m window --focus stack.last

# go to next stacked window or first one if at the bottom
lctrl + lalt - down: yabai -m window --focus stack.next || yabai -m window --focus stack.first

Hope this helped (◉‿◉)

diocletiann commented 2 years ago

I use:

ctrl - down : yabai -m window --focus south || yabai -m window --focus stack.next || yabai -m window --focus stack.first
ctrl - up   : yabai -m window --focus north || yabai -m window --focus stack.prev || yabai -m window --focus stack.last