7

I was wondering if there was any way to mute my macbook whenever I physically close it, so if there was anything playing prior to closing it that it does not continue to make noise when I open it later.

Seems like a weird request, but I have a bad habit of forgetting to pause my music/youtube when I leave for class, than when I open my laptop in class it disrupts the class.

The easy answer would be, "just pause your stuff", but I thought it would be nice if there was something that could accomplish this.

3 Answers 3

3
  1. Download SleepWatcher (free, source code included).

  2. Install it using the instructions included in the download.

  3. Have your 'sleep' script call osascript (AppleScript)

    /usr/bin/osascript -e 'set volume with output muted'

Now your Mac will be muted anytime your computer goes to sleep.

If you want to make extra sure that it is muted when it wakes from sleep, add

/usr/bin/osascript -e 'set volume with output muted'

to your 'wake' script as well.

2

The app Auto Mute automatically mute the volume on sleep. And it's free.

You can download it from: https://auto-mute.com/files/auto-mute.dmg

Settings of Auto Mute

1
  • "Auto Mute" cannot be opened because the developer cannot be verified. macOS cannot verify that this app is free from malware. Jan 11, 2023 at 14:23
0

Use the API that provides a sleep notifications to write an app that gets a callback when the system is about to sleep. Inside the callback, set the system volume to mute.

2
  • 4
    It seems fairly unlikely that the average person reading this post is going to be able to use the advice to "write an app".
    – TJ Luoma
    Dec 10, 2013 at 23:28
  • @TJLuoma yeah, that is a good point.
    – Kevin Chen
    Dec 11, 2013 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .