From b230dfeea7b541150083b52d4729f5c8d6271bd2 Mon Sep 17 00:00:00 2001
From: Christian Emmer <10749361+emmercm@users.noreply.github.com>
Date: Fri, 23 Feb 2024 09:39:55 -0800
Subject: [PATCH] 2/23/2024

---
 .10_macos.bash | 6 ++----
 .bashrc        | 4 ++--
 .zshrc         | 4 ++--
 settings.sh    | 6 ++++++
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/.10_macos.bash b/.10_macos.bash
index eb3de71..bd149dc 100755
--- a/.10_macos.bash
+++ b/.10_macos.bash
@@ -36,10 +36,8 @@ flush() {
 }
 
 # Prefer GNU's coreutils binaries
-if [[ -x "$(command -v brew)" && -d "$(brew --prefix)/Cellar/coreutils" ]]; then
-    alias date="gdate"
-    alias sed="gsed"
-fi
+command -v gdate > /dev/null && alias date="gdate"
+command -v gsed > /dev/null && alias sed="gsed"
 
 # macOS has no `md5sum`, so use `md5` as a fallback
 command -v md5sum > /dev/null || alias md5sum="md5"
diff --git a/.bashrc b/.bashrc
index 2f74157..cd3fe00 100644
--- a/.bashrc
+++ b/.bashrc
@@ -1,5 +1,5 @@
 # Fig pre block. Keep at the top of this file.
-[[ -f "$HOME/.fig/shell/bashrc.pre.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.pre.bash"
+[[ -f "$HOME/.fig/shell/bashrc.pre.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.pre.bash" || true
 ##### Fig (Pre) #####
 
 
@@ -15,4 +15,4 @@ fi
 ##### Fig (Post) #####
 
 # Fig post block. Keep at the bottom of this file.
-[[ -f "$HOME/.fig/shell/bashrc.post.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.post.bash"
+[[ -f "$HOME/.fig/shell/bashrc.post.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.post.bash" || true
diff --git a/.zshrc b/.zshrc
index 728fa38..4bba783 100644
--- a/.zshrc
+++ b/.zshrc
@@ -1,5 +1,5 @@
 # Fig pre block. Keep at the top of this file.
-[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
+[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh" || true
 ##### Fig (Pre) #####
 
 
@@ -26,4 +26,4 @@ fi
 ##### Fig (Post) #####
 
 # Fig post block. Keep at the bottom of this file.
-[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
+[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh" || true
diff --git a/settings.sh b/settings.sh
index fa1ffef..4cc3d6e 100755
--- a/settings.sh
+++ b/settings.sh
@@ -13,6 +13,10 @@ if [[ "${OSTYPE:-}" == "darwin"* ]]; then
     # https://linearmouse.app/
     # https://brew.sh/
 
+    if ! sudo -n true &> /dev/null; then
+        echo -e "\033[1;33mWARN:\033[0m you will be asked for your password to run 'pmset' and other utilities\n"
+    fi
+
     # ***** Settings > Wi-Fi *****
 
     # ***** Settings > Bluetooth *****
@@ -116,6 +120,8 @@ if [[ "${OSTYPE:-}" == "darwin"* ]]; then
     # Turn off auto-correct
     defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
     defaults write NSGlobalDomain WebAutomaticSpellingCorrectionEnabled -bool false
+    # Turn off text replacements (requires restart?)
+    defaults write NSGlobalDomain WebAutomaticTextReplacementEnabled -bool false
     # TODO: keyboard brightness
 
     # ***** Settings > Mouse *****