From b7fb219e440d9faa07ec4083c210a5bdc4cde4da Mon Sep 17 00:00:00 2001 From: James Spencer Date: Sun, 1 Oct 2023 21:04:37 +0100 Subject: [PATCH] feat: brew, volta, zsh, mac-defaults, iTerm --- README.md | 4 + hushlogin | 3 + install.sh | 11 +- misc/spaceduck.itermcolors | 344 +++++++++++++++++++++++++++++++++++ scripts/Brewfile | 5 + scripts/Caskfile | 13 ++ scripts/install-homebrew.sh | 37 ++++ scripts/install-oh-my-zsh.sh | 4 + scripts/install-volta.sh | 6 + scripts/set-mac-defaults.sh | 1 + 10 files changed, 427 insertions(+), 1 deletion(-) create mode 100644 hushlogin create mode 100644 misc/spaceduck.itermcolors create mode 100644 scripts/Brewfile create mode 100644 scripts/Caskfile create mode 100755 scripts/install-homebrew.sh create mode 100755 scripts/install-oh-my-zsh.sh create mode 100644 scripts/install-volta.sh diff --git a/README.md b/README.md index 84d6ded..dbb07de 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,7 @@ After installation - Set `gitconfig_work` to your work email address - Set up `.ssh/config` to use 1Password SSH Keys - Provide `authToken` for work npm registry in `.npmrc` +- Move everything in `.zshrc.pre-oh-my-zsh` to `.zshrc` + +## Programs requiring manual installation +- Session diff --git a/hushlogin b/hushlogin new file mode 100644 index 0000000..1d16dc9 --- /dev/null +++ b/hushlogin @@ -0,0 +1,3 @@ +# The mere presence of this file in the home directory disables the system +# copyright notice, the date and time of the last login, the message of the +# day as well as other information that may otherwise appear on login. diff --git a/install.sh b/install.sh index 2a66a4a..844eede 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Save the current working directory DIR=$(pwd) @@ -34,3 +34,12 @@ echo "Done linking dotfiles." # Set up macOS defaults ./scripts/set-mac-defaults.sh + +# Install Homebrew, packages and applications +./scripts/install-homebrew.sh + +# Install Oh My Zsh +./scripts/install-oh-my-zsh.sh + +# Install Volta +./scripts/install-volta.sh diff --git a/misc/spaceduck.itermcolors b/misc/spaceduck.itermcolors new file mode 100644 index 0000000..fb5de50 --- /dev/null +++ b/misc/spaceduck.itermcolors @@ -0,0 +1,344 @@ + + + + + Ansi 0 Color + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.0 + Red Component + 0.0 + + Ansi 1 Color + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.20392157137393951 + Red Component + 0.89019608497619629 + + Ansi 10 Color + + Alpha Component + 1 + Blue Component + 0.58823531866073608 + Color Space + sRGB + Green Component + 0.80000001192092896 + Red Component + 0.36078432202339172 + + Ansi 11 Color + + Alpha Component + 1 + Blue Component + 0.90196079015731812 + Color Space + sRGB + Green Component + 0.63137257099151611 + Red Component + 0.70196080207824707 + + Ansi 12 Color + + Alpha Component + 1 + Blue Component + 0.80000001192092896 + Color Space + sRGB + Green Component + 0.63921570777893066 + Red Component + 0.0 + + Ansi 13 Color + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.80784314870834351 + Red Component + 0.94901961088180542 + + Ansi 14 Color + + Alpha Component + 1 + Blue Component + 0.80000001192092896 + Color Space + sRGB + Green Component + 0.36078432202339172 + Red Component + 0.47843137383460999 + + Ansi 15 Color + + Alpha Component + 1 + Blue Component + 0.80784314870834351 + Color Space + sRGB + Green Component + 0.94509804248809814 + Red Component + 0.94117647409439087 + + Ansi 2 Color + + Alpha Component + 1 + Blue Component + 0.58823531866073608 + Color Space + sRGB + Green Component + 0.80000001192092896 + Red Component + 0.36078432202339172 + + Ansi 3 Color + + Alpha Component + 1 + Blue Component + 0.90196079015731812 + Color Space + sRGB + Green Component + 0.63137257099151611 + Red Component + 0.70196080207824707 + + Ansi 4 Color + + Alpha Component + 1 + Blue Component + 0.80000001192092896 + Color Space + sRGB + Green Component + 0.63921570777893066 + Red Component + 0.0 + + Ansi 5 Color + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.80784314870834351 + Red Component + 0.94901961088180542 + + Ansi 6 Color + + Alpha Component + 1 + Blue Component + 0.80000001192092896 + Color Space + sRGB + Green Component + 0.36078432202339172 + Red Component + 0.47843137383460999 + + Ansi 7 Color + + Alpha Component + 1 + Blue Component + 0.60392159223556519 + Color Space + sRGB + Green Component + 0.43529412150382996 + Red Component + 0.40784314274787903 + + Ansi 8 Color + + Alpha Component + 1 + Blue Component + 0.60392159223556519 + Color Space + sRGB + Green Component + 0.43529412150382996 + Red Component + 0.40784314274787903 + + Ansi 9 Color + + Alpha Component + 1 + Blue Component + 0.0 + Color Space + sRGB + Green Component + 0.20392157137393951 + Red Component + 0.89019608497619629 + + Background Color + + Alpha Component + 1 + Blue Component + 0.10588235408067703 + Color Space + sRGB + Green Component + 0.066666670143604279 + Red Component + 0.058823529630899429 + + Badge Color + + Alpha Component + 0.78534412384033203 + Blue Component + 0.56078433990478516 + Color Space + sRGB + Green Component + 0.43529412150382996 + Red Component + 0.80784314870834351 + + Bold Color + + Alpha Component + 1 + Blue Component + 0.75686275959014893 + Color Space + sRGB + Green Component + 0.94117647409439087 + Red Component + 0.92549020051956177 + + Cursor Color + + Alpha Component + 1 + Blue Component + 0.75686275959014893 + Color Space + sRGB + Green Component + 0.94117647409439087 + Red Component + 0.92549020051956177 + + Cursor Guide Color + + Alpha Component + 0.25 + Blue Component + 1 + Color Space + sRGB + Green Component + 0.9268307089805603 + Red Component + 0.70213186740875244 + + Cursor Text Color + + Alpha Component + 1 + Blue Component + 0.10588235408067703 + Color Space + sRGB + Green Component + 0.066666670143604279 + Red Component + 0.058823529630899429 + + Foreground Color + + Alpha Component + 1 + Blue Component + 0.75686275959014893 + Color Space + sRGB + Green Component + 0.94117647409439087 + Red Component + 0.92549020051956177 + + Link Color + + Alpha Component + 1 + Blue Component + 0.73423302173614502 + Color Space + sRGB + Green Component + 0.35916060209274292 + Red Component + 0.0 + + Selected Text Color + + Alpha Component + 1 + Blue Component + 1 + Color Space + sRGB + Green Component + 1 + Red Component + 1 + + Selection Color + + Alpha Component + 1 + Blue Component + 0.60392159223556519 + Color Space + sRGB + Green Component + 0.43529412150382996 + Red Component + 0.40784314274787903 + + + diff --git a/scripts/Brewfile b/scripts/Brewfile new file mode 100644 index 0000000..efa69e6 --- /dev/null +++ b/scripts/Brewfile @@ -0,0 +1,5 @@ +coreutils +git +tree +pure +zsh diff --git a/scripts/Caskfile b/scripts/Caskfile new file mode 100644 index 0000000..4b51f5b --- /dev/null +++ b/scripts/Caskfile @@ -0,0 +1,13 @@ +1password +1password-cli +firefox-developer-edition +spotify +visual-studio-code +divvy +github +google-chrome +iterm2 +licecap +obsidian +raycast +webex diff --git a/scripts/install-homebrew.sh b/scripts/install-homebrew.sh new file mode 100755 index 0000000..47c0dc5 --- /dev/null +++ b/scripts/install-homebrew.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# +# Homebrew + +# Check for Homebrew +if test ! $(which brew) +then + echo "Installing Homebrew..." + + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +fi + +brew update > /dev/null + +echo "Installing Homebrew packages..." +echo +cat Brewfile | xargs brew install +echo +echo "Finished installing Homebrew packages" + +echo "Setting up zsh as default shell..." +echo +chsh -s /opt/homebrew/bin/zsh +echo +echo "Finished setting up zsh as default shell" + +echo "Installing Homebrew casks..." +echo +brew tap homebrew/cask-versions +cat Caskfile | xargs brew install --cask +echo +echo "Finished installing Homebrew casks" + +# Set spaceduck theme for iTerm +open "../misc/spaceduck.itermcolors" + +exit 0 diff --git a/scripts/install-oh-my-zsh.sh b/scripts/install-oh-my-zsh.sh new file mode 100755 index 0000000..73aa6b4 --- /dev/null +++ b/scripts/install-oh-my-zsh.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +# Install oh-my-zsh +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" diff --git a/scripts/install-volta.sh b/scripts/install-volta.sh new file mode 100644 index 0000000..93a62cb --- /dev/null +++ b/scripts/install-volta.sh @@ -0,0 +1,6 @@ +#!/bin/bash +echo "Installing Volta..." +echo +curl https://get.volta.sh | bash +echo +echo "Finished installing Volta!" diff --git a/scripts/set-mac-defaults.sh b/scripts/set-mac-defaults.sh index 6861266..43d5ecd 100755 --- a/scripts/set-mac-defaults.sh +++ b/scripts/set-mac-defaults.sh @@ -1,3 +1,4 @@ +#!/bin/sh echo "Setting macOS defaults..." echo