Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script to unstack windows #70

Closed
blackvvine opened this issue Mar 23, 2021 · 3 comments
Closed

Script to unstack windows #70

blackvvine opened this issue Mar 23, 2021 · 3 comments

Comments

@blackvvine
Copy link

Hi,

I've recently switched from i3wm on Linux to yabai+stackline+skhd, so I'm kind of new to this. I have configured a keybinding to stack a window with the next one via:

yabai -m window --stack next

However, I can't seem to find any docs on how this can be undone i.e. how can I "unstack" windows.

@johnallen3d
Copy link

I have a little script I use to "toggle" stacks (can't remember if I copied this from someone else at this point).

#! /usr/bin/env bash

current_layout="$(yabai -m query --spaces --space | jq -re .type)"

target_layout="bsp"

[ "${current_layout}" = "bsp" ] && target_layout="stack"

yabai -m space --layout $target_layout

This is triggered in my skhd config via:

cmd - m : /Users/usernamehere/.config/yabai/toggle-monocle

@blackvvine
Copy link
Author

Awesome, thank you 🎉 🙏

@AdamWagner AdamWagner pinned this issue Jun 10, 2021
@AdamWagner AdamWagner changed the title Undo stack window Script to unstack windows Jun 10, 2021
@kiryph
Copy link

kiryph commented Dec 2, 2021

Here is a one-liner for ~/.config/skhd/skhdrc

alt - t : yabai -m space --layout $( [ "$(yabai -m query --spaces --space | jq -re .type)" = 'bsp' ] && echo 'stack' || echo 'bsp' )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants