From 934bdd5ee556ea968c32522d28b8ca96467d525f Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Fri, 14 Jun 2024 16:32:41 -0400 Subject: [PATCH] Allow install script to set macos settings --- configs/macos/set-defaults.sh | 38 +++++++++++++++++++++++++++++++++++ install-linux.sh | 5 +++++ 2 files changed, 43 insertions(+) create mode 100644 configs/macos/set-defaults.sh diff --git a/configs/macos/set-defaults.sh b/configs/macos/set-defaults.sh new file mode 100644 index 0000000..74c813a --- /dev/null +++ b/configs/macos/set-defaults.sh @@ -0,0 +1,38 @@ +#! /bin/bash +set -ex + +# Apple Screenshots +defaults write com.apple.screencapture location -string '~/Pictures/Screenshots' +defaults write com.apple.screencapture location-last -string '~/Pictures/Screenshots' +defaults write com.apple.screencaptureui NSNavLastRootDirectory -string '~/Pictures/Screenshots' + +# Accessibility +defaults write com.apple.Accessibility ReduceMotionEnabled -bool true + +# Trackpad Tap to Click +defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true +defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true + +# Gestures +defaults write com.apple.dock showAppExposeGestureEnabled -bool true + +# Dock +defaults write com.apple.dock tilesize -int 47 +defaults write com.apple.dock show-recents -bool false +defaults write com.apple.dock launchanim -bool false + +# Desktop +defaults write com.apple.WindowManager StandardHideDesktopIcons -bool true + +# Mos: Trackpad & Mouse Settings +defaults write com.caldis.Mos precision -int 1 +defaults write com.caldis.Mos reverse -int 0 +defaults write com.caldis.Mos smooth -int 1 +defaults write com.caldis.Mos speed -int 3 +defaults write com.caldis.Mos step -int 35 +defaults write com.caldis.Mos duration -float 3.9 + +# iTerm2 +defaults write com.googlecode.iterm2 FocusFollowsMouse -bool true +defaults write com.googlecode.iterm2 HideScrollbar -bool true +defaults write com.googlecode.iterm2 NeverBlockSystemShutdown -bool true diff --git a/install-linux.sh b/install-linux.sh index a828437..7c27ac3 100644 --- a/install-linux.sh +++ b/install-linux.sh @@ -145,5 +145,10 @@ if [ -d ~/.config/blender/3.6 ]; then ln -sf $EWCONFIG_ROOT/configs/blender/3.x/ sh ./configs/gnome/gnome-terminal-settings.sh || true sh ./configs/gnome/desktop-settings.sh || true +# On MacOS, write default settings +if [ "$(uname)" == "Darwin" ]; then + sh ./configs/macos/set-defaults.sh +fi + # Attempt to force a termux settings reload on Android devices termux-reload-settings || true