MacOS – Mute Mac Sound When Idle

audiomacospreferences

I like it when my Mac announces the time every hour. It keeps me focused or provides me with a reminder to take a break. I also like it when Mail makes a sound when new messages arrive so I can check them. I like all these sounds when I'm using my computer.

What I don't like is these sounds when I'm not using my computer mainly because my Mac is in my bedroom. Usually the solution is simply to mute the Mac before bed but I sometimes forget and am woken up by an announcement telling me the time or letting me know new mail is in during the middle of the night.

Without putting my computer to sleep (I want it awake at all times when plugged in so it can do things I need it to do), is there any way my Mac can mute its sound when it is idle (or more preferably idle for some period of time)?

Best Answer

I wanted the same and didn't find anything nice, so I coded an app for myself. You can find the code here and already as compiled app here.

Let me know what you think.