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

title config should be respected and set immediately on new windows, tabs #5934

Open
mitchellh opened this issue Feb 22, 2025 · 0 comments
Open
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux os/macos

Comments

@mitchellh
Copy link
Contributor

Discussed in #5836

Originally posted by vaygr February 17, 2025
Steps to reproduce:

yabai -m rule --add app="Ghostty" title="^scratchterm$" scratchpad="scratchterm" grid=5:5:1:0:3:3
open -na Ghostty.app --args --title="scratchterm"

Even though the title is reported correctly once ghostty is launched:

{
        "id":5281,
        "pid":13867,
        "app":"Ghostty",
        "title":"scratchterm",
        "scratchpad":"",
        "frame":{
                "x":12.0000,
                "y":50.0000,
                "w":1488.0000,
                "h":920.0000
        },
        "role":"AXWindow",
        "subrole":"AXStandardWindow",
        "root-window":true,
        "display":1,
        "space":1,
        "level":0,
        "sub-level":-20,
        "layer":"normal",
        "sub-layer":"below",
        "opacity":1.0000,
        "split-type":"vertical",
        "split-child":"second_child",
        "stack-index":0,
        "can-move":true,
        "can-resize":true,
        "has-focus":true,
        "has-shadow":true,
        "has-parent-zoom":false,
        "has-fullscreen-zoom":true,
        "has-ax-reference":true,
        "is-native-fullscreen":false,
        "is-visible":true,
        "is-minimized":false,
        "is-hidden":false,
        "is-floating":false,
        "is-sticky":false,
        "is-grabbed":false
}

But the rule never gets triggered, that is unless I remove title argument for yabai -m rule or set it to ^.*$.

I tested it with kitty to see if it could be yabai's issue, but no, it worked as expected:

yabai -m rule --add app="kitty" title="^scratchterm$" scratchpad="scratchterm" grid=5:5:1:0:3:3
kitty --title "scratchterm"

My assumption is ghostty could be setting the title a bit too late?

Notes

Right now, the core Surface sends a set_title apprt action AFTER the surface is initialized, which -- at least for macOS -- happens to be after the Window (tabs are also windows in macOS) is created.

If the user sets an explicit title config, we should set that as part of the window creation process rather than wait for this message.

@mitchellh mitchellh added gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux os/macos labels Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux os/macos
Projects
None yet
Development

No branches or pull requests

1 participant