-
Notifications
You must be signed in to change notification settings - Fork 2
/
kickstart.sh
158 lines (141 loc) · 6.67 KB
/
kickstart.sh
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#!/usr/local/bin/bash
set -e
# config settings
CODE_ROOT=~/workspace
DOTFILE_REPO=$CODE_ROOT/init
[email protected]:wormangel/init.git
echo "😍 Kickstarting new machine.."
echo
sleep 2
# OSX Tweaks
echo "🖱 Setting up OSX tweaks..."
echo
echo "This step will TRY to configure the following OSX settings:"
echo " * Trackpad: Enable clicking by tapping"
echo " * Finder: Show Path bar"
echo " * Finder: Show Hidden files"
echo
defaults write com.apple.AppleMultitouchTrackpad Clicking 1
defaults write com.apple.finder ShowPathbar 1
defaults write com.apple.finder AppleShowAllFiles YES
# Install dev tools
echo "🤓 Installing xcode CLI tools..."
echo
echo "This launches a GUI application and requires user confirmation."
xcode-select --install
read -n 1 -s -r -p "Press any key to continue..."
echo
# Install homebrew
echo "🔨 Installing homebrew..."
echo
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew tap homebrew/cask-versions
# Install proper terminal - iterm2 and oh-my-zsh
echo "❤️ Installing iTerm2 and oh-my-zsh..."
echo
brew install --cask iterm2
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# TODO This will change the shell to oh-my-zsh and stop executing the rest of the script :( Split the files?
# Generate SSH
echo "🔶 Generating new SSH key..."
echo
ssh-keygen -t rsa -b 4096
echo
echo "Adding newly-created key to ssh-agent. You will be prompted for the password."
eval "$(ssh-agent -s)"
ssh-add -K ~/.ssh/id_rsa
# Manual instruction suggested
echo "🛑 Manual step before proceeding!"
echo
echo "To clone the init repositories the newly created SSH key needs to be uploaded to GitHub."
pbcopy < ~/.ssh/id_rsa.pub
echo "The public key (~/.ssh/id_rsa.pub) was copied to your clipboard."
echo
echo " 👾 Upload new SSH key to GH - https://github.com/settings/ssh/new"
echo
read -n 1 -s -r -p "Press any key to continue..."
echo
# Clone repos with dotfiles
echo "🐛 Creating workspace and cloning general init project..."
echo
mkdir -p $CODE_ROOT
git clone $DOTFILE_REPO_GIT $DOTFILE_REPO
# Setup dotfiles
echo "🎫 Copying dotfiles..."
echo
echo "This step will:"
echo " * Copy .ssh/config to home"
echo " * Copy .vimrc to home"
echo " * Copy .zshrc to home"
echo " * Copy iStats settings to home"
echo " * Copy iTerm2 profiles to the appropriate place"
echo " * NOTE: iTerm2 preferences need to be loaded manually, check the final instructions."
echo
cp $DOTFILE_REPO/.ssh/config ~/.ssh/config
cp $DOTFILE_REPO/.zshrc ~/
cp $DOTFILE_REPO/.vimrc ~/
cp $DOTFILE_REPO/istats.ismp ~/
mkdir -p ~/Library/Application Support/iTerm2/DynamicProfiles
cp $DOTFILE_REPO/iTerm2/profiles.json ~/Library/Application Support/iTerm2/DynamicProfiles
# Install all needed software
echo "⚙️ Installing all needed software..."
echo
echo "WARNING: java8 is not available anymore with Homebrew due tue Oracle licensing bullshit."
echo "Please manually download it and install from https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"
echo
brew install --cask google-chrome spectacle atom telegram spotify intellij-idea postgres pgadmin4 postman docker istat-menus dropbox xquartz gimp gifox cyberduck firefox vlc
brew install --cask guitar-pro reaper omnidisksweeper neofinder unity unity-hub discord slack visual-studio-code dupeguru
brew install python3 go glide node jq z imagemagick hub maven awscli bash icdiff mono bat wget yarn
brew tap heroku/brew && brew install heroku
defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE # Disable swipe navigation
# Install Atom packages
echo "⚛️ Installing Atom packages..."
echo
apm install duplicate-removal plist-converter pretty-json sort-lines split-diff Delete-Whitelines pp-markdown rainbow-csv language-log language-yaml-cloudformation atom-html-preview
echo "🎉 All done!"
echo
echo "OSX tweaks to do manually:"
echo " ⚙️ Displays > Resolution > More Space"
echo " ⚙️ Keyboard > Input Sources > add U.S. International - PC > remove others"
echo " ⚙️ Date & Time > uncheck Show date and time in the menubar"
echo " ⚙️ Energy Save > uncheck Show battery status in menubar"
echo " ⚙️ Accessibility > Zoom > Use scroll gesture with modifier keys to zoom > ^ Control"
echo " ⚙️ Security & Privacy > General > Require password immediately after sleep or screen saver begins"
echo " ⚙️ Keyboard > Text > disable Correct spelling automatically and Capitalize words automatically"
echo " ⚙️ Setup shortcut to lock screen with keyboard"
echo " · Automator > Create new Quick action (no input, any app, launches Start Screen Saver) > Save as Lock Screen"
echo " · System Preferences > Keyboard > Shortcuts > Services > Lock Screen > bind to ⌘⌥^L"
echo
echo "Application configuration to do manually:"
echo " 📅 Calendar:"
echo " ⚙️ Add Google accounts, configure refreshing for every 5min"
echo
echo " 👓 Spectacle:"
echo " ⚙️ Preferences > Launch Spectacle at Login"
echo
echo " 🌕 Google Chrome:"
echo " ⚙️ Set as default browser"
echo " ⚙️ Login to Chrome to synchronize extensions"
echo " · LastPass > https://chrome.google.com/webstore/detail/lastpass-free-password-ma/hdokiejnpimakedhajhdlcegeplioahd"
echo " · Cluster > https://chrome.google.com/webstore/detail/cluster-window-tab-manage/aadahadfdmiibmdhfmpbeeebejmjnkef"
echo " · Session Buddy > https://chrome.google.com/webstore/detail/session-buddy/edacconmaakjimmfgnblocblbcdcpbko"
echo " · uBlock Origin > https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm"
echo " · EditThisCookie > https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg"
echo " · Copy All URLs > https://chrome.google.com/webstore/detail/copy-all-urls/djdmadneanknadilpjiknlnanaolmbfk"
echo " · React Dev Tools > https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi"
echo " · Redux Dev Tools > https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd"
echo " . Enhanced History > https://github.com/chrome-enhanced-history/enhanced-history"
echo
echo " 💻 iTerm2:"
echo " ⚙️ Options > Preferences > General > Load preferences from a custom folder or URL > $DOTFILE_REPO/iTerm2"
echo
echo " 🌡 iStats Menus 6:"
echo " ⚙️ iStats Menus - Registration - Key can be found on Gmail under 'istats order'"
echo " ⚙️ File > Import Settings > ~/istats.ismp"
echo " 📦 Dropbox:"
echo " ⚙️ Selective Sync: configure to sync at least /docs"
echo
# Source .zshrc
echo "Don't forget to source .zshrc now!"
echo
echo "🌈 HAVE FUN! 🦄"