2024-11-02 18:29:23 -05:00
|
|
|
# Update wallpaper/screensaver
|
|
|
|
echo "[DSMOSS] Update wallpaper/screensaver to slightly less intensive ones... "
|
|
|
|
osascript -e "tell application \"System Events\" to set picture of desktop 1 to POSIX file \"$(realpath dell4k.png)\""
|
|
|
|
sudo defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture "$(realpath dell4k.png)"
|
2024-10-30 15:15:38 -05:00
|
|
|
sudo defaults write /Library/Preferences/com.apple.screensaver modulePath -string "/System/Library/Screen Savers/Blank.saver"
|
|
|
|
defaults -currentHost write com.apple.screensaver modulePath -string "/System/Library/Screen Savers/Blank.saver"
|
2024-11-02 18:29:23 -05:00
|
|
|
defaults -currentHost write com.apple.screensaver idleTime -int 666
|
2024-10-30 15:15:38 -05:00
|
|
|
|
|
|
|
# Set the key repeat faster (somewhat annoying.)
|
2024-10-30 15:45:27 -05:00
|
|
|
echo "[DSMOSS] Set the key repeat faster..."
|
2024-10-30 15:15:38 -05:00
|
|
|
defaults write NSGlobalDomain KeyRepeat -int 3
|
|
|
|
|
|
|
|
# Set the delay of key repeat a short time (somewhat annoying.)
|
2024-10-30 15:45:27 -05:00
|
|
|
echo "[DSMOSS] Set the delay of key repeat a short time..."
|
2024-10-30 15:15:38 -05:00
|
|
|
defaults write NSGlobalDomain InitialKeyRepeat -int 15
|
|
|
|
|
|
|
|
# Disable click desktop to reveal (VERY annoying! why is this even default!?!)
|
2024-10-30 15:45:27 -05:00
|
|
|
echo "[DSMOSS] Disable click desktop to reveal..."
|
2024-10-30 15:15:38 -05:00
|
|
|
defaults write com.apple.WindowManager EnableStandardClickToShowDesktop -bool false
|
|
|
|
killall WindowManager
|
|
|
|
|
|
|
|
# Disable hot corners (annoying!)
|
2024-10-30 15:45:27 -05:00
|
|
|
echo "[DSMOSS] Disable hot corners..."
|
2024-10-30 15:15:38 -05:00
|
|
|
defaults write com.apple.dock wvous-tl-corner -int 0
|
|
|
|
defaults write com.apple.dock wvous-tr-corner -int 0
|
|
|
|
defaults write com.apple.dock wvous-bl-corner -int 0
|
|
|
|
defaults write com.apple.dock wvous-br-corner -int 0
|
|
|
|
|
|
|
|
# Add nightshift (it's annoying to have a lack of sleep. lol.)
|
2024-10-30 15:45:27 -05:00
|
|
|
echo "[DSMOSS] Enable nightshift..."
|
2024-10-30 15:15:38 -05:00
|
|
|
defaults write com.apple.ncprefs NightShiftMode -bool true
|
|
|
|
defaults write com.apple.ncprefs NightShiftAutomaticStart -date "2024-10-30 19:00:00"
|
|
|
|
defaults write com.apple.ncprefs NightShiftAutomaticEnd -date "2024-10-31 07:00:00"
|
|
|
|
defaults write com.apple.ncprefs NightShiftFrequency -int 1
|
|
|
|
sudo killall SystemUIServer
|
|
|
|
|
|
|
|
# Disable natural scrolling (super annoying!)
|
2024-10-30 15:45:27 -05:00
|
|
|
echo "[DSMOSS] Disable natural scrolling..."
|
2024-10-30 15:15:38 -05:00
|
|
|
defaults write com.apple.swipescrolldirection -bool false
|
|
|
|
defaults write com.apple.mouse.scaling -int 0
|
2024-10-30 15:45:27 -05:00
|
|
|
killall Dock
|
|
|
|
|
|
|
|
# Optimizing desktop (annoying.)
|
|
|
|
echo "[DSMOSS] Optimizing desktop..."
|
|
|
|
defaults write com.apple.Accessibility DifferentiateWithoutColor -int 1
|
|
|
|
defaults write com.apple.Accessibility ReduceMotionEnabled -int 1
|
|
|
|
defaults write com.apple.universalaccess reduceMotion -int 1
|
|
|
|
defaults write com.apple.universalaccess reduceTransparency -int 1
|
|
|
|
sudo pmset -a hibernatemode 0
|
|
|
|
sudo pmset -a lidwake 1
|
|
|
|
defaults write com.apple.finder DisableAllAnimations -bool true
|
|
|
|
|
|
|
|
# Activate secure empty trash mode...
|
|
|
|
echo "[DSMOSS] Activate secure empty trash mode..."
|
|
|
|
defaults write com.apple.finder EmptyTrashSecurely -bool true
|
|
|
|
|
|
|
|
# Optimizing network...
|
|
|
|
echo "[DSMOSS] Optimizing network settings..."
|
|
|
|
sudo sysctl -w net.inet.tcp.delayed_ack=0
|
|
|
|
sudo sysctl -w net.inet.tcp.mssdflt=1440
|
|
|
|
|
|
|
|
# Disable iCloud...
|
|
|
|
echo "[DSMOSS] Disable iCloud..."
|
|
|
|
killall Photos
|
|
|
|
sudo defaults write com.apple.CloudDocs DisableCloudKit -bool true
|
2024-10-30 15:47:03 -05:00
|
|
|
sudo defaults write com.apple.CloudPhotos FrameworkEnabled -bool false
|
|
|
|
|
2024-10-30 15:55:31 -05:00
|
|
|
# Configure file manager...
|
|
|
|
echo "[DSMOSS] Configure file manager..."
|
2024-10-30 15:47:03 -05:00
|
|
|
defaults write com.apple.finder ShowPathbar -bool true
|
|
|
|
defaults write com.apple.finder ShowStatusBar -bool true
|
|
|
|
killall Finder
|
2024-10-31 11:09:29 -05:00
|
|
|
|
|
|
|
|
|
|
|
# Autokill mediaanalysisd...
|
|
|
|
echo "[DSMOSS] Disable mediaanalysisd..."
|
|
|
|
crontab -l | grep "@reboot killall mediaanalysisd" > /dev/null 2>&1
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "Crontab entry already exists."
|
|
|
|
else
|
|
|
|
# Add the entry to the crontab
|
|
|
|
echo "@reboot killall mediaanalysisd" | crontab -
|
|
|
|
echo "Crontab entry added successfully."
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Add autoreboot...
|
|
|
|
echo "[DSMOSS] Add autoreboot..."
|
|
|
|
sudo crontab -l | grep "0 0 * * 0 /sbin/shutdown -r now" > /dev/null 2>&1
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "Crontab entry already exists."
|
|
|
|
else
|
|
|
|
# Add the entry to the crontab
|
|
|
|
echo "0 0 * * 0 /sbin/shutdown -r now" | sudo crontab -
|
|
|
|
echo "Crontab entry added successfully."
|
|
|
|
fi
|
2024-10-31 16:09:42 -05:00
|
|
|
|
|
|
|
# Add auto-ttl...
|
|
|
|
echo "[DSMOSS] Add auto-ttl..."
|
|
|
|
sudo crontab -l | grep "0 0 * * 0 sudo sysctl -w net.inet.ip.ttl=65" > /dev/null 2>&1
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "Crontab entry already exists."
|
|
|
|
else
|
|
|
|
# Add the entry to the crontab
|
|
|
|
echo "0 0 * * 0 sudo sysctl -w net.inet.ip.ttl=65" | sudo crontab -
|
|
|
|
echo "Crontab entry added successfully."
|
|
|
|
fi
|
|
|
|
|
|
|
|
# NextDNS
|
|
|
|
echo "[DSMOSS] Add NextDNS..."
|
2024-10-31 16:20:14 -05:00
|
|
|
open "/System/Library/PreferencePanes/Profiles.prefPane" "nxt.mobileconfig"
|
2024-11-01 13:45:55 -05:00
|
|
|
echo Enable NextDNS then press ENTER.
|
2024-10-31 16:20:14 -05:00
|
|
|
read
|
2024-11-02 14:07:41 -05:00
|
|
|
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
|
|
|
|
|
|
|
|
# Settings
|
|
|
|
echo "[DSMOSS] Edit settings..."
|
|
|
|
defaults write com.apple.TextEdit NSShowAppCentricOpenPanelInsteadOfUntitledFile -bool false
|
|
|
|
defaults write -g ApplePressAndHoldEnabled -bool false
|
|
|
|
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
|
|
|
|
mkdir ~/Pictures/screenies
|
|
|
|
defaults write com.apple.screencapture location ~/Pictures/screenies
|
|
|
|
killall SystemUIServer
|
|
|
|
defaults write com.apple.dock static-only -bool true
|
|
|
|
killall Dock
|
|
|
|
defaults write com.apple.finder ShowDesktopOnFrontmostApp -bool false
|
|
|
|
killall Finder
|
|
|
|
|
|
|
|
# Sneed Settings
|
|
|
|
echo "[DSMOSS] Set sneed settings..."
|
|
|
|
open open "/System/Library/PreferencePanes/Profiles.prefPane" "sneed-settings.mobileconfig"
|
|
|
|
echo Enable Sneed Settings then press ENTER.
|
|
|
|
read
|
|
|
|
|
|
|
|
# Setup Git
|
|
|
|
echo "[DSMOSS] Setup Git..."
|
|
|
|
git config --global --add credential.helper manager
|
|
|
|
git config --global user.name "Sneed Group Holder"
|
2024-11-02 14:09:28 -05:00
|
|
|
git config --global user.email "no@nope.nicetry"
|
|
|
|
|
|
|
|
# Create SSH helpers...
|
|
|
|
echo "[DSMOSS] Create SSH helpers..."
|
|
|
|
echo 'ssh root@192.168.50.144' > ~/ssh-to-felix.sh
|
|
|
|
echo 'ssh sparky@192.168.50.238' > ~/ssh-to-optishmex.sh
|
2024-11-02 14:12:07 -05:00
|
|
|
chmod +x ~/ssh-to-felix.sh ~/ssh-to-optishmex.sh
|
|
|
|
|
|
|
|
# Set timezone
|
|
|
|
echo "[DSMOSS] Set timezone..."
|
2024-11-10 14:25:47 -06:00
|
|
|
sudo systemsetup -settimezone "America/Chicago"
|
|
|
|
|
|
|
|
# Prepare Oh My ZSH
|
|
|
|
echo "[DSMOSS] Prepare oh my zsh"
|
2024-11-10 14:38:53 -06:00
|
|
|
brew install thefuck toilet
|
2024-11-10 14:25:47 -06:00
|
|
|
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
|
|
|
cp .zshrc ~/
|
|
|
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|