https://github.com/appleboy/macbook
Some tips and command for my MacOS.
https://github.com/appleboy/macbook
macbook macbook-configuration macbook-pro
Last synced: 6 months ago
JSON representation
Some tips and command for my MacOS.
- Host: GitHub
- URL: https://github.com/appleboy/macbook
- Owner: appleboy
- License: mit
- Created: 2018-12-08T06:55:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-27T00:35:38.000Z (10 months ago)
- Last Synced: 2025-04-10T08:21:11.718Z (6 months ago)
- Topics: macbook, macbook-configuration, macbook-pro
- Homepage:
- Size: 8.5 MB
- Stars: 64
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Macbook tips
Some tips and command for MacOS.

## Command
### Install Homebrew First
See the [homepage](https://brew.sh/).
```sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```### [Install Bash git completion](https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion)
```bash
brew install git bash-completion
```Add bash-completion to your `~/.bash_profile` or `.extra`
```bash
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
```### [How to Change Screenshot Save Location](https://discussions.apple.com/docs/DOC-9081)
create new folder in `Desktop`
```bash
mkdir ~/Desktop/screenshots/
```Copy and paste this command to the terminal window:
```bash
defaults write com.apple.screencapture location ~/Desktop/screenshots/
```### Monospaced font with programming ligatures: [FiraCode](https://github.com/tonsky/FiraCode)
Use [brew](http://brew.sh/) and [cask](https://caskroom.github.io/): Not officially supported, might install outdated version
```bash
brew tap homebrew/cask-fonts
brew install font-fira-code --cask
```screenshot: see the `!=` symbol

### Setting the Mac hostname or computer name from the terminal
See the [reference](https://knowledge.autodesk.com/support/smoke/learn-explore/caas/sfdcarticles/sfdcarticles/Setting-the-Mac-hostname-or-computer-name-from-the-terminal.html). change the primary hostname of your Mac:
```bash
scutil --set HostName
```### Main font-bundle for sketch icon-font plugin
- FontAwesome
- Material Design Icons
- Ion Icons
- Simple Line Icons (@bohn002)
- Ant Design IconsSee the [detail](https://github.com/keremciu/font-bundles)

### [Install jq command](https://stedolan.github.io/jq/)
jq is a lightweight and flexible command-line JSON processor. [Try it online](https://jqplay.org/).

## IDE
- [GraphQL IDE for better development workflows](https://github.com/prisma/graphql-playground)
- [Visual Studio Code](https://code.visualstudio.com)
- [SSH Tunnel Manager](https://www.tynsoe.org/stm/)
- [Elegant Facebook Messenger desktop app](https://github.com/sindresorhus/caprine)
- [Discord App](https://discordapp.com/)
- [Gitter is a chat and networking platform](https://gitter.im/)
- [Docker for Mac](https://docs.docker.com/docker-for-mac/install/)
- [Wechat in China](https://www.wechat.com/en/)
- [Google Chrome](https://www.google.com/chrome/)
- [Telegram Desktop Messenger](https://github.com/telegramdesktop/tdesktop)
- [iTerm2 is a replacement for Terminal and the successor to iTerm](https://www.iterm2.com/downloads.html)
- [Evernote skitch](https://evernote.com/intl/en/products/skitch)
- [MPlayer OSX Extended video player](https://github.com/sttz/MPlayer-OSX-Extended)
- [Universal Database Tool: DBeaver Community](https://dbeaver.io/)
- [Phiewer is the easiest and fastest way to view your images](https://phiewer.com/)
- [FileZilla Client not only supports FTP, but also FTP over TLS (FTPS) and SFTP](https://filezilla-project.org/)
- [Project discussions: Slack](https://slack.com/)
- [Postman](https://www.getpostman.com/downloads/)
- [TablePlus - native app which helps you easily edit database data and structure](https://github.com/TablePlus/TablePlus)
- [Keka - the macOS file archiver](https://www.keka.io)
- [Elmedia Player - Best media player for macOS](https://www.elmedia-video-player.com/)
- [Robo 3T - Mongodb Client](https://robomongo.org/download)
- [Microsoft Remote Desktop](https://apps.apple.com/tw/app/microsoft-remote-desktop/id1295203466?mt=12)
- [Security-first diagramming for teams.](https://www.diagrams.net/)
- [Mipony - Mipony, your download manager](https://www.mipony.net/en/)
- [IINA - The modern media player for macOS](https://iina.io/)
- [Fig adds IDE-style autocomplete to your existing terminal. Move faster with Fig.](https://fig.io/)
- [AppCleaner is a small application which allows you to thoroughly uninstall unwanted apps.](https://freemacsoft.net/appcleaner/)
- [MacWhisper - Quickly and easily transcribe audio files into text with OpenAI's state-of-the-art transcription technology Whisper](https://goodsnooze.gumroad.com/l/macwhisper)## Tips
### Show all filename extensions in `Finder`
See the following screenshots:

### How to change the ScreenShot Keyboard Shortcut
You can see the [reference](https://www.wikihow.com/Change-the-Keyboard-Shortcut-for-a-Mac-Screenshot).


### Change the Shell in Mac OS X Terminal
You can see the [reference](http://osxdaily.com/2012/03/21/change-shell-mac-os-x/).
open the `terminal` app and select the `preferences`


### Using a Windows PC Keyboard on Mac with Remapped Windows & ALT Keys
See the [reference](http://osxdaily.com/2018/01/31/use-windows-pc-keyboard-mac-remap-option-command-keys/)

1. Select your windows keyboard.
2. Click the dropdown next to `OPTION Key` and select `Command`
3. Click the dropdown next to `COMMAND Key` and select `Option`
### Change default shell in terminal (iTerm2)

```sh
chsh -s /bin/bash
```See [Use zsh as the default shell on your Mac](https://support.apple.com/en-us/HT208050)
### Tmux scrollback in terminal (iTerm2)
You can copy my [.tmux.conf](https://github.com/appleboy/dotfiles/blob/5c6bd88915b6ba97c50ff9f6f7627d9ad1ff31d9/.tmux.conf#L1) config file and [update the profile of iTerm2](https://stackoverflow.com/questions/12865559/leaving-tmux-scrollback-in-terminal-iterm2) as following screenshot:

### Native Sierra-tabs on VSCode
See the [issue comment](https://github.com/microsoft/vscode/issues/76537#issuecomment-510070135)


See [Use tabs in windows on Mac](https://support.apple.com/guide/mac-help/use-tabs-in-windows-mchla4695cce/mac)

### Change keyboard mapping for windows keyboard
See the [solution](https://superuser.com/questions/158561/how-can-i-remap-windows-and-alt-keys-in-os-x/158568).

### Change Hot keys in iTerm2
Go to iTerm Preferences → Profiles, select your profile, then the Keys tab. Click Presets... and choose `Natural Text Editing`. See tbe [reference](https://apple.stackexchange.com/questions/136928/using-alt-cmd-right-left-arrow-in-iterm).

### Turn on three finger drag for your Mac trackpad

### Change Spodlight shortcut key

### Jump between words in a bash command
In iTerm2, if you want to use `Option + Right Arrow` to jump between words in a bash command, you can set it up as follows:
1. Open iTerm2.
2. In the top menu, select `iTerm2` -> `Preferences`.
3. In the Preferences window, select the `Profiles` tab.
4. On the left side, select the profile you are using (usually `Default`).
5. Select the `Keys` sub-tab.
6. Click the `+` button at the bottom right to add a new key binding.
7. In the pop-up window, set it as follows:
- `Keyboard Shortcut`: Press `Option + Right Arrow`.
- `Action`: Select `Send Escape Sequence`.
- `Esc+`: Enter `f`.This way, when you press `Option + Right Arrow`, iTerm2 will send `Esc+f`, which in bash will move to the beginning of the next word.
Similarly, you can set `Option + Left Arrow` to jump to the beginning of the previous word:
1. Repeat the above steps, click the `+` button to add a new key binding.
2. In the pop-up window, set it as follows:
- `Keyboard Shortcut`: Press `Option + Left Arrow`.
- `Action`: Select `Send Escape Sequence`.
- `Esc+`: Enter `b`.This way, when you press `Option + Left Arrow`, iTerm2 will send `Esc+b`, which in bash will move to the beginning of the previous word.
After completing these settings, you should be able to use `Option + Right Arrow` and `Option + Left Arrow` to jump between words in bash commands in iTerm2.