Skip to content

Commit

Permalink
🕹 Fixing MacOS notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielzschmitz committed Jan 10, 2023
1 parent 6367e72 commit 6a76beb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions input.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ void mainMenuInput(appData * app, char key){
app->frameTimer = 0;
app->currentMode = 1;
app->pomodoroCounter = app->pomodoroCounter + 1;
system("notify-send -t 5000 -c cpomo '華 Work!' 'You need to focus'");
#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;
Expand All @@ -124,7 +128,11 @@ void mainMenuInput(appData * app, char key){
app->frameTimer = 0;
app->currentMode = 1;
app->pomodoroCounter = app->pomodoroCounter + 1;
system("notify-send -t 5000 -c cpomo '華 Work!' 'You need to focus'");
#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;
Expand Down

0 comments on commit 6a76beb

Please sign in to comment.