How to get a power cable connected/disconnected alert on macOS

macOS normally doesn’t alert users to hardware changes. You get alerts when you move files, or delete them but those are software changes. Hardware changes such as connecting a disk, a phone, or the power cable aren’t normally accompanied by any sort of audio alert but there is a built-in mechanism that can be used to enable these alerts. Here’s how you can get power cable connected/disconnected alerts on macOS.

This trick may be limited by hardware but generally speaking if you have a Mac model that was released in 2015 or later, it should work. Click the Apple icon in the menu bar and select About This Mac to see what year your model is from.

Power cable connected/disconnected alerts

Open Terminal and run the following command.

defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app &

Connect, or disconnect the power cable from your Mac and you will hear an audio alert. There will be no visual/desktop alert telling you what the sound means.

If you later decide you can do without the alerts, you can disable them with the following command.

defaults write com.apple.PowerChime ChimeOnAllHardware -bool false;killall PowerChime

If you have the sort of power cable that lights up when it connects to your MacBook, the alert won’t sound until the light on it comes On. It doesn’t matter if the MacBook is fully charged or charging. The light indicates that a power connection has been established with the device and that’s what triggers the chime.

This command will likely also enable alerts for other hardware connect/disconnect events e.g. when you connect a USB you will likely hear another audio alert.

If you compare macOS and Windows, you’ll find they’re practically polar opposites in this area. On Windows 10, each and every hardware related event is accompanied by an audio alert, and sometimes even a visual/desktop alert e.g. when you connect a phone or external drive. It does not, however, give users an alert when the power cable is connected or disconnected and it has no built-in mechanism to do so.

macOS simply doesn’t send alerts when there is a hardware change but it has the ability to do so. This allows users to enable the alerts natively and not have to rely on a third-party app to do the job for them. Once the alerts are enabled, they include alerts for the power cable connecting/disconnecting as well.

Need power cable connected/disconnected alerts on Windows 10? You will have to use an app.

Read How to get a power cable connected/disconnected alert on macOS by Fatima Wahab on AddictiveTips – Tech tips to make you smarter

How to check which apps are keeping a Mac from sleep

Apps can keep a Mac from going to sleep if their functionality calls for it. A browser may prevent an app from going to sleep if it’s downloading a file. Similarly, an app that is playing media may also prevent macOS from entering the sleep state since users will not interact with the device while watching something. These types of apps are obvious examples but if you suspect an app is keeping your Mac from sleeping, but you cannot figure out which one it is, you can check Activity Monitor.

View apps keeping Mac awake

Open Activity Monitor. You can open it from the Launchpad, or you can use Spotlight search to launch it. Go to the Energy tab and you will see a column called ‘Preventing Sleep’. Look through this column and if there’s an app entry that reads ‘Yes’ in this column, it is preventing the Mac from sleeping. The screenshot below shows that the Mac isn’t being kept awake.

We ran an app called Amphetamine which is a popular app for keeping Macs awake. Once the app was running and active, we returned to the Activity Monitor and sure enough, it was listed in the Energy tab as an app that was preventing the Mac from going to sleep.

If you find an app is preventing sleep there are a few things you can try. First, check what the app is doing. If it’s an activity that will be interrupted should the system go to sleep, wait for the activity to complete or cancel it if that’s an option.

If the app isn’t doing anything that would require your Mac to remain awake indefinitely, check the app’s settings. Mac apps don’t accidentally prevent sleep so it’s possible the app has a setting that where it prevents sleep. If it does, you can turn it off.

If neither of the above two methods work quit and relaunch the app. It may fix the problem. You should also check if the app is actively communicating with another app and in doing so, preventing your Mac from going to sleep.

macOS runs a tight ship when it comes to sleeping a system. It runs on desktops as well as on MacBooks where battery life is important and therefore, it won’t allow the system to remain awake when it isn’t being used. To that end, it isn’t easy to force macOS to stay awake so if your Mac won’t sleep, there is definitely something behind it and not just a system fluke.

Read How to check which apps are keeping a Mac from sleep by Fatima Wahab on AddictiveTips – Tech tips to make you smarter

How to set default apps on macOS

macOS has some of the best apps for everyday tasks but that doesn’t mean everyone loves or uses them. Lots of people still prefer to use Chrome instead of Safari on macOS. Likewise, not everyone uses the default Mail app either. Here’s how you can change default apps on macOS. We’re going to detail the process for general files, and for browsers and mail clients separately.

General files

For general files like text files, images, or media files, you need to have at least one type of the file present on your system. Right-click it and select Get Info from the context menu.

In the window that opens, look for the Open With section. There will be a dropdown under it. Open the dropdown and select the app you want to set as the default app for that file type. Once you’ve selected the app, click ‘Change all’. You will get a prompt telling you that the default app will be changed for all files of that type. Confirm the change and it will be applied.

Browser

Open the System Preferences app and go to the General preference. There is a setting here for Browsers. Open it and it will list all the browsers installed on your Mac. Select the one you want to use as the default browser.

Mail client

In order to change the default mail client, you need to open the Mail app. Don’t worry if you do not have any email account set up. Once the app is open, go to its preferences (tap Command+,).

On the General tab, there’s a dropdown called ‘Default email reader’. Open it, and select a different email client. You must, of course, have a different email client installed on your Mac or it will not appear in this list. Unfortunately, only email apps will be listed here so apps like browsers that can handle mailto; requests will not show up in the list.

For most other app types e.g., movies, audio files, text files, and even Plist files, you will set the default app by following the general files method.

You can also set a default app on a per-file basis. There’s a built-in option on macOS that lets you do that, and we have a detailed article on how to set it.

The default apps can be changed any time you like and the change doesn’t require admin rights. macOS won’t stop you from setting an incompatible app as the default app for a particular file so make sure the app you’re using as the default app for a certain file type can actually open it.

Read How to set default apps on macOS by Fatima Wahab on AddictiveTips – Tech tips to make you smarter

How to remove EXIF data from Photos on macOS

Removing EXIF data from a photo, en-masse, on Windows 10 is fairly easy and you’d expect something similar on macOS. You’d be wrong. The best, most frequently recommended tool for removing EXIF data from a photo on a Mac leaves you with an ‘optimized’ image. If you need to remove EXIF data from photos on macOS, and you’ve got a lot of photos, we recommend using EXIF Purge.

EXIF Purge is a free app, with ads, that’s available on the Mac App Store. It does not compress images. It simply strips them of any and all EXIF data.

Remove EXIF Data from Photos

If you want to check if an image has any EXIF data, open it in Preview and go to Tools on the menu bar. Select Show Inspector. In the window that opens, select the tab with ‘i’ in the title, and check if it has an EXIF tab and a GPS tab. If it does then your image does indeed have EXIF data that needs to be purged.

Open EXIF Purge and drag & drop the images that you want to remove EXIF data from. The app will create duplicates of the photos and you need to select an output location for where the photos will be saved. Click ‘Purge EXIF Info’. You will see a pop-up with an ad and a timer. When the timer ends, you can close the pop-up and your images will be purged of their EXIF data.

Once the data has been removed, there’s no easy way to add it back. If you think you will likely need the data at some point in the future, you should not delete the original photos.

It is very odd that macOS doesn’t have a built-in tool for this when the OS has the best file viewer, and the best photo managing app of all the other popular desktop operating systems. The Photos app isn’t just great for managing a large photo library, it’s actually used by a lot of professional and hobbyist photographers to manage and edit photos yet it still doesn’t let users remove or edit the EXIF data.

In Preview, you have the option to remove location data but nothing else. Location data is the more sensitive type of data that is stored in a photo and it is what can lead to one’s privacy being compromised. It is possible that that is why Apple has an option to remove it and not other information e.g., when a photo was taken and what sort of device was used to take it.

Read How to remove EXIF data from Photos on macOS by Fatima Wahab on AddictiveTips – Tech tips to make you smarter

How to lock the Dock on macOS

The Dock is one of the most essential UI elements on macOS. It serves as a quick-launch location for apps that you use often, and for accessing apps and folders that are currently open. The Dock is fully customizable; you can add/remove items from it, change its size, its position on the screen, hide/unhide it, enable/disable animations, and you can choose which apps are pinned to the Dock. If you’d like to prevent any changes from being made to it, you can lock the Dock to do so. The lock option isn’t built into the UI. Instead, you have to use a terminal command.

Lock the Dock

Before you lock the Dock, you should set it up exactly the way you want it to look. It’s a good idea to use it with its current layout for a few days so that you know it works for you. If you’re satisfied with the layout, open Terminal and run the following commands, one by one.

defaults write com.apple.dock contents-immutable -bool true

killall Dock

When you right-click any of the apps pinned to the Dock, the option to remove it from the Dock will be absent.

Unlock the Dock

To unlock the Dock, open Terminal and run the following commands one by one.

defaults write com.apple.dock contents-immutable -bool false

killall Dock

When you right-click apps pinned to the Dock, the option to remove them will be back. You will also be able to add apps and folders to the Dock.

Locking the Dock does not require admin user authentication. This means that if you lock the Dock for a particular user, that user can probably figure out what’s going on and unlock the Dock. This terminal command, while really useful, is hardly a good way to enforce some sort of layout on a system.

A locked Dock won’t allow a user to add items to it but, new apps that open, new files, and new folders will still appear on it. You will not be able to rearrange items on the Dock.┬áLocking the Dock prevents changes to it but it remains as functional as ever. New item badges continue to appear on it, and any app action progress e.g., file download progress will still show on the icon for an app.

While this command is strictly for locking and unlocking the Dock, it might help to fix problems you’re having with the Dock. If you’re unable to add items to the Dock, or items tend to keep disappearing, running the unlock command might help.

Read How to lock the Dock on macOS by Fatima Wahab on AddictiveTips – Tech tips to make you smarter