Open JocelynFloresz opened 8 months ago
cmd + shift - x : yabai -m window --space recent && yabai -m space --focus recent cmd + shift - 1 : yabai -m window --space 1 && yabai -m space --focus 1 cmd + shift - 2 : yabai -m window --space 2 && yabai -m space --focus 2 cmd + shift - 3 : yabai -m window --space 3 && yabai -m space --focus 3 cmd + shift - 4 : yabai -m window --space 4 && yabai -m space --focus 4 cmd + shift - 5 : yabai -m window --space 5 && yabai -m space --focus 5 cmd + shift - 6 : yabai -m window --space 6 && yabai -m space --focus 6 cmd + shift - 7 : yabai -m window --space 7 && yabai -m space --focus 7 cmd + shift - 8 : yabai -m window --space 8 && yabai -m space --focus 8
I have this configuration and when I send a window to other space it works but Focus doesn't happen. Can someone help me ?
I have SIP disabled and I am on yabai version: 6.0.15
sudo nvram boot-args=-arm64e_preview_abi sudo yabai --uninstall-sa sudo yabai --install-sa sudo yabai --load-sa
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
yabai -m config layout bsp
yabai -m config window_placement second_child
yabai -m config top_padding 3 yabai -m config bottom_padding 12 yabai -m config left_padding 12 yabai -m config right_padding 12 yabai -m config window_gap 12
yabai -m config mouse_follows_focus on
yabai -m config mouse_modifier alt
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
yabai -m mouse_drop_action swap
yabai -m config window_topmost off yabai -m config window_opacity off yabai -m config window_shadow float
yabai -m config window_border on yabai -m config window_border_width 4 yabai -m config active_window_border_color 0xE032CD32 yabai -m config insert_feedback_color 0x00010101 yabai -m config normal_window_border_color 0xE02d74da yabai -m config active_window_opacity 1.0 yabai -m config normal_window_opacity 0.90 yabai -m config split_ratio 0.50
yabai -m config auto_balance off
yabai -m config mouse_modifier fn yabai -m config mouse_action1 move yabai -m config mouse_action2 resize yabai -m config external_bar all:30:0
# for _ in $(yabai -m query --spaces | jq '.[].index | select(. > 6)'); do yabai -m space --destroy 7 done
function setup_space { local idx="$1" local name="$2" local space= echo "setup space $idx : $name"
space=$(yabai -m query --spaces --space "$idx") if [ -z "$space" ]; then yabai -m space --create fi
yabai -m space "$idx" --label "$name" }
setup_space 1 Cli setup_space 2 WWW setup_space 3 Outlook setup_space 4 Teams setup_space 5 Work setup_space 6 SecureCRT setup_space 7 RDP setup_space 8 Vmware setup_space 9 Files setup_space 10 VPN
yabai -m rule --add app="^iTerm2$" space=^1 yabai -m rule --add app="^Safari$" space=^2 yabai -m rule --add app="^Firefox$" space=^2 yabai -m rule --add app="^Microsoft Outlook$" space=^3 yabai -m rule --add app="^Microsoft Teams$" space=^4 yabai -m rule --add app="^Prospect mail$" space=^5 yabai -m rule --add app="^SecureCRT$" space=^6 yabai -m rule --add app="^Microsoft Remote Desktop$" space=^7 yabai -m rule --add app="^Telegram$" space=^10 yabai -m rule --add app="^Music$" space=5 yabai -m rule --add app="^cisco anyConnect Secure Mobility Client$" space=10
yabai -m rule --add label="Finder" app="^Finder$" title="(Co(py|nnect)|Move|Info|Pref)" manage=off yabai -m rule --add label="Safari" app="^Safari$" title="^(General|(Tab|Password|Website|Extension)s|AutoFill|Se(arch|curity)|Privacy|Advance)$" manage=off yabai -m rule --add label="macfeh" app="^macfeh$" manage=off yabai -m rule --add label="System Preferences" app="^System Preferences$" title=".*" manage=off yabai -m rule --add label="App Store" app="^App Store$" manage=off yabai -m rule --add label="Activity Monitor" app="^Activity Monitor$" manage=off yabai -m rule --add label="Calculator" app="^Calculator$" manage=off yabai -m rule --add label="Dictionary" app="^Dictionary$" manage=off yabai -m rule --add label="mpv" app="^mpv$" manage=off yabai -m rule --add label="Software Update" title="Software Update" manage=off yabai -m rule --add label="About This Mac" app="System Information" title="About This Mac" manage=off yabai -m rule --add label="HHKB" app="HHKB Keymap Tool" title="About This Mac" manage=off
echo "yabai: configuration loaded...\n"
*THIS IS THE CONFIG I AM USING*****
sudo yabai --load-sa
fixed this.I had ran this before and it had not fixed it but i tried it again after a reset and everything started working. Most likely my mistake.
Having the same issue, i had an older version of macOS ventura and just updated to the latest version of Ventura, everything was working fine before so i decided to uninstall and reinstall both yabai and skhd, everything is working including moving the focused container to a new space and setting focus to that space, but changing focus by itself doesnt work.
MacOS version: 13.6.5 (ventura) yabai version: 6.0.15 skhd version: 0.3.9
SIP disabled
In case my config files are needed. Yabai config file:
yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa"
sudo yabai --load-sa
yabai -m config layout bsp
# Space labels
yabai -m space 1 --label main
yabai -m space 2 --label web
yabai -m space 3 --label chat
yabai -m space 4 --label music
yabai -m space 5 --label editors
yabai -m space 6 --label immersion
yabai -m space 7 --label anki
yabai -m space 8 --label terminal
yabai -m rule --add app="^DaVinci Resolve$" space=main
yabai -m rule --add app="^Firefox$" space=web
yabai -m rule --add app="^Discord$" space=chat
yabai -m rule --add app="^Spotify$" space=music
yabai -m rule --add app="^Visual Studio Code$" space=editors
yabai -m rule --add app="^Google Chrome$" space=immersion
yabai -m rule --add app="^Anki$" space=anki
yabai -m rule --add app="^terminal$" space=terminal
# Window rules
yabai -m rule --add app="^(Calculator|System Preferences|System Settings|Archive Utility|Finder)$" manage=off
# Anki card preview
yabai -m rule --add title="^Preview" manage=off
yabai -m rule --add title="^Preferences" manage=off
yabai -m rule --add title="^Settings" manage=off
yabai -m rule --add app="^DaVinci Resolve$" manage=off
yabai -m rule --add app="^Steam$" manage=off
yabai -m rule --add app="^CrossOver$" manage=off
yabai -m rule --add app="^League of Legends$" manage=off
yabai -m rule --add app="^Notes$" manage=off
yabai -m rule --add app="^QuickTime Player$" manage=off
yabai -m rule --add app="^League of Legends$" manage=off
yabai -m rule --add app="^Numi$" manage=off
yabai -m rule --add app="^Kawa$" manage=off
yabai -m rule --add app="^Weather$" manage=off
yabai -m rule --add app="CleanShot X" manage=off mouse_follows_focus=off
yabai -m rule --add app="^CleanShot X$" manage=off
yabai -m config window_border_blur off
# Set all padding and gaps to 20pt (default: 0)
# yabai -m config top_padding 0
# yabai -m config bottom_padding 0
# yabai -m config left_padding 0
# yabai -m config right_padding 0
yabai -m config window_gap 12
# Useful optional stuff
yabai -m config focus_follows_mouse autofocus
yabai -m config window_shadow float
yabai -m config window_border on
yabai -m config window_border_width 1.3
yabai -m config active_window_border_color 0xff00FFB4
yabai -m config normal_window_border_color 0x002E3440
# yabai -m config insert_feedback_color 0xFFA3BE8C
# yabai -m config window_opacity on
# yabai -m config normal_window_opacity 0.9
# Drag/resizes Windows with mouse without having to grab the edges first by holding ctrl
yabai -m config mouse_modifier ctrl
yabai -m config mouse_action1 move
yabai -m config mouse_action2 resize
SKHD config file
# https://github.com/koekeishiya/yabai/wiki/Commands#focus-display
# https://github.com/koekeishiya/dotfiles/blob/master/skhd/skhdrc
# Shouldnt need to blacklist anymore as switching everything over to ctrl not alt
.blacklist [
"League Of Legends"
]
# Navigation
ctrl + alt + shift + cmd - a : yabai -m window --focus west
ctrl + alt + shift + cmd - d : yabai -m window --focus east
ctrl + alt + shift + cmd - s : yabai -m window --focus south
ctrl + alt + shift + cmd - w : yabai -m window --focus north
# Moving windows
ctrl + shift - a : yabai -m window --warp west
ctrl + shift - d : yabai -m window --warp east
ctrl + shift - s : yabai -m window --warp south
ctrl + shift - w : yabai -m window --warp north
# Rotate layout
ctrl - l : yabai -m space --rotate 90
# Balance the layout
ctrl - k : yabai -m space --balance
# Move focus container to display (use "space" instead of display to move to just per space instead)
ctrl + shift - x : yabai -m window --display 1 --focus # main monitor
ctrl + shift - z : yabai -m window --display 2 --focus # vertical
ctrl + shift - c : yabai -m window --display 3 --focus # laptop
# Move focus container to space
ctrl + alt - 1 : yabai -m window --space 1 --focus # main
ctrl + alt - 2 : yabai -m window --space 2 --focus # web
ctrl + alt - 3 : yabai -m window --space 3 --focus # chat
ctrl + alt - 4 : yabai -m window --space 4 --focus # music
ctrl + alt - 5 : yabai -m window --space 5 --focus # editors
ctrl + alt - 6 : yabai -m window --space 6 --focus # immersion
ctrl + alt - 7 : yabai -m window --space 7 --focus # anki
ctrl + alt - 8 : yabai -m window --space 8 --focus # terminal
ctrl + alt - 9 : yabai -m window --space 9 --focus # space 9
# Resize windows
ctrl - a : yabai -m window --resize left:-100:0 ; yabai -m window --resize right:-100:0
ctrl - s : yabai -m window --resize bottom:0:100 ; yabai -m window --resize top:0:100
ctrl - w : yabai -m window --resize top:0:-100 ; yabai -m window --resize bottom:0:-100
ctrl - d : yabai -m window --resize right:100:0 ; yabai -m window --resize left:100:0
# Float / Unfloat window
ctrl - space : yabai -m window --toggle float
# Make fullscreen
ctrl - f : yabai -m window --toggle zoom-fullscreen
# Toggle padding on/off
ctrl - g : yabai -m space --toggle padding --toggle gap
# Disable padding overall
ctrl - y : yabai -m config top_padding 0 \ yabai -m config bottom_padding 0 \ yabai -m config left_padding 0 \ yabai -m config right_padding 0 \ yabai -m config window_gap 0
ctrl - u : yabai -m config window_gap 12
# Toggle floating/bsp
ctrl - h : yabai -m space --layout $(yabai -m query --spaces --space | jq -r 'if .type == "bsp" then "float" else "bsp" end')
ctrl - o : yabai -m config focus_follows_mouse autofocus
ctrl - p : yabai -m config focus_follows_mouse off
# Change desktop
ctrl - 1 : yabai -m space --focus 1
ctrl - 2 : yabai -m space --focus 2
ctrl - 3 : yabai -m space --focus 3
ctrl - 4 : yabai -m space --focus 4
ctrl - 5 : yabai -m space --focus 5
ctrl - 6 : yabai -m space --focus 6
ctrl - 7 : yabai -m space --focus 7
ctrl - 8 : yabai -m space --focus 8
ctrl - 9 : yabai -m space --focus 9
ctrl - 0 : yabai -m space --focus 10
# Create space on the active display
ctrl - n : yabai -m space --create && yabai -m space --focus last
# Delete focused space and focus first space on display
ctrl - m : yabai -m space --destroy
It may be that support for older versions of macOS need to be updated in yabai when Apple releases fixes. Ventura 13.6.5 is a new release and it may have changed things. I don't have a Ventura machine so I cannot verify/fix that. If you have a Ventura 13.6.5 machine, upload Dock.app and post a link and I can take a look.
The same applies to macOS Monterey 12.7.4.
All versions of Sonoma should be working fine on master.
My macOS Version is Sonoma 14.3.1. yabai version: 6.0.15.
when switch space stuck, i get this info from terminal cannot focus space because the display is in the middle of an animation.
Can u help me? What other information can I provide?
Hm that error used to indicate that the display is in the middle of a space transition, but I haven't seen that message in Sonoma.
It may be that support for older versions of macOS need to be updated in yabai when Apple releases fixes. Ventura 13.6.5 is a new release and it may have changed things. I don't have a Ventura machine so I cannot verify/fix that. If you have a Ventura 13.6.5 machine, upload Dock.app and post a link and I can take a look.
The same applies to macOS Monterey 12.7.4.
All versions of Sonoma should be working fine on master.
Hey mate, im going to be real, im not sure if this is the Dock.app file you're asking for but here you go, i found it on /System/Library/CoreServices/. I apologize if this is the wrong one.
Here's a download link for said file (it'll last three days): https://dropover.cloud/68c67ceb908cd96e0092fcf77c0bb155
Anyways, like i said if for some reason the focus space feature stops working i run this:
sudo yabai --load-sa
and it starts working again. Thanks for your time.
Dock for 13.6.5 should be compatible with yabai already without further changes.
@JocelynFloresz , as a side note, if you could fix the typo in the issue title spces -> spaces, it will help others to find this issue in the future, as there's lots of useful help in here!
I have this one... still does not work for me....
/opt/homebrew/bin/yabai -m signal --add event=dock_did_restart action="sudo /opt/homebrew/bin/yabai --load-sa" sudo /opt/homebrew/bin/yabai --load-sa
I ran on the terminal
❯ sudo /opt/homebrew/bin/yabai --load-sa
it asked for password and it loaded... nothing fancy...
I then ran
❯ sudo yabai --load-sa
there was a notification which I had to select to allow and once I did it started to work.
Hm that error used to indicate that the display is in the middle of a space transition, but I haven't seen that message in Sonoma.
this is what i experienced. yabai can auto resize window size. but can't switch spaces
get stack when switch focus spces
sometimes
yabai -m space --focus ${d}
doesn't work with skhd or yabai command, especially after I typed on a space or focus long time on a space. and I get this info:cannot focus space because the display is in the middle of an animation.
I'm so confused, and I veryveryvery need this command. Can somebody help?
Environment
yabai version: 6.0.15 MacOS: 14.3.1 System Integrity Protection:
yabai config: