diff --git a/osx/dock.sh b/osx/dock.sh index 0dcef16..45b38a6 100644 --- a/osx/dock.sh +++ b/osx/dock.sh @@ -1,39 +1,37 @@ #!/bin/bash -# Set Dark Theme to Dock & Fullscreen -defaults write NSGlobalDomain AppleInterfaceStyle Dark; +# Read Dark Theme setting for Dock & Fullscreen +defaults read NSGlobalDomain AppleInterfaceStyle -# Remove the auto-hiding Dock delay -defaults write com.apple.Dock autohide-delay -float 0 +# Read auto-hiding Dock delay +defaults read com.apple.Dock autohide-delay -# Automatically hide and show the Dock -defaults write com.apple.dock autohide -bool true +# Read auto-hide status of the Dock +defaults read com.apple.dock autohide -# Set the icon size of Dock items to 36 pixels -defaults write com.apple.dock tilesize -int 38 +# Read icon size of Dock items +defaults read com.apple.dock tilesize -# Don’t animate opening applications from the Dock -defaults write com.apple.dock launchanim -bool false +# Read animation status for opening applications from the Dock +defaults read com.apple.dock launchanim -# Show indicator lights for open applications in the Dock -defaults write com.apple.dock show-process-indicators -bool true +# Read indicator lights status for open applications in the Dock +defaults read com.apple.dock show-process-indicators -# Removed genie animation -defaults write com.apple.dock mineffect suck; +# Read minimize window animation effect +defaults read com.apple.dock mineffect -# Removes bouncing animation -defaults write com.apple.dock no-bouncing -bool true +# Read bouncing animation status for application icons in the Dock +defaults read com.apple.dock no-bouncing -# Enable highlight hover effect for the grid view of a stack (Dock) -defaults write com.apple.dock mouse-over-hilite-stack -bool true +# Read highlight hover effect status for the grid view of a stack in the Dock +defaults read com.apple.dock mouse-over-hilite-stack -# Speed up Mission Control animations -defaults write com.apple.dock expose-animation-duration -float 0.1 +# Read Mission Control animation speed +defaults read com.apple.dock expose-animation-duration -# Disable the Launchpad gesture (pinch with thumb and three fingers) -defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 +# Read status of Launchpad gesture (pinch with thumb and three fingers) +defaults read com.apple.dock showLaunchpadGestureEnabled -# Remove All Apps From The Dock In OS X -defaults write com.apple.dock persistent-apps -array - -killall Dock +# Read persistent apps in the Dock +defaults read com.apple.dock persistent-apps diff --git a/osx/screen.sh b/osx/screen.sh index c15bfed..642a404 100644 --- a/osx/screen.sh +++ b/osx/screen.sh @@ -1,84 +1,64 @@ #!/bin/bash -# Ask for the administrator password upfront -sudo -v +# Read opening and closing window animations status +defaults read NSGlobalDomain NSAutomaticWindowAnimationsEnabled -# Keep-alive: update existing `sudo` time stamp until `.osx` has finished -while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & +# Read window resize speed for Cocoa applications +defaults read NSGlobalDomain NSWindowResizeTime -# Disable opening and closing window animations -defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false +# Read screenshots save location +defaults read com.apple.screencapture location -# Increase window resize speed for Cocoa applications -defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 +# Read screenshots save format +defaults read com.apple.screencapture type -# Save screenshots to the desktop -defaults write com.apple.screencapture location -string "$HOME/Desktop" +# Read Chime When Charging status +defaults read com.apple.PowerChime ChimeOnAllHardware -# Save screenshots in JPG format (other options: BMP, GIF, JPG, PDF, TIFF) -defaults write com.apple.screencapture type -string "jpg" +# Read Dark Theme to menubar setting +sudo defaults read /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -# Chime When Charging -defaults write com.apple.PowerChime ChimeOnAllHardware -bool true && \ -open /System/Library/CoreServices/PowerChime.app +# Read Appearance setting: Graphite +defaults read -g AppleAquaColorVariant -# Dark Theme to menubar -sudo defaults write /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool true +# Read keyboard illumination time setting +defaults read com.apple.BezelServices kDimTime -# Appearance: Graphite -defaults write -g AppleAquaColorVariant -int 6 +# Read highlight color setting +defaults read NSGlobalDomain AppleHighlightColor -# Turn off keyboard illumination when computer is not used for 5 minutes -defaults write com.apple.BezelServices kDimTime -int 300 - -# Thanks Addy Osmani for the below items - -# Set highlight color to green -defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" - -# Menu bar: hide the Time Machine, Volume, User, and Bluetooth icons +# Read menu bar items auto-load settings for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do - defaults write "${domain}" dontAutoLoad -array \ - "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \ - "/System/Library/CoreServices/Menu Extras/Volume.menu" \ - "/System/Library/CoreServices/Menu Extras/User.menu" + defaults read "${domain}" dontAutoLoad done -defaults write com.apple.systemuiserver menuExtras -array \ - "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \ - "/System/Library/CoreServices/Menu Extras/AirPort.menu" \ - "/System/Library/CoreServices/Menu Extras/Battery.menu" \ - "/System/Library/CoreServices/Menu Extras/Clock.menu" - -# Remove the auto-hiding Dock delay -defaults write com.apple.dock autohide-delay -float 0 - -# Remove the animation when hiding/showing the Dock -defaults write com.apple.dock autohide-time-modifier -float 0 +defaults read com.apple.systemuiserver menuExtras -# Disable Dashboard -defaults write com.apple.dashboard mcx-disabled -bool true +# Read the auto-hiding Dock delay +defaults read com.apple.dock autohide-delay -# Automatically hide and show the Dock -defaults write com.apple.dock autohide -bool true +# Read the Dock auto-hide animation modifier +defaults read com.apple.dock autohide-time-modifier -# Fix mojave rendering issue -defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE +# Read Dashboard status +defaults read com.apple.dashboard mcx-disabled -# Reset Launchpad -find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete +# Read Dock auto-hide status +defaults read com.apple.dock autohide -# Make Dock more transparent -defaults write com.apple.dock hide-mirror -bool true +# Read Mojave rendering issue fix setting +defaults read -g CGFontRenderingFontSmoothingDisabled -# Disable Notification Center and remove the menu bar icon -launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null +# Read Launchpad reset status +find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -## Hot corners +# Read Dock transparency setting +defaults read com.apple.dock hide-mirror -# Top right screen corner → Desktop -defaults write com.apple.dock wvous-tr-corner -int 4 -defaults write com.apple.dock wvous-tr-modifier -int 1048576 +# Read Notification Center status +launchctl list | grep com.apple.notificationcenterui -# Bottom left screen corner → Start screen saver -defaults write com.apple.dock wvous-bl-corner -int 3 -defaults write com.apple.dock wvous-bl-modifier -int 1048576 +# Read Hot corners settings +defaults read com.apple.dock wvous-tr-corner +defaults read com.apple.dock wvous-tr-modifier +defaults read com.apple.dock wvous-bl-corner +defaults read com.apple.dock wvous-bl-modifier diff --git a/osx/system.sh b/osx/system.sh index b9f7ce3..77a98b2 100644 --- a/osx/system.sh +++ b/osx/system.sh @@ -1,72 +1,64 @@ -# Disable the sound effects on boot -sudo nvram SystemAudioVolume=" " +#!/bin/bash -# Save to disk (not to iCloud) by default -defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false +# Read the sound effects on boot status +sudo nvram -p | grep SystemAudioVolume -# Automatically quit printer app once the print jobs complete -defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true +# Read the default save location setting +defaults read NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -# Disable the crash reporter -defaults write com.apple.CrashReporter DialogType -string "none" +# Read the printer app auto-quit setting +defaults read com.apple.print.PrintingPrefs "Quit When Finished" +# Read the crash reporter setting +defaults read com.apple.CrashReporter DialogType -## Track pad & Keyboard +# Read the scroll gesture with Ctrl modifier key for zoom setting +defaults read com.apple.universalaccess closeViewScrollWheelToggle +defaults read com.apple.universalaccess HIDScrollZoomModifierMask -# Use scroll gesture with the Ctrl (^) modifier key to zoom -defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true -defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 +# Read the keyboard repeat rate setting +defaults read NSGlobalDomain KeyRepeat +defaults read NSGlobalDomain InitialKeyRepeat -# Set a blazingly fast keyboard repeat rate -#defaults write NSGlobalDomain KeyRepeat -int 1 -#defaults write NSGlobalDomain InitialKeyRepeat -int +# Read the iTunes keyboard media keys setting +#launchctl list | grep com.apple.rcd.plist -# Stop iTunes from responding to the keyboard media keys -#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null +# Read the Finder quitting via Cmd+Q setting +defaults read com.apple.finder QuitMenuItem -## Finder +# Read the Finder path bar setting +defaults read com.apple.finder ShowPathbar -# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons -defaults write com.apple.finder QuitMenuItem -bool true +# Read the Finder status bar setting +defaults read com.apple.finder ShowStatusBar -# Finder: show path bar -defaults write com.apple.finder ShowPathbar -bool true +# Read the Finder filename extensions setting +defaults read NSGlobalDomain AppleShowAllExtensions -# show status bar -defaults write com.apple.finder ShowStatusBar -bool true +# Read the Finder default search scope setting +defaults read com.apple.finder FXDefaultSearchScope -# Finder: show all filename extensions -defaults write NSGlobalDomain AppleShowAllExtensions -bool true +# Read the Finder folders on top when sorting by name setting +defaults read com.apple.finder _FXSortFoldersFirst -# When performing a search, search the current folder by default -defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" +# Read the Finder creation of .DS_Store files on network or USB volumes setting +defaults read com.apple.desktopservices DSDontreadNetworkStores +defaults read com.apple.desktopservices DSDontreadUSBStores -# Keep folders on top when sorting by name -defaults write com.apple.finder _FXSortFoldersFirst -bool true +# Read the Mac App Store automatic update check setting +defaults read com.apple.SoftwareUpdate AutomaticCheckEnabled -# Avoid creating .DS_Store files on network or USB volumes -defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true -defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true +# Read the Mac App Store download newly available updates setting +defaults read com.apple.SoftwareUpdate AutomaticDownload +# Read the Mac App Store install system data files & security updates setting +defaults read com.apple.SoftwareUpdate CriticalUpdateInstall -## Mac App Store # +# Read the Mac App Store app auto-update setting +defaults read com.apple.commerce AutoUpdate -# Enable the automatic update check -defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true +# Read the Mac App Store reboot machine on macOS updates setting +defaults read com.apple.commerce AutoUpdateRestartRequired -# Download newly available updates in background -defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 - -# Install System data files & security updates -defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 - -# Turn on app auto-update -defaults write com.apple.commerce AutoUpdate -bool true - -# Disallow the App Store to reboot machine on macOS updates -defaults write com.apple.commerce AutoUpdateRestartRequired -bool false - -## Photos - -# Prevent Photos from opening automatically when devices are plugged in -defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true +# Read the Photos automatic opening when devices are plugged in setting +defaults read -currentHost com.apple.ImageCapture disableHotPlug