From d6c42aeb4426bf78db0e453441307305d4f57cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=20G=C3=B3mez?= Date: Thu, 10 Aug 2023 20:41:28 +0200 Subject: [PATCH] feat: improve config --- git/.gitconfig | 2 +- modules/private | 2 +- os/mac/iTerm/com.googlecode.iterm2.plist | 4 ++- os/mac/mac-os.sh | 36 ++---------------------- shell/exports.sh | 3 ++ symlinks/conf.macos.yaml | 5 ++-- 6 files changed, 12 insertions(+), 40 deletions(-) diff --git a/git/.gitconfig b/git/.gitconfig index 2cac97e..f52ed03 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -92,7 +92,7 @@ [tag] gpgsign = true [gpg] - program = /usr/local/bin/gpg + program = /Users/rafa.gomez/bin/gpg [pull] rebase = true [filter "lfs"] diff --git a/modules/private b/modules/private index b8ce80d..1a673ff 160000 --- a/modules/private +++ b/modules/private @@ -1 +1 @@ -Subproject commit b8ce80d188577ecdf639a9d50f6d2ac724b42bfe +Subproject commit 1a673ffc35676536e73c678ccd558be5d516e96c diff --git a/os/mac/iTerm/com.googlecode.iterm2.plist b/os/mac/iTerm/com.googlecode.iterm2.plist index 803a6c1..4bd6a47 100644 --- a/os/mac/iTerm/com.googlecode.iterm2.plist +++ b/os/mac/iTerm/com.googlecode.iterm2.plist @@ -2562,6 +2562,8 @@ Yes Custom Directory Advanced + Custom Locale + en_US Default Bookmark No Disable Printing @@ -2812,7 +2814,7 @@ Send Code When Idle Set Local Environment Vars - + 2 Shortcut Show Mark Indicators diff --git a/os/mac/mac-os.sh b/os/mac/mac-os.sh index cb82d59..0e941a9 100644 --- a/os/mac/mac-os.sh +++ b/os/mac/mac-os.sh @@ -40,9 +40,6 @@ defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false # Disable the “Are you sure you want to open this application?” dialog defaults write com.apple.LaunchServices LSQuarantine -bool false -# Restart automatically if the computer freezes -sudo systemsetup -setrestartfreeze on - # Disable automatic capitalization defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false @@ -52,9 +49,6 @@ defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false # Disable macOS text expansion defaults write -g WebAutomaticTextReplacementEnabled -bool false -# Use Apple persistence -defaults write -g ApplePersistence -bool yes - # Sped up dialogue boxes https://robservatory.com/speed-up-your-mac-via-hidden-prefs/ defaults write NSGlobalDomain NSWindowResizeTime 0.001 @@ -70,9 +64,6 @@ defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 -# Disable acceleration for external mouses -defaults write .GlobalPreferences com.apple.mouse.scaling 0 - defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool true # Set a blazingly fast keyboard repeat rate @@ -91,7 +82,7 @@ defaults write NSGlobalDomain AppleMetricUnits -bool true sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true # Set the timezone; see `sudo systemsetup -listtimezones` for other values -sudo systemsetup -settimezone "Europe/Brussels" >/dev/null +sudo systemsetup -settimezone "Europe/Madrid" >/dev/null ############################################################################### # Screen # @@ -101,22 +92,6 @@ sudo systemsetup -settimezone "Europe/Brussels" >/dev/null defaults write com.apple.screensaver askForPassword -int 1 defaults write com.apple.screensaver askForPasswordDelay -int 0 -# Save screenshots to the desktop -defaults write com.apple.screencapture location -string "${HOME}/Desktop" - -# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) -defaults write com.apple.screencapture type -string "png" - -# Enable subpixel font rendering on non-Apple LCDs -# Reference: https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501 -defaults write NSGlobalDomain AppleFontSmoothing -int 1 - -# Font rendering stuff -defaults write -g CGFontRenderingFontSmoothingDisabled -bool YES - -# Reduce transparency -defaults write com.apple.universalaccess reduceTransparency 1 - # Autohide the menu bar defaults write NSGlobalDomain _HIHideMenuBar -bool true @@ -159,17 +134,9 @@ defaults write com.apple.frameworks.diskimages skip-verify -bool true defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true -# Automatically open a new Finder window when a volume is mounted -defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true -defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true -defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true - # Disable the warning before emptying the Trash defaults write com.apple.finder WarnOnEmptyTrash -bool false -# Enable AirDrop over Ethernet and on unsupported Macs running Lion -defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true - # Enable spring loading for directories defaults write NSGlobalDomain com.apple.springing.enabled -bool true @@ -212,6 +179,7 @@ defaults write com.apple.dock dashboard-in-overlay -bool true # Don’t automatically rearrange Spaces based on most recent use defaults write com.apple.dock mru-spaces -bool false +# Delay before showing the Dock defaults write com.apple.Dock autohide-delay -float 0.3 # Automatically hide and show the Dock diff --git a/shell/exports.sh b/shell/exports.sh index d3d3512..b99be02 100644 --- a/shell/exports.sh +++ b/shell/exports.sh @@ -28,6 +28,7 @@ export JAVA_HOME='/Library/Java/JavaVirtualMachines/jbrsdk_jcef-17.0.4.1-osx-aar export GEM_HOME="$HOME/.gem" export GOPATH="$HOME/.go" export PYTORCH_ENABLE_MPS_FALLBACK=1 + # ------------------------------------------------------------------------------ # Apps # ------------------------------------------------------------------------------ @@ -50,6 +51,8 @@ export BAT_THEME='gruvbox-dark' GPG_TTY=$(tty) export GPG_TTY +export LANG="en_US.UTF-8" + export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true export PUPPETEER_EXECUTABLE_PATH="/opt/homebrew/bin/chromium" diff --git a/symlinks/conf.macos.yaml b/symlinks/conf.macos.yaml index 109fac5..8e6e9cb 100644 --- a/symlinks/conf.macos.yaml +++ b/symlinks/conf.macos.yaml @@ -9,8 +9,6 @@ - ~/.hushlogin - link: - /usr/local/bin/git: /opt/homebrew/bin/git - /usr/local/bin/gpg: /opt/homebrew/bin/gpg scripts/private: ~/Library/Mobile Documents/com~apple~CloudDocs/etc/private_scripts ~/.config/karabiner.edn: os/mac/karabiner-goku/karabiner.edn ~/.config/karabiner: os/mac/karabiner-elements @@ -31,11 +29,12 @@ ~/bin/bash: /opt/homebrew/bin/bash ~/bin/date: /opt/homebrew/bin/gdate ~/bin/find: /opt/homebrew/bin/gfind + ~/bin/git: /opt/homebrew/bin/git + ~/bin/gpg: /opt/homebrew/bin/gpg ~/bin/make: /opt/homebrew/bin/gmake ~/bin/node: /opt/homebrew/opt/node@18/bin/node ~/bin/npm: /opt/homebrew/opt/node@18/bin/npm ~/bin/pecl: /opt/homebrew/opt/php@8.1/bin/pecl - ~/bin/php7: /opt/homebrew/opt/php@7.4/bin/php ~/bin/php: /opt/homebrew/opt/php@8.1/bin/php ~/bin/sed: /opt/homebrew/bin/gsed ~/bin/touch: /opt/homebrew/bin/gtouch