-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun_once_1-mac-prep.sh.tmpl
More file actions
47 lines (37 loc) · 1.65 KB
/
Copy pathrun_once_1-mac-prep.sh.tmpl
File metadata and controls
47 lines (37 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
set -Eeuo pipefail
{{ if eq .chezmoi.os "darwin" }}
# Install homebrew if not already there
if ! command -v /opt/homebrew/bin/brew 2>&1 >/dev/null
then
# Install homebrew which also installs Xcode Command Line Tools (clang, gcc, git)
# https://www.freecodecamp.org/news/install-xcode-command-line-tools/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Setting up ghq directiories
mkdir -p $HOME/Projects/{test,github.com}
# Fix carapace dir problem
mkdir -p $HOME/.cache/carapace
# Fix scrolling to be classic
defaults write com.apple.swipescrolldirection -bool NO
# Speed up animations
defaults write com.apple.Accessibility ReduceMotionEnabled -int 1
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
# Fixes for aerospace
# https://nikitabobko.github.io/AeroSpace/guide#a-note-on-displays-have-separate-spaces
# -> This should be disabled, I want separate spaces!
defaults write com.apple.spaces spans-displays -bool false && killall SystemUIServer
# https://nikitabobko.github.io/AeroSpace/guide#a-note-on-mission-control
defaults write com.apple.dock expose-group-apps -bool true && killall Dock
# Setup Dock: speed up animations, move to right position, resize, autohide
# https://macos-defaults.com/dock/
defaults write com.apple.dock "autohide" -bool "true"
defaults write com.apple.dock "autohide-time-modifier" -float "0"
defaults write com.apple.dock "autohide-delay" -float "0"
defaults write com.apple.dock "orientation" -string "left"
defaults write com.apple.dock "tilesize" -int "42"
killall Dock
{{ else }}
echo "Unsupported operating system."
exit 1
{{ end }}