From 720818f1668698b75a2a9ca186faaf79c345ada2 Mon Sep 17 00:00:00 2001 From: Dilip Date: Fri, 7 Jul 2023 14:27:59 +0530 Subject: [PATCH 1/5] Update dock.sh --- osx/dock.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/osx/dock.sh b/osx/dock.sh index 0dcef16..4e6fc35 100644 --- a/osx/dock.sh +++ b/osx/dock.sh @@ -1,39 +1,39 @@ #!/bin/bash # Set Dark Theme to Dock & Fullscreen -defaults write NSGlobalDomain AppleInterfaceStyle Dark; +defaults read NSGlobalDomain AppleInterfaceStyle Dark; # Remove the auto-hiding Dock delay -defaults write com.apple.Dock autohide-delay -float 0 +defaults read com.apple.Dock autohide-delay -float 0 # Automatically hide and show the Dock -defaults write com.apple.dock autohide -bool true +defaults read com.apple.dock autohide -bool true # Set the icon size of Dock items to 36 pixels -defaults write com.apple.dock tilesize -int 38 +defaults read com.apple.dock tilesize -int 38 # Don’t animate opening applications from the Dock -defaults write com.apple.dock launchanim -bool false +defaults read com.apple.dock launchanim -bool false # Show indicator lights for open applications in the Dock -defaults write com.apple.dock show-process-indicators -bool true +defaults read com.apple.dock show-process-indicators -bool true # Removed genie animation -defaults write com.apple.dock mineffect suck; +defaults read com.apple.dock mineffect suck; # Removes bouncing animation -defaults write com.apple.dock no-bouncing -bool true +defaults read com.apple.dock no-bouncing -bool true # Enable highlight hover effect for the grid view of a stack (Dock) -defaults write com.apple.dock mouse-over-hilite-stack -bool true +defaults read com.apple.dock mouse-over-hilite-stack -bool true # Speed up Mission Control animations -defaults write com.apple.dock expose-animation-duration -float 0.1 +defaults read com.apple.dock expose-animation-duration -float 0.1 # Disable the Launchpad gesture (pinch with thumb and three fingers) -defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 +defaults read com.apple.dock showLaunchpadGestureEnabled -int 0 # Remove All Apps From The Dock In OS X -defaults write com.apple.dock persistent-apps -array +defaults read com.apple.dock persistent-apps -array killall Dock From 5f38c40798bbb6ead27c27c00b606fe7d9fa6c4b Mon Sep 17 00:00:00 2001 From: Dilip Date: Fri, 7 Jul 2023 14:28:29 +0530 Subject: [PATCH 2/5] Update screen.sh --- osx/screen.sh | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/osx/screen.sh b/osx/screen.sh index c15bfed..e91c270 100644 --- a/osx/screen.sh +++ b/osx/screen.sh @@ -7,68 +7,68 @@ sudo -v while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Disable opening and closing window animations -defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false +defaults read NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false # Increase window resize speed for Cocoa applications -defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 +defaults read NSGlobalDomain NSWindowResizeTime -float 0.001 # Save screenshots to the desktop -defaults write com.apple.screencapture location -string "$HOME/Desktop" +defaults read com.apple.screencapture location -string "$HOME/Desktop" # Save screenshots in JPG format (other options: BMP, GIF, JPG, PDF, TIFF) -defaults write com.apple.screencapture type -string "jpg" +defaults read com.apple.screencapture type -string "jpg" # Chime When Charging -defaults write com.apple.PowerChime ChimeOnAllHardware -bool true && \ +defaults read com.apple.PowerChime ChimeOnAllHardware -bool true && \ open /System/Library/CoreServices/PowerChime.app # Dark Theme to menubar -sudo defaults write /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool true +sudo defaults read /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool true # Appearance: Graphite -defaults write -g AppleAquaColorVariant -int 6 +defaults read -g AppleAquaColorVariant -int 6 # Turn off keyboard illumination when computer is not used for 5 minutes -defaults write com.apple.BezelServices kDimTime -int 300 +defaults read 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" +defaults read NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" # Menu bar: hide the Time Machine, Volume, User, and Bluetooth icons for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do - defaults write "${domain}" dontAutoLoad -array \ + defaults read "${domain}" dontAutoLoad -array \ "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \ "/System/Library/CoreServices/Menu Extras/Volume.menu" \ "/System/Library/CoreServices/Menu Extras/User.menu" done -defaults write com.apple.systemuiserver menuExtras -array \ +defaults read 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 +defaults read 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.dock autohide-time-modifier -float 0 # Disable Dashboard -defaults write com.apple.dashboard mcx-disabled -bool true +defaults read com.apple.dashboard mcx-disabled -bool true # Automatically hide and show the Dock -defaults write com.apple.dock autohide -bool true +defaults read com.apple.dock autohide -bool true # Fix mojave rendering issue -defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE +defaults read -g CGFontRenderingFontSmoothingDisabled -bool FALSE # Reset Launchpad find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete # Make Dock more transparent -defaults write com.apple.dock hide-mirror -bool true +defaults read com.apple.dock hide-mirror -bool true # Disable Notification Center and remove the menu bar icon launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null @@ -76,9 +76,9 @@ launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui. ## Hot corners # 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 +defaults read com.apple.dock wvous-tr-corner -int 4 +defaults read com.apple.dock wvous-tr-modifier -int 1048576 # 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 +defaults read com.apple.dock wvous-bl-corner -int 3 +defaults read com.apple.dock wvous-bl-modifier -int 1048576 From cb235c29429a49ca416325ff27dda7e8d741ad96 Mon Sep 17 00:00:00 2001 From: Dilip Date: Fri, 7 Jul 2023 14:29:25 +0530 Subject: [PATCH 3/5] Update system.sh --- osx/system.sh | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/osx/system.sh b/osx/system.sh index b9f7ce3..6463376 100644 --- a/osx/system.sh +++ b/osx/system.sh @@ -2,24 +2,24 @@ sudo nvram SystemAudioVolume=" " # Save to disk (not to iCloud) by default -defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false +defaults read NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false # Automatically quit printer app once the print jobs complete -defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true +defaults read com.apple.print.PrintingPrefs "Quit When Finished" -bool true # Disable the crash reporter -defaults write com.apple.CrashReporter DialogType -string "none" +defaults read com.apple.CrashReporter DialogType -string "none" ## Track pad & Keyboard # 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 +defaults read com.apple.universalaccess closeViewScrollWheelToggle -bool true +defaults read com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 # Set a blazingly fast keyboard repeat rate -#defaults write NSGlobalDomain KeyRepeat -int 1 -#defaults write NSGlobalDomain InitialKeyRepeat -int +#defaults read NSGlobalDomain KeyRepeat -int 1 +#defaults read NSGlobalDomain InitialKeyRepeat -int # Stop iTunes from responding to the keyboard media keys #launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null @@ -27,46 +27,46 @@ defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 ## Finder # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons -defaults write com.apple.finder QuitMenuItem -bool true +defaults read com.apple.finder QuitMenuItem -bool true # Finder: show path bar -defaults write com.apple.finder ShowPathbar -bool true +defaults read com.apple.finder ShowPathbar -bool true # show status bar -defaults write com.apple.finder ShowStatusBar -bool true +defaults read com.apple.finder ShowStatusBar -bool true # Finder: show all filename extensions -defaults write NSGlobalDomain AppleShowAllExtensions -bool true +defaults read NSGlobalDomain AppleShowAllExtensions -bool true # When performing a search, search the current folder by default -defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" +defaults read com.apple.finder FXDefaultSearchScope -string "SCcf" # Keep folders on top when sorting by name -defaults write com.apple.finder _FXSortFoldersFirst -bool true +defaults read com.apple.finder _FXSortFoldersFirst -bool true # 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 +defaults read com.apple.desktopservices DSDontreadNetworkStores -bool true +defaults read com.apple.desktopservices DSDontreadUSBStores -bool true ## Mac App Store # # Enable the automatic update check -defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true +defaults read com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true # Download newly available updates in background -defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 +defaults read com.apple.SoftwareUpdate AutomaticDownload -int 1 # Install System data files & security updates -defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 +defaults read com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 # Turn on app auto-update -defaults write com.apple.commerce AutoUpdate -bool true +defaults read com.apple.commerce AutoUpdate -bool true # Disallow the App Store to reboot machine on macOS updates -defaults write com.apple.commerce AutoUpdateRestartRequired -bool false +defaults read 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 +defaults -currentHost read com.apple.ImageCapture disableHotPlug -bool true From 924309417888fc999f48263e4564abb5e3f1c3d7 Mon Sep 17 00:00:00 2001 From: Dilip Prajapati Date: Fri, 7 Jul 2023 14:33:51 +0530 Subject: [PATCH 4/5] revert --- osx/dock.sh | 24 ++++++++++++------------ osx/screen.sh | 42 +++++++++++++++++++++--------------------- osx/system.sh | 42 +++++++++++++++++++++--------------------- 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/osx/dock.sh b/osx/dock.sh index 4e6fc35..0dcef16 100644 --- a/osx/dock.sh +++ b/osx/dock.sh @@ -1,39 +1,39 @@ #!/bin/bash # Set Dark Theme to Dock & Fullscreen -defaults read NSGlobalDomain AppleInterfaceStyle Dark; +defaults write NSGlobalDomain AppleInterfaceStyle Dark; # Remove the auto-hiding Dock delay -defaults read com.apple.Dock autohide-delay -float 0 +defaults write com.apple.Dock autohide-delay -float 0 # Automatically hide and show the Dock -defaults read com.apple.dock autohide -bool true +defaults write com.apple.dock autohide -bool true # Set the icon size of Dock items to 36 pixels -defaults read com.apple.dock tilesize -int 38 +defaults write com.apple.dock tilesize -int 38 # Don’t animate opening applications from the Dock -defaults read com.apple.dock launchanim -bool false +defaults write com.apple.dock launchanim -bool false # Show indicator lights for open applications in the Dock -defaults read com.apple.dock show-process-indicators -bool true +defaults write com.apple.dock show-process-indicators -bool true # Removed genie animation -defaults read com.apple.dock mineffect suck; +defaults write com.apple.dock mineffect suck; # Removes bouncing animation -defaults read com.apple.dock no-bouncing -bool true +defaults write com.apple.dock no-bouncing -bool true # Enable highlight hover effect for the grid view of a stack (Dock) -defaults read com.apple.dock mouse-over-hilite-stack -bool true +defaults write com.apple.dock mouse-over-hilite-stack -bool true # Speed up Mission Control animations -defaults read com.apple.dock expose-animation-duration -float 0.1 +defaults write com.apple.dock expose-animation-duration -float 0.1 # Disable the Launchpad gesture (pinch with thumb and three fingers) -defaults read com.apple.dock showLaunchpadGestureEnabled -int 0 +defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 # Remove All Apps From The Dock In OS X -defaults read com.apple.dock persistent-apps -array +defaults write com.apple.dock persistent-apps -array killall Dock diff --git a/osx/screen.sh b/osx/screen.sh index e91c270..c15bfed 100644 --- a/osx/screen.sh +++ b/osx/screen.sh @@ -7,68 +7,68 @@ sudo -v while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & # Disable opening and closing window animations -defaults read NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false +defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false # Increase window resize speed for Cocoa applications -defaults read NSGlobalDomain NSWindowResizeTime -float 0.001 +defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 # Save screenshots to the desktop -defaults read com.apple.screencapture location -string "$HOME/Desktop" +defaults write com.apple.screencapture location -string "$HOME/Desktop" # Save screenshots in JPG format (other options: BMP, GIF, JPG, PDF, TIFF) -defaults read com.apple.screencapture type -string "jpg" +defaults write com.apple.screencapture type -string "jpg" # Chime When Charging -defaults read com.apple.PowerChime ChimeOnAllHardware -bool true && \ +defaults write com.apple.PowerChime ChimeOnAllHardware -bool true && \ open /System/Library/CoreServices/PowerChime.app # Dark Theme to menubar -sudo defaults read /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool true +sudo defaults write /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool true # Appearance: Graphite -defaults read -g AppleAquaColorVariant -int 6 +defaults write -g AppleAquaColorVariant -int 6 # Turn off keyboard illumination when computer is not used for 5 minutes -defaults read com.apple.BezelServices kDimTime -int 300 +defaults write com.apple.BezelServices kDimTime -int 300 # Thanks Addy Osmani for the below items # Set highlight color to green -defaults read NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" +defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" # Menu bar: hide the Time Machine, Volume, User, and Bluetooth icons for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do - defaults read "${domain}" dontAutoLoad -array \ + 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" done -defaults read com.apple.systemuiserver menuExtras -array \ +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 read com.apple.dock autohide-delay -float 0 +defaults write com.apple.dock autohide-delay -float 0 # Remove the animation when hiding/showing the Dock -defaults read com.apple.dock autohide-time-modifier -float 0 +defaults write com.apple.dock autohide-time-modifier -float 0 # Disable Dashboard -defaults read com.apple.dashboard mcx-disabled -bool true +defaults write com.apple.dashboard mcx-disabled -bool true # Automatically hide and show the Dock -defaults read com.apple.dock autohide -bool true +defaults write com.apple.dock autohide -bool true # Fix mojave rendering issue -defaults read -g CGFontRenderingFontSmoothingDisabled -bool FALSE +defaults write -g CGFontRenderingFontSmoothingDisabled -bool FALSE # Reset Launchpad find ~/Library/Application\ Support/Dock -name "*.db" -maxdepth 1 -delete # Make Dock more transparent -defaults read com.apple.dock hide-mirror -bool true +defaults write com.apple.dock hide-mirror -bool true # Disable Notification Center and remove the menu bar icon launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null @@ -76,9 +76,9 @@ launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui. ## Hot corners # Top right screen corner → Desktop -defaults read com.apple.dock wvous-tr-corner -int 4 -defaults read com.apple.dock wvous-tr-modifier -int 1048576 +defaults write com.apple.dock wvous-tr-corner -int 4 +defaults write com.apple.dock wvous-tr-modifier -int 1048576 # Bottom left screen corner → Start screen saver -defaults read com.apple.dock wvous-bl-corner -int 3 -defaults read com.apple.dock wvous-bl-modifier -int 1048576 +defaults write com.apple.dock wvous-bl-corner -int 3 +defaults write com.apple.dock wvous-bl-modifier -int 1048576 diff --git a/osx/system.sh b/osx/system.sh index 6463376..8617c69 100644 --- a/osx/system.sh +++ b/osx/system.sh @@ -2,24 +2,24 @@ sudo nvram SystemAudioVolume=" " # Save to disk (not to iCloud) by default -defaults read NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false +defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false # Automatically quit printer app once the print jobs complete -defaults read com.apple.print.PrintingPrefs "Quit When Finished" -bool true +defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true # Disable the crash reporter -defaults read com.apple.CrashReporter DialogType -string "none" +defaults write com.apple.CrashReporter DialogType -string "none" ## Track pad & Keyboard # Use scroll gesture with the Ctrl (^) modifier key to zoom -defaults read com.apple.universalaccess closeViewScrollWheelToggle -bool true -defaults read com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 +defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true +defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 # Set a blazingly fast keyboard repeat rate -#defaults read NSGlobalDomain KeyRepeat -int 1 -#defaults read NSGlobalDomain InitialKeyRepeat -int +#defaults write NSGlobalDomain KeyRepeat -int 1 +#defaults write NSGlobalDomain InitialKeyRepeat -int # Stop iTunes from responding to the keyboard media keys #launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null @@ -27,46 +27,46 @@ defaults read com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 ## Finder # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons -defaults read com.apple.finder QuitMenuItem -bool true +defaults write com.apple.finder QuitMenuItem -bool true # Finder: show path bar -defaults read com.apple.finder ShowPathbar -bool true +defaults write com.apple.finder ShowPathbar -bool true # show status bar -defaults read com.apple.finder ShowStatusBar -bool true +defaults write com.apple.finder ShowStatusBar -bool true # Finder: show all filename extensions -defaults read NSGlobalDomain AppleShowAllExtensions -bool true +defaults write NSGlobalDomain AppleShowAllExtensions -bool true # When performing a search, search the current folder by default -defaults read com.apple.finder FXDefaultSearchScope -string "SCcf" +defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" # Keep folders on top when sorting by name -defaults read com.apple.finder _FXSortFoldersFirst -bool true +defaults write com.apple.finder _FXSortFoldersFirst -bool true # Avoid creating .DS_Store files on network or USB volumes -defaults read com.apple.desktopservices DSDontreadNetworkStores -bool true -defaults read com.apple.desktopservices DSDontreadUSBStores -bool true +defaults write com.apple.desktopservices DSDontreadNetworkStores -bool true +defaults write com.apple.desktopservices DSDontreadUSBStores -bool true ## Mac App Store # # Enable the automatic update check -defaults read com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true +defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true # Download newly available updates in background -defaults read com.apple.SoftwareUpdate AutomaticDownload -int 1 +defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 # Install System data files & security updates -defaults read com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 +defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 # Turn on app auto-update -defaults read com.apple.commerce AutoUpdate -bool true +defaults write com.apple.commerce AutoUpdate -bool true # Disallow the App Store to reboot machine on macOS updates -defaults read com.apple.commerce AutoUpdateRestartRequired -bool false +defaults write com.apple.commerce AutoUpdateRestartRequired -bool false ## Photos # Prevent Photos from opening automatically when devices are plugged in -defaults -currentHost read com.apple.ImageCapture disableHotPlug -bool true +defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true From b1368b29402e4b99f5e6a38ed6eac155f9274c76 Mon Sep 17 00:00:00 2001 From: Dilip Prajapati Date: Fri, 7 Jul 2023 14:42:19 +0530 Subject: [PATCH 5/5] set --- osx/dock.sh | 50 ++++++++++++------------ osx/screen.sh | 104 ++++++++++++++++++++------------------------------ osx/system.sh | 96 +++++++++++++++++++++------------------------- 3 files changed, 110 insertions(+), 140 deletions(-) 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 8617c69..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 DSDontreadNetworkStores -bool true -defaults write com.apple.desktopservices DSDontreadUSBStores -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