-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix notifications on MacOS #3
Labels
bug
Something isn't working
Comments
The app just dont send the notifications or it broke? |
Try replacing this in the input.c mainMenuInput(): if(key == 'E'){
if(app->menuPos == 1){
app->E = 'C';
app->timer = (app->workTime * 60 * 16);
app->frameTimer = 0;
app->currentMode = 1;
app->pomodoroCounter = app->pomodoroCounter + 1;
system("notify-send -t 5000 -c cpomo \'華 Work!\' \'You need to focus\'");
}
else if(app->menuPos == 2){
app->currentMode = -1;
app->menuPos = 1;
}else{
endwin();
exit(EXIT_SUCCESS);
}
} by: if(key == 'E'){
if(app->menuPos == 1){
app->E = 'C';
app->timer = (app->workTime * 60 * 16);
app->frameTimer = 0;
app->currentMode = 1;
app->pomodoroCounter = app->pomodoroCounter + 1;
#ifdef __APPLE__
system("osascript -e \'display notification \"華 Work!\" with title \"You need to focus\"\'");
#else
system("notify-send -t 5000 -c cpomo \'華 Work!\' \'You need to focus\'");
#endif
}
else if(app->menuPos == 2){
app->currentMode = -1;
app->menuPos = 1;
}else{
endwin();
exit(EXIT_SUCCESS);
}
} when you press enter the app should notify you, if it work I'll fix all the cases. I don't have any apple device so I will need you to test it ;) |
will test and make pr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On MacOS there is no
notify-send
command.The text was updated successfully, but these errors were encountered: