From 8ff4280088ba2c1caa7a29a6ac12b9d532cdbc80 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Fri, 21 Jun 2024 01:38:16 +0700 Subject: [PATCH] :+1: feat: add config for ScreenShot and iTerm2 in macOS --- macos/Preferences/config.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/macos/Preferences/config.sh b/macos/Preferences/config.sh index 6ade818..6e2fb29 100644 --- a/macos/Preferences/config.sh +++ b/macos/Preferences/config.sh @@ -102,3 +102,37 @@ if [[ -d "/Applications/KeepingYouAwake.app" ]]; then defaults write info.marcel-dierkes.KeepingYouAwake "info.marcel-dierkes.KeepingYouAwake.LowPowerModeMonitoringEnabled" -int 1 killall KeepingYouAwake fi + +# ===================== iTerm2 ===================== # +# iTerm2 is a terminal emulator for macOS +# defaults read com.googlecode.iterm2 +if [[ -d "/Applications/iTerm.app" ]]; then + defaults write com.googlecode.iterm2 PrefsCustomFolder -string "${HOME}/.config/iterm2" + defaults write com.googlecode.iterm2 LoadPrefsFromCustomFolder -int 1 + defaults write com.googlecode.iterm2 HideScrollbar -int 1 + defaults write com.googlecode.iterm2 SUAutomaticallyUpdate -int 1 + defaults write com.googlecode.iterm2 SUEnableAutomaticChecks -int 1 + defaults write com.googlecode.iterm2 SUHasLaunchedBefore -int 1 + echo "iTerm2 is configured" +fi + +# ===================== ScreenShot ===================== # +# ScreenShot is a screen capture tool for macOS +# defaults read com.apple.screencapture + +mkdir -p "${HOME}/Pictures/Screenshots" + +# shellcheck disable=SC2088 +defaults write com.apple.screencapture location -string "~/Pictures/Screenshots" +# shellcheck disable=SC2088 +defaults write com.apple.screencapture location-last -string "~/Pictures/Screenshots" + +defaults write com.apple.screencapture type "png" +defaults write com.apple.screencapture disable-shadow -int 1 +defaults write com.apple.screencapture show-thumbnail -int 1 +defaults write com.apple.screencapture include-date -bool true +defaults write com.apple.screencapture show-include-date -bool true +defaults write com.apple.screencapture showsClicks -int 1 +defaults write com.apple.screencapture showCursor -int 1 + +defaults write com.apple.screencapture target clipboard # file, clipboard, preview, mail, printer