Skip to content

Instantly share code, notes, and snippets.

@ajitid
Last active December 23, 2023 07:58
Show Gist options
  • Save ajitid/9a8e6adf9c955086b9c6417b5d769104 to your computer and use it in GitHub Desktop.
Save ajitid/9a8e6adf9c955086b9c6417b5d769104 to your computer and use it in GitHub Desktop.
Macbook manual setup

System Settings

Keyboard > Press 🌐 key to "Start dictatation (Press 🌐 twice)" (emojis have fn+e and ctrl+cmd+space)

Keyboard > Text Input > Input Sources > Edit... > disable "Add full stop with double space"

Desktop and Dock > Hot Corners > Bottom right > hold cmd key > choose Desktop

Displays > More Space (in resolution)
Update: don't do this, text becomes so small that you have to zoom in anyway
Maybe with external displays it is fine but not with MBP's display

Displays > True Tone off

Appearance > Show scroll bars > Always

Displays > Reduce Transparency

Trackpad > Point & Click > Tap to click > enable

Trackpad > Point & Click > Natural scrolling > disable

Increase trackpad speed to the ceil of mid in the slider

Trackpad > More Gestures > App exposé > Swipe down with three fingers (with this mission control and app expose can be controlled with ctrl+up/down or three fingers+up/down)

Accessibility > Zoom > Enable "Use trackpad gesture to zoom"

Installing Java (OpenJDK)

Pull the right version from the archive https://jdk.java.net/archive/

Extract tar.gz file. Extracted folder name would be like jdk-11.0.2.jdk. Copy the folder as-is into /Library/Java/JavaVirtualMachines.

Now run java -version. Mac won't allow to run it. Now go to System Settings > Privacy & Security > scroll down to Security section. There'd be a row asking you to hit Allow for jdk folder. Press the Allow button. Run java -version again. Now there'd be another prompt by Mac but this time with yes/no. Hit Yes equivalent button.

While your terminal is able to deduce Java path but if you want to be explicit, run

echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.zshrc

(Yeah, /usr/libexec/java_home outputs the full path.)

Raycast, Drafts, Things

Things quick create binded with shift+ctrl+space Drafts quick create binded with ctrl+option+space (This lets trigger suggest key ctrl+space free in VS Code and others)

For Raycast:

  • System Settings > Keyboard > Keyboard Shortcuts > Spotlight > turn "Show Spotlight search" off and turn the equivalent on in Raycast (keep Show Finder search window checked)
  • Disable unneeded Raycast extensions (emoji, AI, file search, floating notes, reminders, ...)
  • Bind ctrl+1 .. ctrl+4 to chrome, vs code, kitty/terminal, smerge; and ctrl+esc to microsoft teams
  • Create Quick Link for Downloads folder
  • alias: d to define word, c to clipboard, w to windows
  • option+space for windows
  • Quicklinks to Downloads folder
  • fn+ctrl+up/down -> maximize/top center two thirds
  • fn+ctrl+left/right -> left half/right half
  • fn+option+up/down -> full screen/reasonable size
  • create snippet binded to ~@ to complete mail

Remove Drafts and Raycast from menu bar.

In Drafts, Settings > Markdown > select Github Markdown
Settings > General > remove main window shortcut
Settings > General > uncheck Index drafts in Spotlight
Editor Settings > Github Markdown > Set as default
Editor Settings > Github Markdown > Both Font and Monospace as Input and base font size set to 16

Enable Raycast and Command X to launch at login but don't do it for Things or Drafts

Finder

  • Default to Downloads folder
  • Settings
    • General > Default to user's home
    • Sidebar > Remove/add stuff as necessary
    • Advanced > Show filename extensions
    • Advanced > When performing a search > Search the current folder
    • Advanced > Remove items from the Bin after 30 days
  • Menu > View > View Path bar, View Status bar
  • Right click on finder's toolbar to edit and add an AirDrop icon

Dock

  • Right click on separators > Align to right, enable hiding, and minimise using scale effect
  • use separator to reduce size
  • Run this
defaults write com.apple.dock autohide-delay -int 0
defaults write com.apple.dock autohide-time-modifier -float 0.4
killall Dock

Using enterprise certificates in Firefox (Dev Edition)

In about:config turn security.enterprise_roots.enabled to true to auto-discover and use the certs

Screenshots

Reduce screenshot size with:

defaults write com.apple.screencapture type jpg

cmd+shift+3 - full screenshot
cmd+shift+4 - region screenshot
cmd+shift+4 then space - window screenshot

In region screenshot, while holding the selection you made, you can press & hold spacebar to move around the selection area. Useful to measure and compare something quickly.

Apps to install

  • Bear, Things, Soulver
  • Raycast
  • Sublime Merge, VS Code
  • firefox + bypass paywalls Firefox clean (gitlab) + ublock origin + sponsorblock + return YouTube dislikes
  • n-install for nodejs. Soft link or moved execs to /usr/local/bin.
  • go and git via macports
  • If using external montior: BetterDisplay Pro v2 and and enable notifications
  • Command X for finder (requires at least macos 13.3)
  • Mos for independent scrolling behaviour wrt trackpad https://github.com/Caldis/Mos
  • Make cmd+tab to appear on all screens

Aliased to gg using https://github.com/olets/zsh-abbr. .zshrc:

source ~/ghq/github.com/olets/zsh-abbr/zsh-abbr.zsh
# only need to do once:
# abbr gg="ghq get -p"

source ~/ghq/github.com/marzocchi/zsh-notify/notify.plugin.zsh
zstyle ':notify:*' command-complete-timeout 12
zstyle ':notify:*' error-sound "Glass"
zstyle ':notify:*' success-sound "default"

alias gi='cd $(find ~/ghq -type d -mindepth 3 -maxdepth 3 | fzf)'

function mkcd
{
  dir="$*";
  mkdir -p "$dir" && cd "$dir";
}

zsh-notify depends on terminal-notifier which can be installed via macports.

Others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment