-
Notifications
You must be signed in to change notification settings - Fork 426
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
Handle dock icon click to open Tunnel Manager (applicationShouldHandleReopen
)
#16
base: master
Are you sure you want to change the base?
Conversation
c37881b
to
2fec12a
Compare
Now that macOS development has somewhat resumed, wondering if anyone has some thoughts on this one? |
I've just added a commit removing the "?". It works as expected by opening the Tunnel Manager when reopened. |
@sebastianlivoni Nice. Does it build "as-is" using Xcode14? I haven't tried recently, but when I tried some months ago I didn't have a Developer license (I do now) so I couldn't build the NetworkExtension... |
Yep, it does built "as-is". I just had to add the following PATH to "Build Settings" because I'm using M1: PATH = ${PATH}:/opt/homebrew/opt/[email protected]/bin |
@zx2c4 or @protonjohn Any chance of this fix making it to the AppStore version? |
Or maybe @alessionossa could take a peek? |
I could take a look at it, but I have no rights on this repository to merge it and create and App Store version. Also, GitHub is just a mirror for https://git.zx2c4.com/wireguard-apple, so you should contact the developer push changes there in order to contribute. |
One thing that bugs me about the WireGuard macOS app is that clicking on its Dock icon does not open the Tunnel Manager window. This is non macOS-like, and limits the ability to show that window programatically via shell scripts, AppleScript, JXA, Alfred etc.
My poor-man's kludge to automate this is to literally quit the app and re-open it, like this (JXA):
...but that's embarrassingly inefficient. I believe after looking at the code that it's because there's no
applicationShouldHandleReopen()
func handler.So this is not a full working PR, just a bit of starter code I was hoping to get refined into a working fix. I do believe the fix is small and fairly easy to implement.
References: