From b9f4dec36253fb6372980ccb1aa0ffa68c12a595 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Thu, 26 Dec 2024 18:57:48 +0530 Subject: [PATCH] Set the DNS server to '8.8.8.8' only if running in a Jio network. Introduce PDFGear and KeyClu Fixed old documentation --- CHANGELOG.md | 6 ++++++ Extras.md | 3 +-- GettingStarted-Basic.md | 3 ++- files/--HOME--/Brewfile | 5 +++++ files/--ZDOTDIR--/.zshrc | 3 +-- scripts/capture-defaults.sh | 4 ++++ scripts/fresh-install-of-osx.sh | 8 +++++--- 7 files changed, 24 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b024cfe..94cf66a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ As documented in the README's [adopting](README.md#how-to-adoptcustomize-the-scr For those who follow this repo, here's the changelog for ease of adoption: +### 1.0-34 + +* Set the DNS server to '8.8.8.8' only if running in a Jio network. +* Introduce PDFGear and KeyClu. +* Fixed some old documentation. + ### 1.0-33 * Reuse utility functions defined in `.shellrc`. diff --git a/Extras.md b/Extras.md index f156a9f..bc497ff 100644 --- a/Extras.md +++ b/Extras.md @@ -14,7 +14,6 @@ This script is useful in macos to enable TouchId as an authentication mechanism Note: * This script is idempotent ie it can be run any number of times safely, it will not corrrupt the system. -* The script needs to be run after each OS upgrade is applied. ## capture-defaults.sh @@ -22,7 +21,7 @@ This script is useful to capture the preferences of the known applications (both ## osx-defaults.sh -This script is the erstwhile script to codify the macos setup. It can be used to setup some options, but its not been maintained for newer versions of macos. Though the system will not get corrupted, there might be cruft introduced into the system preferences which might not be easy to identify and remove at a later point in time. Use caution and YMMV. +This script is the erstwhile script to codify the macos setup. It can be used to setup some options, but it hasn't been maintained for newer versions of macos. Though the system will not get corrupted, there might be cruft introduced into the system preferences which might not be easy to identify and remove at a later point in time. Use caution and YMMV. ## recreate-repo.sh diff --git a/GettingStarted-Basic.md b/GettingStarted-Basic.md index fc36a9e..44c78c2 100644 --- a/GettingStarted-Basic.md +++ b/GettingStarted-Basic.md @@ -2,7 +2,8 @@ On your local machine: -1. Open the `System Preferences` application. +1. **If you use `mas` to install apps from the App Store**, login into the `App Store` application. +2. Open the `System Preferences` application. * Search for 'Full Disk Access' and add 'Terminal' (if not, the setup script will error out in between) * Search for 'File Vault' and turn it on (if not, then the setup script will exit in the beginning itself) diff --git a/files/--HOME--/Brewfile b/files/--HOME--/Brewfile index 6ba91bd..60eb745 100644 --- a/files/--HOME--/Brewfile +++ b/files/--HOME--/Brewfile @@ -74,6 +74,7 @@ cask 'keepassxc@beta' cask 'keepingyouawake' cask 'keybase' cask 'keycastr' +cask 'keyclu' cask 'libreoffice' cask 'monolingual' cask 'notunes' @@ -89,6 +90,10 @@ cask 'vscodium@insiders' # TODO: Doesn't handle 'Remote Containers' and GH-bas cask 'zen-browser@twilight' cask 'zoom' + +brew 'mas' +mas 'PDFgear', id: 6469021132 + # VSCode extensions # Note: I don't want brew to silently install VS Code (which is what it does currently if the following lines are present but it doesn't find code!) is_vscode_installed = !`which code`.chomp.empty? diff --git a/files/--ZDOTDIR--/.zshrc b/files/--ZDOTDIR--/.zshrc index 7cc2de7..ead08de 100644 --- a/files/--ZDOTDIR--/.zshrc +++ b/files/--ZDOTDIR--/.zshrc @@ -104,7 +104,7 @@ export ENABLE_CORRECTION="true" # HIST_STAMPS="mm/dd/yyyy" # Would you like to use another custom folder than ${ZSH}/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder +export ZSH_CUSTOM="${ZSH_CUSTOM:-"${ZSH:-"${HOME}/.oh-my-zsh"}/custom"}" # https://github.com/zsh-users/zsh-autosuggestions?tab=readme-ov-file#suggestion-strategy export ZSH_AUTOSUGGEST_STRATEGY=(history completion) @@ -117,7 +117,6 @@ export ZSH_AUTOSUGGEST_STRATEGY=(history completion) plugins=(brew direnv eza fast-syntax-highlighting git git-extras iterm2 mise sudo zbell zsh-autosuggestions) # according to https://github.com/zsh-users/zsh-completions/issues/603#issue-373185486, this can't be added as a plugin to omz for the fpath to work correctly -export ZSH_CUSTOM="${ZSH_CUSTOM:-"${ZSH:-"${HOME}/.oh-my-zsh"}/custom"}" append_to_fpath_if_dir_exists "${ZSH_CUSTOM}/plugins/zsh-completions/src" load_file_if_exists "${ZSH}/oh-my-zsh.sh" diff --git a/scripts/capture-defaults.sh b/scripts/capture-defaults.sh index 045febd..786890b 100755 --- a/scripts/capture-defaults.sh +++ b/scripts/capture-defaults.sh @@ -50,8 +50,12 @@ esac eval "${git_cleanup}" ensure_dir_exists "${target_dir}" +# TODO: Need to add: +# PDFgear + app_array=( 'ch.protonvpn.mac' + 'com.0804Team.KeyClu' 'com.abhishek.Clocker' 'com.apphousekitchen.aldente-pro' 'com.apple.Accessibility-Settings.extension' diff --git a/scripts/fresh-install-of-osx.sh b/scripts/fresh-install-of-osx.sh index 2a3b8a9..8791f61 100755 --- a/scripts/fresh-install-of-osx.sh +++ b/scripts/fresh-install-of-osx.sh @@ -84,9 +84,10 @@ ensure_safe_load_direnv() { ###################################################################################################################### # Set DNS of 8.8.8.8 before proceeding (in some cases, for eg Jio Wifi, github doesn't resolve at all and times out) # ###################################################################################################################### -# TODO: Only needed for India/Jio networks, need to figure out a way to not have this for other global locations -echo '==> Setting DNS for WiFi' -sudo networksetup -setdnsservers Wi-Fi 8.8.8.8 +if test -n "$(curl ipinfo.io | \grep -i jio)"; then + echo '==> Setting DNS for WiFi' + sudo networksetup -setdnsservers Wi-Fi 8.8.8.8 +fi ################################################################################################# # Download and source this utility script - so that the functions are available for this script # @@ -313,6 +314,7 @@ app_list=( 'KeepingYouAwake.app' 'Keybase.app' 'KeyCastr.app' + 'KeyClu.app' 'Raycast.app' 'Stats.app' 'ZoomHider.app'