In some situations I would open my macbook in a public place or library, and I still have something open that produces sound, such as music or a chat program giving notifications. I would like to have my sound be muted by default when I open the lid. Anyway to achieve this?
Control Plane is ideal for this sort contextual computing. It's a free, open source app in which you can configure a context. For example a context 'library'. In that context certain rules apply (i.e. mute device). The context can be automatically triggered by numerous things (i.e. sleep/wake event, connected wifi, running applications, ...)
It is useful in many other situations as well, I use this app extensively.
Here is how you can configure Control Plane to do what you asked for:
Under Evidence Sources make sure Sleep/Wake Event is checked
- Under Rules add a new Sleep/Wake Event Rule and set it so when system goes to sleep it activates the muted context with the confidence slider set to 100%.
- Under Actions add a Mute action (Sound and Music Actions > Mute). Set it so that system is muted on arrival at context muted.
There you go. You could of course make the context switch to Muted more intelligent by using and combining different rules (each with its own confidence level).
Have you tried muting the sound?
Muting the sound before closing the lid and/or rebooting will keep the sound muted.
I also found this: Mute volume of macbook on sleep