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

Hide purple icon in window recording #18

Open
stuarteaton opened this issue May 15, 2024 · 4 comments
Open

Hide purple icon in window recording #18

stuarteaton opened this issue May 15, 2024 · 4 comments

Comments

@stuarteaton
Copy link

Did latest versions of Sonoma break this?

let frontAppId = frontOnly ? NSWorkspace.shared.frontmostApplication?.processIdentifier : nil
        // in sonoma, there is a new new purple thing overlaying the traffic lights, I don't really want this to show up.
        // its title is simply "Window", but its bundle id is the same as the parent, so this seems like a strange bodge..
        return availableContent!.windows.filter {
            guard let app = $0.owningApplication,
                let title = $0.title, !title.isEmpty else {
                return false
            }
            return !excludedWindows.contains(app.bundleIdentifier)
                && !title.contains("Item-0")
                && title != "Window"
                && (!frontOnly
                    || frontAppId == nil // include all if none is frontmost
                    || (frontAppId == app.processID))
        }

Just curious, what did you use to inspect and find the title of this icon? It's annoying Apple stick this on the window title bar, it's already in the MenuBar!

@saagarjha
Copy link

Quartz Debug has a nice window list hidden inside of it

@Mnpn
Copy link
Owner

Mnpn commented May 15, 2024

Hi! I don't think this has changed in any recent update. The comment should probably be clearer, though.
What this does is remove the purple overlays from the list of windows by filtering away its title, "Window" (very generic..). The "Window" "window" would otherwise show up in the list of available windows for an app if you're already recording it with another application - fairly certain that is where I found the mention of it. Then by temporarily changing the display title from the window's title to its owningApplication's bundle identifier I could get that info.

The window itself has a grey version of the overlay which I think is actually a part of the window (the traffic lights are replaced as far as I can tell?), so I don't think you can get rid of it unfortunately

@stuarteaton
Copy link
Author

Ah, I understand. Such a pain Apple adds this icon (I kind of get why they want it clear to the ussr ), it is already in the menubar.

Im using your app as a base to create something we can use to consistantly record a window at a fixed size for some demo videos we are making. Your app is a great starting point, so thanks! We will put in some PR's at some point. I have also tidied up the settings window.

Please let us know if you ever figure out a way of getting rid of the purple icon thing!

@Mnpn
Copy link
Owner

Mnpn commented May 16, 2024

Cheers! Will do

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