Quitting an App during inactivity

So I THINK I am doing this an effective way but I am sure someone here whos way smarter than me has a better idea.

I want to Quit Slack after 5 PM if I am not using the computer, but if I am using it I don't want it to quit.

So Right now I have a macro running on a Time-trigger triggering at 5:15 and 5:35 right now.

So I am using an Idele calculation IDLE > 5*60 so if the computer has been idle it will quit slack but if it has not it won't daily simple.

What I am worried about is if I am using the computer at 5:35 the macro won't quit Slack which is good, but if i walk away at 5:45 and forget to quit slack it won't quit. So I could solve this by adding other time triggers like 6:00 PM ect, but just wanted to see if anyone had a better method like almost a "snooze"