aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPascal Dulieu <pascal@dulieu.uk>2025-07-30 11:45:00 +0100
committerPascal Dulieu <pascal@dulieu.uk>2025-07-30 11:45:00 +0100
commitc19fa68472bec357914ff264e52b45945221d530 (patch)
tree8bb993d3f9bf7b91155300fcc7fe1b282faf7066 /scripts
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/brew.sh9
-rwxr-xr-xscripts/omz.sh23
-rwxr-xr-xscripts/setup-mac.sh64
3 files changed, 96 insertions, 0 deletions
diff --git a/scripts/brew.sh b/scripts/brew.sh
new file mode 100755
index 0000000..7ae70d1
--- /dev/null
+++ b/scripts/brew.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env zsh
+set -e
+
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
+BREWFILE_PATH="$REPO_ROOT/Brewfile"
+
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+brew bundle --file "$BREWFILE_PATH" \ No newline at end of file
diff --git a/scripts/omz.sh b/scripts/omz.sh
new file mode 100755
index 0000000..7dd94c3
--- /dev/null
+++ b/scripts/omz.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env zsh
+# Install OMZ
+set -e
+sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
+
+# Powerline fonts
+mkdir -p /tmp/fonts/
+git clone https://github.com/powerline/fonts.git --depth=1 /tmp/fonts/
+chmod +x /tmp/fonts/install.sh
+bash /tmp/fonts/install.sh
+rm -rf /tmp/fonts/
+
+sleep 2s
+
+# Install plugins
+git clone --depth 1 -- https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
+git clone --depth 1 -- https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
+git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autocomplete
+
+# Overwrite zshrc
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
+REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
+cp "$REPO_ROOT/.zshrc" "$HOME/.zshrc" \ No newline at end of file
diff --git a/scripts/setup-mac.sh b/scripts/setup-mac.sh
new file mode 100755
index 0000000..3c16987
--- /dev/null
+++ b/scripts/setup-mac.sh
@@ -0,0 +1,64 @@
+#!/usr/bin/env zsh
+# Dock on left
+defaults write com.apple.dock "orientation" -string "left" && killall Dock
+sleep 0.25s
+
+# Set dock icon size
+defaults write com.apple.dock "tilesize" -int "25" && killall Dock
+sleep 0.25s
+
+# Autohide dock
+defaults write com.apple.dock "autohide" -bool "true" && killall Dock
+sleep 0.25s
+
+# Dont show recent apps
+defaults write com.apple.dock "show-recents" -bool "false" && killall Dock
+sleep 0.25s
+
+# Set min animation to scale
+defaults write com.apple.dock "mineffect" -string "scale" && killall Dock
+sleep 0.25s
+
+# Set dock magnification
+defaults write com.apple.dock magnification -bool "true"
+defaults write com.apple.dock largesize -int "48"
+killall Dock
+
+# Save screenshots to downloads
+defaults write com.apple.screencapture "location" -string "~/Downloads" && killall SystemUIServer
+sleep 0.25s
+
+# Set Clock
+defaults write com.apple.menuextra.clock "DateFormat" -string "\"EEE d MMM HH:mm:ss\""
+sleep 0.25s
+
+# Disable the .DS file creation on USB and Network
+defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
+defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
+sleep 0.25s
+
+# Hide desktop items and Show the path bar in the Finder
+defaults write com.apple.finder "CreateDesktop" -bool "false"
+defaults write com.apple.finder "ShowPathbar" -bool "true" && killall Finder
+sleep 0.25s
+
+# Show hidden files in the Finder
+defaults write com.apple.finder "AppleShowAllFiles" -bool "false" && killall Finder
+sleep 0.25s
+
+# Keep folders on top in Finder
+defaults write com.apple.finder "_FXSortFoldersFirst" -bool "true" && killall Finder
+sleep 0.25s
+
+# Set Key repeat speed
+defaults read NSGlobalDomain InitialKeyRepeat -int 15
+defaults read NSGlobalDomain KeyRepeat -int 2
+sleep 0.25s
+
+# Disable click wallpaper
+defaults write com.apple.WindowManager EnableStandardClickToShowDesktop -bool false
+killall WindowManager
+
+# Apply the settings
+/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
+sleep 2s \ No newline at end of file