forked from CoreyMSchafer/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macOS.sh
executable file
·35 lines (28 loc) · 1.01 KB
/
macOS.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
#!/usr/bin/env zsh
xcode-select --install
echo "Complete the installation of Xcode Command Line Tools before proceeding."
echo "Press enter to continue..."
read
# Set scroll as traditional instead of natural
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
killall Finder
# Set location for screenshots
mkdir "${HOME}/Desktop/Screenshots"
defaults write com.apple.screencapture location "${HOME}/Desktop/Screenshots"
killall SystemUIServer
# Add Bluetooth to Menu Bar for battery percentages
defaults write com.apple.controlcenter "NSStatusItem Visible Bluetooth" -bool true
killall ControlCenter
# Get the absolute path to the image
IMAGE_PATH="${HOME}/dotfiles/settings/Desktop.png"
# AppleScript command to set the desktop background
osascript <<EOF
tell application "System Events"
set desktopCount to count of desktops
repeat with desktopNumber from 1 to desktopCount
tell desktop desktopNumber
set picture to "$IMAGE_PATH"
end tell
end repeat
end tell
EOF