summaryrefslogtreecommitdiff
path: root/.config/install.sh
diff options
context:
space:
mode:
authorTom Li Dobnik <tomlidobnik1@gmail.com>2025-08-09 17:12:43 +0200
committerTom Li Dobnik <tomlidobnik1@gmail.com>2025-08-09 17:12:43 +0200
commitea82cbb1c0b778dd946c717cceace53fab391ba8 (patch)
treef0c84a86f48d61d918b6de9dc464c08370ab6a7c /.config/install.sh
init
Diffstat (limited to '.config/install.sh')
-rw-r--r--.config/install.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/.config/install.sh b/.config/install.sh
new file mode 100644
index 0000000..89be1d3
--- /dev/null
+++ b/.config/install.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+# Request sudo password at the start (only once)
+echo "Requesting sudo privileges..."
+sudo -v
+
+# Check if Homebrew is installed and install it if not
+if ! command -v brew &> /dev/null
+then
+ echo "Homebrew not found. Installing Homebrew..."
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+else
+ echo "Homebrew is already installed."
+fi
+
+# macOS settings
+echo "Configuring macOS system settings..."
+defaults write -g NSWindowShouldDragOnGesture -bool true
+defaults write com.apple.dock autohide -bool true
+defaults write com.apple.dock tilesize -int 30
+defaults write com.apple.dock persistent-apps -array
+defaults write com.apple.dock show-recents -bool false
+defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
+defaults write -g NSGrammarCheckingEnabled -bool false
+defaults write -g NSAutomaticQuoteSubstitutionEnabled -bool false
+defaults write -g NSAutomaticDashSubstitutionEnabled -bool false
+defaults write com.apple.dock autohide-time-modifier -float 0.15;
+defaults delete com.apple.dock autohide-delay;
+defaults write -g KeyRepeat -int 1
+defaults write -g InitialKeyRepeat -int 20
+killall Dock
+
+# Ensure Fish shell is available in /etc/shells and set it as the default
+grep -qxF "/opt/homebrew/bin/fish" /etc/shells || echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells
+chsh -s /opt/homebrew/bin/fish
+
+# Instructions for additional apps
+echo "Go to System Settings > Keyboard > Text Input and disable all"
+
+cd "~/dotfiles/"
+stow .
+# Install packages with Homebrew
+brew bundle