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

Feature Request: Master layout #1124

Open
I-Want-ToBelieve opened this issue Jan 14, 2022 · 10 comments
Open

Feature Request: Master layout #1124

I-Want-ToBelieve opened this issue Jan 14, 2022 · 10 comments

Comments

@I-Want-ToBelieve
Copy link

I-Want-ToBelieve commented Jan 14, 2022

https://dwm.suckless.org/
https://wiki.hyprland.org/Configuring/Master-Layout/
179357849-321f042c-f536-44b3-9e6f-371df5321836

@koekeishiya
Copy link
Owner

Is this referring specifically to the master & stacking implementation detail of the "tiled layout"?

@kkharji
Copy link

kkharji commented Jan 19, 2022

As previous dim user, this would be an awesome addition. When first setting up yabai, I did some complex shortcuts to make this work. still not there yet 😆 . I think indeed it's referring to master & stacking impl

@kkharji kkharji mentioned this issue Feb 5, 2022
6 tasks
@I-Want-ToBelieve I-Want-ToBelieve changed the title Feature Request: DWM layout Feature Request: Master layout Dec 20, 2022
@Bellavene
Copy link

Bellavene commented Feb 20, 2023

A shitty workaround, still no 'send new window to master'. Tried to implement it, but too buggy. It must be done in source, not in scripts.

CURRENT_DISPLAY=$(yabai -m query --windows --window | jq '.display')
WINDOWS_ARRAY=$(yabai -m query --windows --space $(yabai -m query --spaces --space | jq '.index') --display $CURRENT_DISPLAY | jq -r 'map(select(.["is-minimized"]==false and .["is-floating"]==false))')
NUMBER_OF_WINDOWS=$(echo $WINDOWS_ARRAY | jq -r 'length')

case $NUMBER_OF_WINDOWS in
	[0-1])
		yabai -m config split_type auto
		;;
	2)
		;;
	3)
		yabai -m config split_ratio 0.5
		yabai -m space --balance x-axis
		yabai -m config split_type horizontal
		;;
	*)
		yabai -m space --balance x-axis
		;;
esac

#1609

@I-Want-ToBelieve
Copy link
Author

I have successfully combined krohnkite-core with yabai.

There are still some bugs at the moment. After fixing some bugs, I will release an early version on GitHub. This should not take too long.

Kapture.2023-11-16.at.12.50.30.mp4

@Bellavene
Copy link

Great, but to do it the right way, we need to change the logic in the source code of yabai. All scripts on top of it are doomed to behave nonsensical.

@I-Want-ToBelieve
Copy link
Author

I-Want-ToBelieve commented Nov 17, 2023

MacOS has some quirks

  1. When closing the last visible window of the same app, if there is a minimized window in the app, the minimized window will be automatically displayed! (WTF)

  2. When closing the last visible window of an app, if the app does not have a minimized window, another app that is different from it will not automatically gain focus! (WTF)

  3. Even if the last window is closed, some apps still exist in the command + tab list! And even if it is selected, it cannot be reopened!!(Pollution)

  4. The closing of the window does not always mean the exit of the app, cmd+q actually closes the app, but it closes all windows(Complex)

@Bellavene
Copy link

Bellavene commented Nov 17, 2023

  1. Something is causing this, macos does not behave like that.
  2. It is the main logic of macos, an app can be run without a window at all. I use a hammerspoon script for a workaround. Or @FelixKratz's fork of yabai fixes that too.
  3. See # 2, mostly to reopen a window you must press a shortcut, either command+n or command+numbers
  4. see # 2

@I-Want-ToBelieve
Copy link
Author

I-Want-ToBelieve commented Nov 17, 2023

Basically all layouts of krohnkite already work on top of yabai.

There are four more things to deal with

  1. When there is no focus, automatically let a window gain focus.
  2. Respond to dock and global menu show-hide events and adjust the available screen size.
  3. Responds to events emitted when the window changes size and position via the mouse
  4. Multi-monitor testing, multi-space can work now, multi-monitor should also work, but there is no test yet

@I-Want-ToBelieve
Copy link
Author

I-Want-ToBelieve commented Nov 19, 2023

Although moving the position of the window through the mouse and adjusting the size of the window through the mouse have not yet been processed

I am still planning to deal with compilation, packaging and distribution tomorrow

Because the requirements of the early version have now been met.

Kapture.2023-11-19.at.11.17.16.mp4

esjeon/krohnkite#201 (comment)

@I-Want-ToBelieve
Copy link
Author

Currently there are only development versions.

The release of npm, crates.io, brew, nix and github still requires some time to configure github actions and changesets.

https://github.com/I-Want-ToBelieve/yakite

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

Successfully merging a pull request may close this issue.

4 participants