Every time I need to reinstall my Mac, which has happened more often than I would have guessed, there are certain terminal commands I need to look up.
Set length of time Notification Banners Persist
Those little notification banners in the upper right hand corner of the screen seem to stay up there forever. Bothers me. I like them to disappear much more quickly. You can change this in Terminal.
defaults write com.apple.notificationcenterui bannerTime [time in seconds]
Or to go back to the default.
defaults delete com.apple.notificationcenterui bannerTime
SOURCE: OS X Daily
Open new document when launching TextEdit
TextEdit is a great text editor for jotting down quick bits of text (until they make Drafts for macOS). To start this behavior.
defaults write com.apple.TextEdit NSShowAppCentricOpenPanelInsteadOfUntitledFile -bool false
To revert to the default behavior of opening with a window asking which file to open, type this into terminal.
defaults delete com.apple.TextEdit NSShowAppCentricOpenPanelInsteadOfUntitledFile
Save as PDF with ⌘P
This is great for quickly turning something into a PDF by pressing ⌘P twice in rapid succession. Thanks to MacSparky for the tip. He even made a video of the process.
In System Preferences, select Keyboard and then Shortcuts. Select “App Shortcuts” from the side panel and click the “+” to add one to All Applications.
Then type “Save as PDF…” using not three periods but an ellipse (option + semi-colon) in the Menu Title box. Press command-P in the Keyboard Shortcut box, click Add and you’re done.
And now in any application in which you can print, if you press ⌘P twice in rapid succession you get a Save as PDF… dialog box.