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

Sonoma 14.3 M2 Pro - Yabai doesn't remove space transitions. #2083

Closed
rublev opened this issue Feb 7, 2024 · 9 comments
Closed

Sonoma 14.3 M2 Pro - Yabai doesn't remove space transitions. #2083

rublev opened this issue Feb 7, 2024 · 9 comments

Comments

@rublev
Copy link

rublev commented Feb 7, 2024

goal

  • only use yabai for destroying spaces when transitioning between them
  • disable space transitions like i had it before

this is all i want to use yabai for which is why my config is so barren

problem

My old version of Yabai from way back, I forgot which (used on BigSur) worked perfectly. Now the spaces still have animations. I enabled 'reduce motion' but there is still an animation present. I believe the old version I was on was 4.

My .yabairc looks like so:

# the scripting-addition must be loaded manually if
# you are running yabai on macOS Big Sur. Uncomment
# the following line to have the injection performed
# when the config is executed during startup.
#
# for this to work you must configure sudo such that
# it will be able to run the command without password
#
# monitor stdout: tail -f /usr/local/var/log/yabai/yabai.out.log
# monitor stderr: tail -f /usr/local/var/log/yabai/yabai.err.log

yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa

# yabai -m config window_topmost on

# yabai -m config layout bsp
# auto destroy and create spaces
# https://github.com/koekeishiya/yabai/issues/213#issuecomment-569410906
# read -r -d '' action <<- 'EOF'
#   sidx="$(yabai -m query --spaces --display |
#     jq -er 'map(select(.windows | length < 1).index)[0]')"
#   echo $sidx
#   if [ "$sidx" != null ] ; then
#     yabai -m space "${sidx}" --destroy
#   fi
# EOF

read -r -d '' action <<- 'EOF'
  recent_space_index="$(yabai -m query --spaces | 
    jq -er 'map(select(.id | tostring == env.YABAI_RECENT_SPACE_ID))[0].index')"
  if yabai -m query --windows --space "${recent_space_index}" |
    jq -er 'length == 0'
  then
    yabai -m space "${recent_space_index}" --destroy
  fi
EOF

yabai -m signal --add event='space_changed' action="${action}"
# yabai -m signal --add event='application_terminated' action="${action}"
# yabai -m signal --add event='window_destroyed' action="${action}"

# yabai -m config mouse_follows_focus          off
# yabai -m config focus_follows_mouse          autofocus

# bsp or float (default: bsp)

# Override default layout for space 2 only
# yabai -m config --space 1 layout float

# yabai -m config top_padding    20
# yabai -m config bottom_padding 20
# yabai -m config left_padding   20
# yabai -m config right_padding  20
# yabai -m config window_gap     20

# yabai -m config window_topmost on
# yabai -m config window_shadow float
# yabai -m config window_opacity on
# yabai -m config window_opacity_duration 0.0

# yabai -m config active_window_border_topmost on
# yabai -m config window_border off
# yabai -m config window_border_width 4
# yabai -m config window_border_radius 4
# yabai -m config active_window_border_color 0xFF00FF00
# yabai -m config normal_window_border_color 0x00FFFFFF
# yabai -m config insert_window_border_color 0x00FFFFFF
@rublev
Copy link
Author

rublev commented Feb 7, 2024

OK looks like it works in disabling space transitions. What is broken is the shortcut for going left/right, has animations. Every command in my .skhdrc results in cannot focus space due to an error with the scripting-addition. or something similar related to scripting addition.

@rublev
Copy link
Author

rublev commented Feb 7, 2024

UPDATE: OK so oddly enough, I installed skhd and yabai using iterm with rosetta enabled such that my arch output is i386 instead of arm64. Now everything works exactly as it did before.

@rublev
Copy link
Author

rublev commented Feb 9, 2024

@koekeishiya Can you clarify if this should work with arm64? Would like to get it working with arm64 instead.

@koekeishiya
Copy link
Owner

Yes, it works on both architectures. You need to make sure that it is installed and running natively, so that it matches the architecture of the running Dock.app.

@rublev
Copy link
Author

rublev commented Feb 9, 2024

You need to make sure that it is installed and running natively, so that it matches the architecture of the running Dock.app.

Thanks for the response.

I don't know what this means though as I installed it on i386 (not native??) and it works. Followed all instructions to the letter, error logs don't help at all when I try to install on arm64. Uninstalled and reinstalled like 20 times, no idea where to begin in debugging this. I just get cannot focus space due to an error with the scripting-addition. int the logs.

@koekeishiya
Copy link
Owner

koekeishiya commented Feb 9, 2024

Yabai itself will work regardless, but if you are on an Apple Silicon, Dock.app is running as an arm64e binary. This means that for yabai to inject code (scripting-addition) you need to run yabai as an arm64 binary, and the arm64e version of the scripting-addition -- otherwise there will be an architecture mismatch, and code-injection will fail.

Not sure what you have changed to make it default to running through Rosetta 2.
Simply following the yabai installation instructions using the default macOS Terminal.app should make it just work.

@panayao
Copy link

panayao commented Feb 29, 2024

@koekeishiya Bumping this as I am on Sonoma 14.3 and installed using the default method via Terminal.app and the delay is still present; any idea how to go about debugging this?

@koekeishiya
Copy link
Owner

This comment still applies for debugging purposes: #1054 (comment)

@koekeishiya
Copy link
Owner

This comment may be relevant to you: #1766

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