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 6a76beb commit 15042b3
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions update.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,21 @@ void doUpdate(appData * app){
app->pomodoroCounter = 0;
app->frameTimer = 0;
app->currentMode = 3;
system("notify-send -t 5000 -c cpomo ' Pause Break' 'You have some time to chill'");
#ifdef __APPLE__
system("osascript -e \'display notification \" Pause Break\" with title \"You have some time chill\"\'");
#else
system("notify-send -t 5000 -c cpomo \' Pause Break\' \'You have some time chill\'");
#endif
}else{
app->E = 'M';
app->timer = (app->shortPause * 60 * 16);
app->frameTimer = 0;
app->currentMode = 2;
system("notify-send -t 5000 -c cpomo ' Pause Break' 'You have some time chill'");
#ifdef __APPLE__
system("osascript -e \'display notification \" Pause Break\" with title \"You have some time chill\"\'");
#else
system("notify-send -t 5000 -c cpomo \' Pause Break\' \'You have some time chill\'");
#endif
}
}

Expand All @@ -78,7 +86,11 @@ void doUpdate(appData * app){
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
}

/* Machine Animation */
Expand Down

0 comments on commit 15042b3

Please sign in to comment.