-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Update macOS window title logic #49
base: master
Are you sure you want to change the base?
Conversation
- Switch from the opaque scpt file to a normal JS file using JavaScript for Automation. - Grab the first window (which is the active one) and get its name as the title. This worked across all apps I tried, including Sublime, Atom, Chrome, Safari, and iTerm - Clean up the api to the macos.py file (have it return the dict directly) - Fix a typo in README
This pull request introduces 2 alerts and fixes 1 when merging 8c33a3e into ff08c9c - view on LGTM.com new alerts:
fixed alerts:
|
Hey @xylix I made some progress here and seem to have tracked down the issue as to why window titles aren't being returned (screen recording permissions needed...) Would you be interested in (and have the time) to continue work on this in the near future? I don't think it should be that much work now that I found the core issue. |
This pull request introduces 6 alerts and fixes 1 when merging 9af9993 into ff08c9c - view on LGTM.com new alerts:
fixed alerts:
|
I might have time in a couple weeks... can't really promise I will, though. It is probably pretty doable in a few hours of work at this point. On the fork / subprocess stuff: I've coded some other python multiprocessing and came across fork crashing things on macOS. Only being able to use fork with pyinstaller seems like a quite difficult limitation to work around 🤔 |
Understandable, just checking :) tbh I think it might sense to make a release supporting both the new and old method (with the old as default, for the time being), so we can get something basic merged and go from there. Re |
@ErikBjare what's left to do here? What's breaking/needs more testing? |
@iloveitaly Basically everything mentioned in the PR description. I've abandoned work on this for now, as you provided an alternative method that wasn't as cumbersome to implement (but may still suffer from some of the same bugs). |
Ah, I saw now that this would improve CPU and memory from frequently spawning a process. I guess this needs to be revisited, but I'm personally prioritizing signing the app bundle, but it might be easier to do if we had this... I'll think about it, unless you're willing to give it a shot @iloveitaly? :) |
@ErikBjare I may have time to take a look! Do you remember why this didn't get merged / what was left to do here? |
@ErikBjare any notes around what's left here to do? |
@iloveitaly Only what's in the PR description I think. Basically testing it and making sure that permissions etc work. |
@ErikBjare we should close this out too—the swift-based method solves all of these problems! |
Continuing on #40
Issues
set_start_method
s 'spawn' and 'forkserver' cannot be used with 'frozen' executables (as produced by PyInstaller). But 'spawn' became the default in Python 3.8, and the Python 3.7 default of 'fork' seems to make the new process crash...