From cd4b269e4ebdf1647efeae8aeae94a2f8c8e03d1 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Mon, 25 Dec 2023 05:29:22 +0000 Subject: [PATCH] Latest --- docs/TODO.md | 1 + .../run_after_20-post-install.sh.tmpl | 1 + .../autorestic/autorestic-user.yml.tmpl | 30 +++++++++---------- home/dot_config/shell/macos.sh.tmpl | 29 ------------------ 4 files changed, 17 insertions(+), 44 deletions(-) diff --git a/docs/TODO.md b/docs/TODO.md index 1c785af8..b25e8d74 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -1,5 +1,6 @@ xattr -d com.apple.quarantine rclone Create issue about setting up completions - https://github.com/rsteube/lazycomplete +pw="$(osascript -e 'Tell application "System Events" to display dialog "Password:" default answer "" with hidden answer' -e 'text returned of result' 2>/dev/null)" && echo "$pw" Use minimum permissions / IAM for https://iosexample.com/a-command-line-tool-to-download-and-install-apples-xcode/ https://github.com/tiiiecherle/osx_install_config/blob/master/03_homebrew_casks_and_mas/3b_homebrew_casks_and_mas_install/6_mas_appstore.sh diff --git a/home/.chezmoiscripts/universal/run_after_20-post-install.sh.tmpl b/home/.chezmoiscripts/universal/run_after_20-post-install.sh.tmpl index 5361a139..bd3b22bd 100644 --- a/home/.chezmoiscripts/universal/run_after_20-post-install.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_after_20-post-install.sh.tmpl @@ -332,6 +332,7 @@ setDefaultBrowser() { osascript "$HOME/Library/Scripts/default-browser.scpt" "{{ .user.defaultBrowserDarwin }}" || EXIT_CODE=$? if [ -n "$EXIT_CODE" ]; then logg error 'Failed to change default browser' + unset EXIT_CODE fi else logg info 'Setting default browser for text/html to {{ .user.defaultBrowser }}' diff --git a/home/dot_config/autorestic/autorestic-user.yml.tmpl b/home/dot_config/autorestic/autorestic-user.yml.tmpl index a43ec17c..71a95ace 100644 --- a/home/dot_config/autorestic/autorestic-user.yml.tmpl +++ b/home/dot_config/autorestic/autorestic-user.yml.tmpl @@ -55,49 +55,49 @@ extras: locations: altair: - from: "$ALTAIR_APPDATA" + from: "{{ env "ALTAIR_APPDATA" }}" <<: *app android-studio: - from: "$ANDROID_STUDIO_APPDATA" + from: "{{ env "ANDROID_STUDIO_APPDATA" }}" <<: *app brave-browser: - from: "$BRAVE_BROWSER_APPDATA" + from: "{{ env "BRAVE_BROWSER_APPDATA" }}" <<: *app ferdium: - from: "$FERDIUM_APPDATA" + from: "{{ env "FERDIUM_APPDATA" }}" <<: *app firefox: - from: "$FIREFOX_APPDATA" + from: "{{ env "FIREFOX_APPDATA" }}" <<: *app google-chrome: - from: "$GOOGLE_CHROME_APPDATA" + from: "{{ env "GOOGLE_CHROME_APPDATA" }}" <<: *app logi-options-plus: - from: "$LOGI_OPTIONS_PLUS_APPDATA" + from: "{{ env "LOGI_OPTIONS_PLUS_APPDATA" }}" <<: *app mailspring: - from: "$MAILSPRING_APPDATA" + from: "{{ env "MAILSPRING_APPDATA" }}" <<: *app mark-text: - from: "$MARK_TEXT_APPDATA" + from: "{{ env "MARK_TEXT_APPDATA" }}" <<: *app microsoft-edge: - from: "$MICROSOFT_EDGE_APPDATA" + from: "{{ env "MICROSOFT_EDGE_APPDATA" }}" <<: *app notion: - from: "$NOTION_APPDATA" + from: "{{ env "NOTION_APPDATA" }}" <<: *app pieces-os: - from: "$PIECES_OS_APPDATA" + from: "{{ env "PIECES_OS_APPDATA" }}" <<: *app remmina: - from: "$REMMINA_APPDATA" + from: "{{ env "REMMINA_APPDATA" }}" <<: *app tor-browser: - from: "$TOR_BROWSER_APPDATA" + from: "{{ env "TOR_BROWSER_APPDATA" }}" <<: *app warp-terminal: - from: "$WARP_TERMINAL_APPDATA" + from: "{{ env "WARP_TERMINAL_APPDATA" }}" <<: *app home-local: from: ~/ diff --git a/home/dot_config/shell/macos.sh.tmpl b/home/dot_config/shell/macos.sh.tmpl index df97f55b..0a1e7779 100644 --- a/home/dot_config/shell/macos.sh.tmpl +++ b/home/dot_config/shell/macos.sh.tmpl @@ -222,14 +222,6 @@ sudo systemsetup -setdisplaysleep 30 2>/dev/null 1>&2 # power failure. sudo pmset -a hibernatemode 0 -# Remove the sleep image file to save disk space -if sudo rm -f /private/var/vm/sleepimage > /dev/null; then - # Create a zero-byte file instead… - sudo touch /private/var/vm/sleepimage - # …and make sure it can’t be rewritten - sudo chflags uchg /private/var/vm/sleepimage -fi - ############################################################################### # Screen # ############################################################################### @@ -589,28 +581,7 @@ defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnab # Spotlight # ############################################################################### -# Hide Spotlight tray-icon (and subsequent helper) -#sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search -# Disable Spotlight indexing for any volume that gets mounted and has not yet -# been indexed before. -# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. -if [ -d /Volumes/Private ]; then - sudo mdutil -i off "/Volumes/Private" -fi -if [ -d /Volumes/Public ]; then - sudo mdutil -i off "/Volumes/Public" -fi -# ERROR: Could not write domain /.Spotlight-V100/VolumeConfiguration; exiting -# sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" - # Change indexing order and disable some search results -# Yosemite-specific search results (remove them if you are using macOS 10.9 or older): -# MENU_DEFINITION -# MENU_CONVERSION -# MENU_EXPRESSION -# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) -# MENU_WEBSEARCH (send search queries to Apple) -# MENU_OTHER defaults write com.apple.spotlight orderedItems -array \ '{"enabled" = 1;"name" = "APPLICATIONS";}' \ '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \