-
Notifications
You must be signed in to change notification settings - Fork 2
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
missionControlFullDesktopBar stops working occasionally #5
Comments
I admit it's been quite a while since I've revisited this project. (I just keep SIP disabled.) Which version of macOS are you running? I ask because I can't get it to work in Ventura, which is what I'm currently running. One possible workaround for this: can you just not run the app in daemon mode? It might be a bit slower, but hopefully still an acceptable speed. |
Hi! Thanks for responding.
macOS 14.5 (23F79)
I gave that a shot and am having a little trouble. Running missionControlFullDesktopBar with no args launches Mission Control fine. But then the second run (with Okay I ended up with the following, it could be wrong but seems to work: void releaseMissionControl()
{
double timeSince = lastMissionControlInvocationTime ? -[lastMissionControlInvocationTime timeIntervalSinceNow] : 0;
printf("timeSince: %f\n", timeSince);
bool alreadyInMissionControl = false;
determineIfInMissionControl(&alreadyInMissionControl);
printf("alreadyInMissionControl: %d\n", alreadyInMissionControl);
if (timeSince > 0.5 && alreadyInMissionControl) {
printf("Released mission control trigger when in mission control after adequate time!\n");
invokeMissionControl();
cleanUpAndFinish();
} else if (!daemonized) {
printf("Released mission control trigger when not daemonized!\n");
invokeMissionControl();
cleanUpAndFinish();
} else {
printf("Release: not in Mission Control or too soon after initial trigger, so not doing anything\n");
cleanUpAndFinish();
}
} Now the issue is a quick press of Mission Control opens then immediately closes it. I think I could use some logic I have lying around in Hammerspoon to handle this. |
I think you really have to run in daemon mode, otherwise there's no way to know if you should ignore release requests for quick presses. But good news, it's working better with the following. And strangely void releaseMissionControl()
{
double timeSince = lastMissionControlInvocationTime ? -[lastMissionControlInvocationTime timeIntervalSinceNow] : 0;
printf("timeSince: %f\n", timeSince);
bool alreadyInMissionControl = false;
determineIfInMissionControl(&alreadyInMissionControl);
printf("alreadyInMissionControl: %d\n", alreadyInMissionControl);
if (!alreadyInMissionControl) {
printf("Release: not in Mission Control, so not doing anything\n");
} else {
if (!daemonized) {
// when not daemonized, we have no idea what timeSince is, so just do as instructed
printf("Released mission control trigger when not daemonized!\n");
invokeMissionControl();
} else {
if (timeSince > 0.5) {
printf("Released mission control trigger when in mission control after adequate time!\n");
invokeMissionControl();
} else {
printf("Release: too soon after initial trigger, so not doing anything\n");
}
}
}
cleanUpAndFinish();
} |
Sounds good. I don't see anything wrong with that change. It at least means that the |
Hello, long time user of missionControlFullDesktopBar here, thank you!
Problem: Occasionally (several times per work day) missionControlFullDesktopBar just stops working. I have to kill it and restart it and then everything is fine (for a while).
Some details:
-i
because it's slow sometimes.-i
works fine from the Terminal, similar to the behavior you described hereThank you for years of using this tool. FYI I did try some other techniques, Hammerspoon-native stuff to wiggle the mouse, and also BTT, but missionControlFullDesktopBar is just better. If you have time to look into this, or suggestions for me to try, I'd appreciate it.
The text was updated successfully, but these errors were encountered: