MacOS¶
The best overall desktop OS even when compared to Linux + KDE.
shortcuts¶
Some keyboard shortcuts can be changed, some can't (or are a bit complicated to change). Go to Settings -> Keyboard -> Shortcuts to view the changeable ones.
command+Q¶
Command + Q is an unchangeable shortcut key which will close an application. You can't remove it, but you can remap it to harmless stuffs (like Show Notification Center).
https://apple.stackexchange.com/questions/78948/
Minimize shortcut¶
The unchangeable shortcut for minimizing a window is CMD+M
. To disable it
- System Preferences > Keyboard > Shortcuts > App Shortcuts
- Add a shortcut with title =
Minimize
mapping to an obscure shortcut - Close the settings window for it to take effect
Active apps also need to be reopened otherwise pressing CMD+M
on them will still minimize them.
See https://apple.stackexchange.com/a/125628
Or you can reassign CMD+M
to another shortcut.
Reassign system shortcuts¶
See Locking your Mac with Command+L
- Press 🍎 icon to see the name of your desired command
- Settings -> Keyboard Shortcuts -> App Shortcuts
- click Done -> quit Settings -> success
Menubar¶
The topmost bar
Command + drag to rearrange the items
Set what to appear and what not¶
Settings -> Control Center
Some items hidden by notch¶
You can make menubar not use the area under notch but below it on a per app basis by going to Applications folder in finder -> Get Info -> check "Scale to fit below built-in camera". See https://support.apple.com/en-us/HT212842/.
Sleep¶
display sleep command¶
display sleep = display off
sleep log¶
Mac sleeps and wakes from sleep immediately, almost like it's only a screen off.
To check if it really sleeps
require password from sleeping or not¶
In macOS Ventura 13, the settings is tied with display off
System Settings -> Lock Screen -> Require password after screen saver begins or display is turned off
https://support.apple.com/en-lb/guide/mac-help/mchlp2270/mac
Restart audio service¶
Should restart automatically
See https://apple.stackexchange.com/a/366841
Adjust brightness or volume in smaller steps on keyboard¶
Hold shift+option
Applications¶
Install/remove applications¶
After installing, move the .app
to Applications
directory.
To remove an app, go to Applications
and move it to trash.
Open app from terminal¶
Homebrew¶
package manager for MacOS
update & upgrade packages¶
autoremove¶
Screen edge¶
Desktop & Screen Saver
-> Hot Corners
Check CPU temperature¶
Wifi Card¶
en0
Proxy¶
Set proxy¶
https://www.laptopmag.com/how-to/set-up-a-proxy-on-macos
Check your current proxy setting¶
list services
check proxy setting for http
for https
example response when no proxy
$ sudo networksetup -getwebproxy Wi-Fi
Password:
Enabled: No
Server:
Port: 0
Authenticated Proxy Enabled: 0
Commands¶
sleep¶
Get computer name¶
Get the one displayed in Settings -> General -> About -> Name
Normally hostname
should work too but MacOS decides that it should be changed to some random name when you're both connected to ethernet and wifi.
Create wifi hotspot from ethernet connection¶
Settings -> Sharing -> information symbol to edit (can only edit when off) -> turn it on
Sniffing packets¶
See Sniffing Packets from Wireless Networks
Tools¶
Preventing overcharging - Aldente¶
Aldente helps you maintain the battery level at a certain point even when your MacBook is always plugged in, so that you can maintain the state of charge between 20% and 80% to extend battery life.
Sync config files - Mackup¶
Use Mackup
Open VsCode from terminal¶
- If you haven't, put your vscode into the
Applications
folder - command pallette ->
Shell Command: Install 'code' command in PATH
https://stackoverflow.com/a/36882426/15493213
windows snapper - Rectangle¶
Rectangle (the successor of Spectacle)
command+number to launch apps on dock¶
Download Snap. Would work out of the box.
alt+tab with thumbnail¶
Default key would be option+tab
clipboard manager - Maccy¶
free + search + image + popup with shortcut (sadly no pin)
(it's $330 in App store but free downloading from the website, just type $0 and a random fake email for receipt and the download will start)
screenshot - Snipaste¶
Snipaste
music controller in control center¶
quickly move between displays/monitors - CatchMouse¶
https://github.com/round/CatchMouse
home page
https://web.archive.org/web/20150502123813/http://ftnew.com:80/catchmouse.html
download -> unzip -> right click on the app -> open -> set your keyboard shortcuts
You can also just git clone
or download the zip from the github repo and you'll find a .app
inside. Simply drag it to /Applications/
and open it.
Your cursor will appear right at the middle of the corresponding display after triggering the shortcut key.
If it doesn't work, go to Settings -> Privacy & Security -> Accessibility -> remove it -> readd it
use normal scrolling direction¶
Prevent sleep when lid closed - Amphetamine¶
M2
It does not work
Before M2
There is no native way to do this (unless you're connected to an external monitor). Have to install 3rd party app.
- Install Amphetamine on App Store.
- Install Amphetamine Enhancer from Github
- Setup Amphetamine Enhancer
- Click Amphetamine's icon on the menu bar
- Quick Preferences -> uncheck "Allow system sleep when display is closed"
- Start New Session -> "Indefinitely"
- Preferences -> General -> check all boxes under "Launch and Wake behavior"
- That's it
- you can still make your computer sleep in the normal way
Only show relevant menubar items¶
Use Bartender. It's not free but after the free trial it only pops up to tell you to buy it from time to time while still letting you access full features, like WinRAR.
You can also try Dozer
Dozer will giver you 2 dots on the menubar. Drag relevant menubar items to the right of the leftmost dot and press it, now all the other items will be gone. Click again and they will reappear.
Show ethernet status in menubar¶
Use https://apps.apple.com/us/app/ethernet-status-missing-lan/id1186187538
Troubleshooting¶
Show hidden files in Finder¶
Some settings do not take effect¶
Close and reopen the app if the new settings aren't working on an app.
Stop desktop order from changing itself¶
System Preferences > Mission Control -> uncheck "Automatically rearrange Spaces based on most recent use"
https://apple.stackexchange.com/a/214349
Stop apps pinning itself on dock¶
System Preferences -> Dock & Menu Bar -> Uncheck "Show recent applications in Dock"
https://apple.stackexchange.com/a/338004
make dock appears on another display¶
When you're using more than one display, you can only make the dock appears on one of them. To make the dock appears on another display:
hide the dock (use the shortcut listed in system preferences -> keyboard -> shortcuts) -> go to another display -> keeps moving your cursor down (bottom screen edge) until the dock appears
use the normal fullscreen in firefox¶
When you press f11, the tabs and bookbar bar are still there. To hide them, (when you're still in "fullscreen") right click on the hamburgar menu -> "Hide Toolbars".
To return to the default retarded MacOS behavior, create a new tab (with your hotkey or whatever) to make the tab bar appear, and then right click on the hamburgar menu -> unselect "Hide Toolbars".
Note that the fullscreen after you hide the toolbars is still not the same as it is on Windows & Linux. When your cursor move to the top of the screen, only the bookmark bar & the main bar are show, while the tab bar still remains hidden.
Two Finger Pinch Zoom Unreliable¶
sol1: spread wide open on trackpad (doesn't work)
https://discussions.apple.com/thread/253369850
sol2:
No xxx in spotlight result¶
See https://support.apple.com/en-us/HT201716
- Locate the directory the missing thing is in, e.g.
simulator.app
is from/Applications/Xcode.app/Contents/Developer/Applications
. - Go to System Preferences -> Spotlight -> Privacy
- Drag the directory into it (so the directory will not be indexed)
- Remove it (so the directory will be indexed again)
- Quit System Preferences
- Now it should work
Can't lock by pressing TouchID / power button¶
Press with a finger not registered for TouchID
https://apple.stackexchange.com/a/416422
Some menubar items hidden¶
If your screen have a notch and have a ton of items in the menubar, many will get hidden. Only (free) solution is to command+drag to drag the unimportant ones out to make space for relevant ones.
If you want to pay, Bartender seems to be a solution.
Discussions
Area under notch is not used even if "Scale to fit below built-in camera" option is not checked¶
Reboot
Can't connect to ASUS monitor¶
Problem
My Asus monitor will oscillate between connected and not connected when connecting to my MacBook Pro 14" M2 Pro 2023.
Solution
First install DisplayLink Manager if you haven't. You can find the files you need to download in ASUS's download page.
Next, go to System settings -> Displays -> set "Refresh rate" to 60Hz
It works for me in Macbook Pros with Intel chips but not M2. For M2, I tried a few type C to type C cables and only one of them can make the connection work consistently.
Chinese input laggy¶
Kill the process and reopen your app if it's still laggy on an app.
2 ways to kill the process
- Activity monitor -> search for
Traditional Chinese Input Method
-> force quit kill $(pgrep TCIM)
Terminal font size won't change¶
For some reason changing the font size in my profile won't do anything. The below method works however:
CMD + +
- Shell > Use Settings as default
Error when opening Docker¶
error message: creating root node subnodes ...
solution
https://github.com/docker/for-mac/issues/6572#issuecomment-1317344599
"App" cannot be opened because the developer cannot be verified.**¶
Control + click the app in finder -> open (1st attempt may fail)