-
Notifications
You must be signed in to change notification settings - Fork 1
/
.macos
121 lines (97 loc) · 4.52 KB
/
.macos
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Modified by Timothy
# Run without downloading:
# curl https://raw.githubusercontent.com/timothy-yue/dotfiles/HEAD/.macos | bash
# Close any open System Preferences panes, to prevent them from overriding
# settings we’re about to change
osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
###############################################################################
# Tim's Customizations #
###############################################################################
# Create a 'code' directory
echo "mkdir -p ${HOME}/code"
mkdir -p "${HOME}/code"
# Install Homebrew
echo "installing homebrew"
# install homebrew https://brew.sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/timothytyue/.zprofile #user directory TBD
eval "$(/opt/homebrew/bin/brew shellenv)"
echo "brew installing stuff"
# hub: a github-specific version of git
# libdvdcss: makes handbreak capable of ripping DVDs
# ripgrep: rg is faster than alternatives
# imagemagick: eventually I will need this for something
# ffmpeg: eventually I'll need this for something
# tree: really handy for listing out directories in text
# bat: A cat(1) clone with syntax highlighting and Git integration.
# delta: A fantastic diff tool
brew install git hub libdvdcss ripgrep imagemagick watchman tree bat \
git-delta ffmpeg
echo "installing Node / npm via NVM"
# https://github.com/nvm-sh/nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm install node # "node" is an alias for the latest version
echo "node --version: $(node --version)"
echo "npm --version: $(npm --version)"
# Install additional programs with homebrew
echo "installing apps with brew --cask"
brew install --cask alfred google-chrome firefox brave-browser bettertouchtool divvy \
bartender itsycal visual-studio-code 1password dash screenflow skype workflowy \
sublime-text vlc discord obs handbrake zoom betterzip avibrazil-rdm sip \
qlcolorcode qlmarkdown qlstephen quicklook-json webpquicklook \
suspicious-package qlvideo spotify focus dropbox front slack openaudible \
todoist audacity docker another-redis-desktop-manager loopback kid3
###############################################################################
# General System Settings #
###############################################################################
# Set standby delay to 24 hours (default is 1 hour)
#sudo pmset -a standbydelay 86400
# Disable the sound effects on boot
sudo nvram SystemAudioVolume=" "
###############################################################################
# Trackpad, mouse, keyboard, Bluetooth accessories, and input #
###############################################################################
# Trackpad: enable tap to click for this user and for the login screen
#defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
#defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
#defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# enable three finger drag on trackpad
#defaults write http://com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -int 1
#defaults write http://com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -int 1
# set magic mouse tracking speed
#defaults write -g com.apple.mouse.scaling 9.0
###############################################################################
# Kill affected applications #
###############################################################################
for app in "Activity Monitor" \
"Address Book" \
"Calendar" \
"cfprefsd" \
"Contacts" \
"Dock" \
"Finder" \
"Mail" \
"Messages" \
"Photos" \
"Safari" \
"SystemUIServer" \
"iCal"; do
killall "${app}" &> /dev/null
done
echo "Done. Note that some of these changes require a logout/restart to take effect."
printf "TODO:\n\
install: \n\
battery indicator (App Store) \n\
Runcat (App Store) \n\
\n\
Restart Terminal.app\n\
copy git config from your backup/re-login \n\
copy .npmrc from your backup/re-login \n\
login to literally everything \n\
"