Precise control instead of --toggle
0PandaDEV opened this issue · comments
Is it possible to precisely control a window, for example
yabai -m window --toggle float
would be
yabai -m window --off float
This could be very useful also for other properties.
This is what I've been looking for too. It seems like such a simple functionality.
if [ $(yabai -m query --windows is-floating --window | jq -re '."is-floating"') = true ]; then yabai -m window --toggle float; fi
if [ $(yabai -m query --windows is-floating --window | jq -re '."is-floating"') = true ]; then yabai -m window --toggle float; fi
That's definitely a workaround, but it would be nice to have a built-in method. I'll use it nevertheless, thank you.
Things that are very primitive to script are unlikely to be added. I prefer the CLI to remain consistent across all commands. Same approach as above is used if you want to cycle space layouts, window focus, cycle windows inside a layout etc. or do other things that can be achieved by chaining commands
if [ $(yabai -m query --windows is-floating --window | jq -re '."is-floating"') = true ]; then yabai -m window --toggle float; fi
ok but this does not work for me when i try to use it within skhd
cmd + shift - left : yabai -m window --warp west
cmd + shift - down : if [ $(yabai -m query --windows is-floating --window | jq -re '."is-floating"') = true ]; then yabai -m window --toggle float; fi && \
yabai -m window --off zoom-fullscreen
cmd + shift - up : yabai -m window --on float && \
yabai -m window --on zoom-fullscreen
cmd + shift - right : yabai -m window --warp east
alt - q : if [ $(yabai -m query --windows is-floating --window | jq -re '."is-floating"') = true ]; then yabai -m window --toggle float; fi
Works just fine for me. Check logs at /tmp/skhd_$USER.[err|out].log
Which shell are you using?
zsh