-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
How to make JetBrains products sub-window float? #194
Comments
If you're running current master, you can do this with the yet unreleased changes to signals: Try the opposite way: float all windows, then unfloat all windows that are the only window of the application when they are created. # regex that matches JetBrains apps
apps='^(IntelliJ IDEA|WebStorm|CLion)$'
# float all JetBrains apps
yabai -m rule --add app="${apps}" manage=off
# add a signal that floats a window created by these apps when it's the only window
yabai -m signal --add event=window_created app="${apps}" action='/path/to/some/script' Now the action would need to be contained in an external, executable file (remember to # check if there is exactly one window belonging to the process of the window that was just created
if yabai -m query --windows \
| jq -er 'map(select(.id == env.YABAI_WINDOW_ID).pid)[0] as $pid | map(select(.pid == $pid)) | length == 1' > /dev/null
then
# unfloat the window
yabai -m window "${YABAI_WINDOW_ID}" --toggle float
fi The reason the script needs to be in an external file is that the daemon message length is limited, and this script exceeds that length by a bit. That limit will likely be removed in the future, making this a bit easier. |
If all your projects stem from one directory like mine you can do something like that. |
@dominiklohmann 如果你打开多个项目,那么他们的PID是相同的 我觉得我们应该使用Title来判断这个文件是否存在: ~ >>> yabai -m query --windows --window 1443 | jq .title
"rds-console [~/Documents/jingdong/daasfe/rds-console] - .../client/.eslintrc.js"
~ >>> yabai -m query --windows --window 2145 | jq .title
"App.vue [/private/var/folders/3k/vs18p5xd7y145l5vq0m587640000gn/T/App.vue] - ~/Downloads/App.vue" yabairc (use master branch) # regex that matches JetBrains apps
JetBrainsApp='^(IntelliJ IDEA|WebStorm|GoLand)$'
yabai -m rule --add app="${JetBrainsApp}" manage=off
yabai -m signal --add event=window_created app="${JetBrainsApp}" action="${XDG_CONFIG_HOME}/yabai/JetBrainsApp.sh"
JetBrainsApp.sh #!/bin/sh
title=$(yabai -m query --windows --window ${YABAI_WINDOW_ID} | jq .title | cut -d [ -f 2 | cut -d ] -f 1)
title="${title/\~/$HOME}"
if [ "$title" == "." ]; then
absolute=$(pwd)
elif [ "$title" == ".." ]; then
absolute=$(dirname "$(pwd)")
else
absolute=$(cd "$(dirname "$title")"; pwd)/$(basename "$title")
fi
if [ -e $absolute ];then
yabai -m window ${YABAI_WINDOW_ID} --toggle float
fi |
@dominiklohmann interestingly I have to restart yabai while the IDE is running before this gets applied to the IDE windows. If I start the IDE after yabai all windows are floating... 🤔 |
Seems this broke with the latest release. All Jetbrains windows are floating now for me. :( |
Any updates on this? |
Can we reopen this issue? |
@cake808 I fresh installed Catalina and experienced the issue also. I investigated with One thing I love about JetBrains is that they have a setting to revert to the original functionality. Go to |
I was able to achieve it with this for IntelliJ:
And, as @kerryj89 said:
|
@shepherdjerred I've slightly modified your rules to match gradle files in Android Studio (their title doesn't seem to be affected by the "Always show full path in window header"):
|
@ubuntudroid I think your rules work even better than mine. Thanks for contributing! |
Thank you @ubuntudroid for your solution. |
@carlosuno Neat, didn't know about that reverse operator! Many thanks! 🙏 |
I am trying to do the same for Ableton and 3rd party plugins, unfortunately Ableton does not have an option to show the full path in the title, therefore the latest solution does not work. I did find that there is an option for Ableton called Here is an example of what I get when I use
Unfortunately I cant seem to do something like I also tried the initial solution used in this thread but that does not seem to work anymore. Please let me know if this is the wrong place to be asking for help. |
Unfortunately yabai doesn't manage my IntelliJ after using the solution provided by @carlosuno - does anyone have a configuration specifically for IntelliJ IDEA? |
my intellij is also not managed by yabai, only if I restart with the IDE open :( |
@Frankcs96 Maybe the reason is like stated here |
Works for me:
|
Great!It's working again,🤪。 yabai -m rule --add app="^IntelliJ IDEA-EAP$" manage=off
yabai -m rule --add app="^IntelliJ IDEA-EAP$" title="( – )" manage=on |
I'm still experiencing this issue.
nor this
or this
seems to work. Am I doing something wrong or is the mentioned issue still present? |
they need to float: koekeishiya/yabai#194 (comment)
they need to float: koekeishiya/yabai#194 (comment)
Same. By applying these changes (I'm using |
I'm using the following config and it works on MacOS Ventura 13.2.1 and yabai-v5.0.2:
|
The following
Essentially, whenever there is a window that behaves oddly (e.g., float even if it shouldn't), select that window and invoke that shortcut once to toggle floating for it. Works like a charm for me every time. The center part (second line) of the command is optional. Feel free to remove it if you don't need it. Disclosure: I don't remember whether this command was part of |
@Kurounin
However, when the project was first opened, this seemed not work. |
I have solved this in #1687 (comment) |
This works for me in PhpStorm, my only issue now is with the popups are being very annoying where Yabai thinks it's a new window for every small popup that appears in the IDE. Has anyone else encountered this? Any idea on how I can try to manipulate these popups from being detected as a new window? Thanks! |
Hi,I want to make the JetBrains application sub window be float.I config it by following configuration.
yabai -m rule --add title='.*Welcome*.|Checkout*.|.*Configurations|Choose*.|Import*.|.*Charges|Tip*.|Rename*.' manage=off
Is there any other better way?
The text was updated successfully, but these errors were encountered: