From a53d655fd713cfab9ad4e72fef00862fbddc8b31 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Wed, 7 Dec 2022 16:14:43 +0200 Subject: [PATCH] dotfiles helper, configs and stuff --- config/gh/gh-extensions.sh | 29 ++++ config/git/config | 10 +- helper.sh | 38 ----- host-air/.gitkeep | 0 host-air/README.md | 3 + host-v/.gitkeep | 0 host-v/README.md | 3 + host-v/config/git/config | 60 ++++++++ install.sh | 1 + local/bin/dotfiles | 104 ++++++++++++++ macos/set-defaults.sh | 280 +++++++++++++++++++++++++++++++++++++ rcrc | 2 +- zshrc | 1 + 13 files changed, 483 insertions(+), 48 deletions(-) create mode 100755 config/gh/gh-extensions.sh delete mode 100755 helper.sh create mode 100644 host-air/.gitkeep create mode 100644 host-air/README.md create mode 100644 host-v/.gitkeep create mode 100644 host-v/README.md create mode 100644 host-v/config/git/config create mode 100755 local/bin/dotfiles create mode 100755 macos/set-defaults.sh diff --git a/config/gh/gh-extensions.sh b/config/gh/gh-extensions.sh new file mode 100755 index 0000000..e254720 --- /dev/null +++ b/config/gh/gh-extensions.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Install GitHub CLI extensions + +# GitHub CLI extension for reviewing Dependabot PRs. +gh extension install einride/gh-dependabot +# A GitHub CLI extension that provides summary pull request metrics. +gh extension install hectcastro/gh-metrics +# being an extension to view the overall health of an organization's use of actions +gh extension install rsese/gh-actions-status +# GitHub CLI extension for label management +gh extension install heaths/gh-label +# An opinionated GitHub Cli extension for creating +# changelogs that adhere to the keep a changelog specification. +gh extension install chelnak/gh-changelog +# Safely deletes local branches with no upstream and no un-pushed commits +gh extension install davidraviv/gh-clean-branches +# A beautiful CLI dashboard for GitHub 🚀 +gh extension install dlvhdr/gh-dash +# A github-cli extension script to clone all repositories +# in an organization, optionally filtering by topic. +gh extension install matt-bartel/gh-clone-org +# GitHub CLI extension to generate montage from GitHub user avatars +gh extension install andyfeller/gh-montage +# Organisation specific extension for gh cli to retrieve different statistics +gh extension install VildMedPap/gh-orgstats +# GitHub CLI extension for generating a report on repository dependencies. +gh extension install andyfeller/gh-dependency-report +# gh cli extension to generate account/organization/enterprise reports +gh extension install stoe/gh-report diff --git a/config/git/config b/config/git/config index b3bd631..0349db5 100644 --- a/config/git/config +++ b/config/git/config @@ -1,7 +1,6 @@ [user] name = Ismo Vuorinen - email = ismo.vuorinen@vincit.fi - signingkey = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLyOvkr1nRqMVv3UAizmk6C+q40H4khvw7qIXXXyOyFmzjwYx/Cuxoi4uZVjX+q4qFYJ+c312uu6YXiEtfyoCao3wub8r1cLBQ3eIvuyWp2K8Ixcd9JmFmLmoeiENpJxqyr0WPZLDkrCWUZCsQQh8zzGFnfciUdUdTiZ7s21AEhhmFRSdFlVfQSlGMFxU321psg1YilcP80bDwFd1FsL4TssSkwlbgP/twqnpZ4436TTo7kp0UnH/RZkfRdDWScKHaWgncBG0CZeQxGWnRp8fvZn/7gDnthcZhvnDALVBE7QFuZ90GxqVw3IGpHryV0mFO6EGQ9Ke9YX7pKVZPUXZjeCN4SVKsqFdVJ6AjaSJ9K7nL98rYK7qNzndT3cKqPNgPteyXWRulH68A51ecQqHrjTttZcdN9hKt9uBHpzuXsby2QObT+VB4MNjZapa+YYF/WgwJCml4lzn2xMFg1vYZD78pfoJ9e5f2cL1MMlUSDb0TNxmEXfDQ77H/pRpKDz0= + email = ismo@ivuorinen.net [core] excludesfile = ~/.config/git/gitignore @@ -51,10 +50,3 @@ deleted = red bold strike untracked = cyan branch = yellow black bold ul -[gpg] - format = ssh -[gpg "ssh"] - program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign - allowedSignersFile = ~/.ssh/allowed_signers -[commit] - gpgsign = true diff --git a/helper.sh b/helper.sh deleted file mode 100755 index 4cd9bae..0000000 --- a/helper.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# -# Dotfiles and install helper -# - -# Helper variables, override with ENVs like `VERBOSE=1 helpers.sh help` -: ${VERBOSE:=0} -: ${CP:=/bin/cp} -: ${LN:=/bin/ln} -: ${MKDIR:=/bin/mkdir} -: ${RM:=/bin/rm} -: ${DIRNAME:=/usr/bin/dirname} - -case "$1" in - install) - echo "install stuff" - case "$2" in - *) - echo "-> $0 install [brew]" - esac - ;; - brew) - echo "brew commands" - ;; - dotfiles) - echo "dotfiles manager" - ;; - other) - echo "Other commands" - ;; - *) - echo $"Usage: $0 [install | brew | dotfiles | other]" - echo $" All commands have their own subcommands." - echo $" When in doubt run the subcommand to show list." - echo "" - exit 1 - ;; -esac diff --git a/host-air/.gitkeep b/host-air/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/host-air/README.md b/host-air/README.md new file mode 100644 index 0000000..a17ab91 --- /dev/null +++ b/host-air/README.md @@ -0,0 +1,3 @@ +# .dotfiles/host-air + +This is my home computer. diff --git a/host-v/.gitkeep b/host-v/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/host-v/README.md b/host-v/README.md new file mode 100644 index 0000000..3abfc4c --- /dev/null +++ b/host-v/README.md @@ -0,0 +1,3 @@ +# .dotfiles/host-v + +This is my work computer. diff --git a/host-v/config/git/config b/host-v/config/git/config new file mode 100644 index 0000000..b3bd631 --- /dev/null +++ b/host-v/config/git/config @@ -0,0 +1,60 @@ +[user] + name = Ismo Vuorinen + email = ismo.vuorinen@vincit.fi + signingkey = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLyOvkr1nRqMVv3UAizmk6C+q40H4khvw7qIXXXyOyFmzjwYx/Cuxoi4uZVjX+q4qFYJ+c312uu6YXiEtfyoCao3wub8r1cLBQ3eIvuyWp2K8Ixcd9JmFmLmoeiENpJxqyr0WPZLDkrCWUZCsQQh8zzGFnfciUdUdTiZ7s21AEhhmFRSdFlVfQSlGMFxU321psg1YilcP80bDwFd1FsL4TssSkwlbgP/twqnpZ4436TTo7kp0UnH/RZkfRdDWScKHaWgncBG0CZeQxGWnRp8fvZn/7gDnthcZhvnDALVBE7QFuZ90GxqVw3IGpHryV0mFO6EGQ9Ke9YX7pKVZPUXZjeCN4SVKsqFdVJ6AjaSJ9K7nL98rYK7qNzndT3cKqPNgPteyXWRulH68A51ecQqHrjTttZcdN9hKt9uBHpzuXsby2QObT+VB4MNjZapa+YYF/WgwJCml4lzn2xMFg1vYZD78pfoJ9e5f2cL1MMlUSDb0TNxmEXfDQ77H/pRpKDz0= + +[core] + excludesfile = ~/.config/git/gitignore + +[alias] + reset-origin = !git fetch origin && git reset --hard origin/master && git clean -f -d + reset-upstream = !git fetch upstream && git reset --hard upstream/master && git clean -f -d + nah = !git reset --hard && git clean -df + undo-commit = reset HEAD~ --soft + llog = log --pretty=fuller + logs = log --graph --pretty=format:'%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) %C(cyan)<%an>%Creset' --abbrev-commit + rl = reflog --format='%C(auto)%h %<|(20)%gd %C(blue)%cr%C(reset) %gs (%s)' + tagdate = log --date-order --graph --tags --simplify-by-decoration --pretty=format:\"%ai %h %d\" + branchbydate = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)' + branchcolor = "!for ref in $(git for-each-ref --sort=-committerdate --format=\"%(refname)\" refs/heads/ refs/remotes ); do git log -n1 $ref --pretty=format:\"%Cgreen%cr%Creset %C(yellow)%d%Creset %C(bold blue)<%an>%Creset%n\" | cat ; done | awk '! a[$0]++'" + +[diff] + tool = difftastic + +[difftool] + prompt = false + +[difftool "difftastic"] + cmd = difft "$LOCAL" "$REMOTE" + +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true + +[init] + defaultBranch = master + +[pull] + rebase = false + +[color] + ui = true + diff = auto + branch = auto + status = auto + +[color "status"] + added = green bold + changed = yellow + deleted = red bold strike + untracked = cyan + branch = yellow black bold ul +[gpg] + format = ssh +[gpg "ssh"] + program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign + allowedSignersFile = ~/.ssh/allowed_signers +[commit] + gpgsign = true diff --git a/install.sh b/install.sh index 630eb2e..dc45b29 100755 --- a/install.sh +++ b/install.sh @@ -73,6 +73,7 @@ handle_file_ln "/Users/ivuorinen/.dotfiles/config/git/gitignore" "/Users/ivuorin handle_file_ln "/Users/ivuorinen/.dotfiles/config/wtf/config.yml" "/Users/ivuorinen/.config/wtf/config.yml" handle_file_ln "/Users/ivuorinen/.dotfiles/git_profiles" "/Users/ivuorinen/.git_profiles" handle_file_ln "/Users/ivuorinen/.dotfiles/huskyrc" "/Users/ivuorinen/.huskyrc" +handle_file_ln "/Users/ivuorinen/.dotfiles/local/bin/dotfiles" "/Users/ivuorinen/.local/bin/dotfiles" handle_file_ln "/Users/ivuorinen/.dotfiles/local/bin/x-open-ports" "/Users/ivuorinen/.local/bin/x-open-ports" handle_file_ln "/Users/ivuorinen/.dotfiles/rcrc" "/Users/ivuorinen/.rcrc" handle_file_ln "/Users/ivuorinen/.dotfiles/ssh/allowed_signers" "/Users/ivuorinen/.ssh/allowed_signers" diff --git a/local/bin/dotfiles b/local/bin/dotfiles new file mode 100755 index 0000000..acd3d0e --- /dev/null +++ b/local/bin/dotfiles @@ -0,0 +1,104 @@ +#!/usr/bin/env bash +# +# Dotfiles and install helper +# (c) Ismo Vuorinen 2022 +# Licensed under MIT, see LICENSE +# + +# Helper variables, override with ENVs like `VERBOSE=1 helpers.sh help` +: "${VERBOSE:=0}" +: "${DOTFILES:=$HOME/.dotfiles}" +: "${INSTALL_SCRIPT:=$DOTFILES/install.sh}" +: "${BREWFILE:=$DOTFILES/Brewfile}" + +function usage() { + echo $"Usage: $0 [install | brew | dotfiles | other]" + echo $" All commands have their own subcommands." + echo $" When in doubt run the subcommand to show list." +} + +function section_install() { + USAGE_PREFIX="Usage: $0 install" + + case "$1" in + *) + echo "$USAGE_PREFIX [link | update]" + echo " * link: Use rcrc to update dotfile links" + echo " * update: Updates and upgrades brew packages" + echo " * updatebundle: Updates Brewfile with descriptions" + ;; + esac +} + +function section_brew() { + USAGE_PREFIX="Usage: $0 brew" + + if ! command -v brew &> /dev/null; then + echo "brew could not be found, please install it first" + exit + fi + + case "$1" in + install) + brew bundle install --file="$BREWFILE"; echo "🎉 Done!" + ;; + update) + brew update && brew upgrade; echo "🎉 Done!" + ;; + updatebundle) + # Updates .dotfiles/Brewfile with descriptions + brew bundle dump --force --file="$BREWFILE" --describe + echo "🎉 Done!" + ;; + autoupdate) + brew autoupdate start 43200 --upgrade --cleanup --immediate + ;; + *) + echo "$USAGE_PREFIX [install | update | updatebundle]" + echo " * install: Installs items defined in Brewfile" + echo " * update: Updates and upgrades brew packages" + echo " * updatebundle: Updates Brewfile with descriptions" + echo " * autoupdate: Setups brew auto-update and runs it immediately" + ;; + esac +} + +function section_dotfiles() { + USAGE_PREFIX="Usage: $0 dotfiles" + + case "$1" in + link) + rcup -B "$HOSTNAME" -v && echo "🎉 Done!" + ;; + update) + # Updates .dotfiles/install.sh and formats it + rcup -B 0 -g | \ + tee "$INSTALL_SCRIPT" 1> /dev/null && \ + shfmt -w -l "$INSTALL_SCRIPT" && \ + echo "🎉 Done!" + ;; + *) + echo "$USAGE_PREFIX [link | update]" + echo " * link: Use rcrc to update dotfile links" + echo " * update: Updates dotfile links, installs host specific overrides automatically" + ;; + esac +} + +function section_other() { + case "$1" in + *) + echo "section_other" + echo "$1" + ;; + esac +} + +# The main loop. first keyword after $0 triggers section, or help. +case "$1" in + install) section_install "$2" ;; + brew) section_brew "$2" ;; + dotfiles) section_dotfiles "$2" ;; + other) section_other "$2" ;; + *) usage; exit 1 ;; +esac diff --git a/macos/set-defaults.sh b/macos/set-defaults.sh new file mode 100755 index 0000000..f9aa370 --- /dev/null +++ b/macos/set-defaults.sh @@ -0,0 +1,280 @@ +#!/usr/bin/env bash +echo 'start osx/set-defaults.sh' + +# Ask for the administrator password upfront +sudo -v + +# Keep-alive: update existing `sudo` time stamp until `.osx` has finished +while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & + +############################################################################### +# General UI/UX # +############################################################################### + +# Disable the sound effects on boot +sudo nvram SystemAudioVolume=" " + +# Menu bar: disable transparency +#defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false + +# Set sidebar icon size to medium +defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 + +# Increase window resize speed for Cocoa applications +defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 + +# Expand save panel by default +defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true +defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true + +# Expand print panel by default +defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true +defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true + +# Save to disk (not to iCloud) by default +defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false + +# Automatically quit printer app once the print jobs complete +defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true + +# Disable the “Are you sure you want to open this application?” dialog +defaults write com.apple.LaunchServices LSQuarantine -bool false + +# Disable Resume system-wide +defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false + +# Disable automatic termination of inactive apps +defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true + +# Disable the crash reporter +#defaults write com.apple.CrashReporter DialogType -string "none" + +# Reveal IP address, hostname, OS version, etc. when clicking the clock +# in the login window +sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName + +# Disable smart quotes as they’re annoying when typing code +defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false + +# Disable smart dashes as they’re annoying when typing code +defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false + +############################################################################### +# SSD-specific tweaks # +############################################################################### + +# Disable hibernation (speeds up entering sleep mode) +sudo pmset -a hibernatemode 0 + +# Disable the sudden motion sensor as it’s not useful for SSDs +sudo pmset -a sms 0 + +############################################################################### +# Trackpad, mouse, keyboard, Bluetooth accessories, and input # +############################################################################### + +# Increase sound quality for Bluetooth headphones/headsets +defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80 +defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80 +defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80 +defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80 +defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80 +defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 80 +defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 80 + +# Enable full keyboard access for all controls +# (e.g. enable Tab in modal dialogs) +defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 + +# Set language and text formats +# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with +# `Inches`, `en_GB` with `en_US`, and `true` with `false`. +defaults write NSGlobalDomain AppleLanguages -array "en" +defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR" +defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" +defaults write NSGlobalDomain AppleMetricUnits -bool true + +# Set the timezone; see `systemsetup -listtimezones` for other values +systemsetup -settimezone "Europe/Helsinki" > /dev/null + +# Disable auto-correct +defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false + +# Stop iTunes from responding to the keyboard media keys +#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null + +############################################################################### +# Screen # +############################################################################### + +# Require password immediately after sleep or screen saver begins +defaults write com.apple.screensaver askForPassword -int 1 +defaults write com.apple.screensaver askForPasswordDelay -int 0 + +############################################################################### +# Finder # +############################################################################### + +# Set Desktop as the default location for new Finder windows +# For other paths, use `PfLo` and `file:///full/path/here/` +defaults write com.apple.finder NewWindowTarget -string "PfDe" +defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" + +# Show icons for hard drives, servers, and removable media on the desktop +defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true +defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true +defaults write com.apple.finder ShowMountedServersOnDesktop -bool true +defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true + +# Finder: show all filename extensions +defaults write NSGlobalDomain AppleShowAllExtensions -bool true + +# Finder: allow text selection in Quick Look +defaults write com.apple.finder QLEnableTextSelection -bool true + +# Display full POSIX path as Finder window title +defaults write com.apple.finder _FXShowPosixPathInTitle -bool true + +# When performing a search, search the current folder by default +defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" + +# Disable the warning when changing a file extension +defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false + +# Avoid creating .DS_Store files on network volumes +defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true + +# Disable disk image verification +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 + +# Use list view in all Finder windows by default +# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` +defaults write com.apple.finder FXPreferredViewStyle -string "clmv" + +# Disable the warning before emptying the Trash +defaults write com.apple.finder WarnOnEmptyTrash -bool false + +# Show the ~/Library folder +# chflags nohidden ~/Library + +# Show the ~/Users folder +# chflags nohidden /Users + +# Expand the following File Info panes: +# “General”, “Open with”, and “Sharing & Permissions” +defaults write com.apple.finder FXInfoPanesExpanded -dict \ + General -bool true \ + OpenWith -bool true \ + Privileges -bool true + +############################################################################### +# Screenshots # +############################################################################### + +# Set default screenshot location +#defaults write com.apple.screencapture "location" -string "~/Documents/Screenshots" + +# Exclude date and time in screenshot filenames +defaults write com.apple.screencapture "include-date" -bool false + +# Change the default screenshot file name +defaults write com.apple.screencapture "name" -string "screenshot" + +############################################################################### +# Dock, Dashboard, and hot corners # +############################################################################### + +# Prevent applications from bouncing in Dock +defaults write com.apple.dock no-bouncing -bool true + +# Set the icon size of Dock items to 72 pixels +defaults write com.apple.dock tilesize -int 72 + +# Hide indicator lights for open applications in the Dock +defaults write com.apple.dock show-process-indicators -bool false + +# Wipe all (default) app icons from the Dock +# This is only really useful when setting up a new Mac, or if you don’t use +# the Dock to launch apps. +defaults write com.apple.dock persistent-apps -array "" + +# Disable Dashboard +defaults write com.apple.dashboard mcx-disabled -bool true + +# Don’t show Dashboard as a Space +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 + +# Make Dock icons of hidden applications translucent +defaults write com.apple.dock showhidden -bool true + +############################################################################### +# Safari & WebKit # +############################################################################### + +# Enable Safari’s debug menu +defaults write com.apple.Safari IncludeInternalDebugMenu -bool true + +# Enable the Develop menu and the Web Inspector in Safari +defaults write com.apple.Safari IncludeDevelopMenu -bool true +defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true + +# Don’t display the annoying prompt when quitting iTerm +#defaults write com.googlecode.iterm2 PromptOnQuit -bool false + +# Prevent Time Machine from prompting to use new hard drives as backup volume +defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true + +############################################################################### +# Activity Monitor # +############################################################################### + +# Show the main window when launching Activity Monitor +defaults write com.apple.ActivityMonitor OpenMainWindow -bool true + +# Visualize CPU usage in the Activity Monitor Dock icon +defaults write com.apple.ActivityMonitor IconType -int 5 + +# Show all processes in Activity Monitor +defaults write com.apple.ActivityMonitor ShowCategory -int 0 + +# Sort Activity Monitor results by CPU usage +defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" +defaults write com.apple.ActivityMonitor SortDirection -int 0 + +############################################################################### +# Address Book, Dashboard, iCal, TextEdit, and Disk Utility # +############################################################################### + +# Use plain text mode for new TextEdit documents +defaults write com.apple.TextEdit RichText -int 0 + +# Open and save files as UTF-8 in TextEdit +defaults write com.apple.TextEdit PlainTextEncoding -int 4 +defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 + +############################################################################### +# Messages # +############################################################################### + +# Disable smart quotes as it’s annoying for messages that contain code +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false + +# Disable continuous spell checking +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false + +############################################################################### +# Kill affected applications # +############################################################################### + +for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \ + "Dock" "Finder" "Mail" "Messages" "Safari" "SizeUp" "SystemUIServer" \ + "Terminal" "Transmission" "Twitter" "iCal"; do + killall "${app}" > /dev/null 2>&1 +done +echo "Done. Note that some of these changes require a logout/restart to take effect." diff --git a/rcrc b/rcrc index 3d0332a..c2fe7df 100644 --- a/rcrc +++ b/rcrc @@ -1,2 +1,2 @@ -EXCLUDES="README.md install.sh Brewfile.lock.json Brewfile" +EXCLUDES="README.md install.sh Brewfile.lock.json Brewfile set-defaults.sh gh-extensions.sh" HOSTNAME=$(hostname -s) diff --git a/zshrc b/zshrc index 8d37e99..1e195e0 100644 --- a/zshrc +++ b/zshrc @@ -36,6 +36,7 @@ export NVM_AUTO_USE=true [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" [[ -f "$HOME/.dotfiles/alias" ]] && source "$HOME/.dotfiles/alias" +[[ -f "$HOME/.dotfiles/alias-$HOSTNAME" ]] && source "$HOME/.dotfiles/alias-$HOSTNAME" # Try to load antigen, if present [[ -f "$HOME/.config/antigen.zsh" ]] && source "$HOME/.config/antigen.zsh"