diff --git a/.bash_completion.d/rake.bash b/.bash_completion.d/rake.bash index a90a2da..cca1c07 100644 --- a/.bash_completion.d/rake.bash +++ b/.bash_completion.d/rake.bash @@ -6,6 +6,10 @@ # Fixing it to restrict changes to rakecomplete only. # export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/} +# Troubleshooting === +# If completion isn't working, ensure you've bundled and that bare `rake` works. +# After that, you may need to `rm .rake_tasks~`. + _rakecomplete() { local cur _get_comp_words_by_ref -n : cur diff --git a/.bash_profile b/.bash_profile index b1bc7fc..3511b82 100644 --- a/.bash_profile +++ b/.bash_profile @@ -3,17 +3,14 @@ BASH_REPORT_MISSING_SOURCES=true -# Copied from https://github.com/scop/bash-completion/bash_completion -# Fixes https://github.com/Backblaze/B2_Command_Line_Tool/issues/500 -_have() -{ - # Completions for system administrator commands are installed as well in - # case completion is attempted via `sudo command ...'. - PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin type $1 &>/dev/null -} - prepend_new_path_if_exists() { - [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]] && export PATH="$1:$PATH" + if [ -d "$1" ]; then + # Pop the path off PATH (with pipes) before prepending it to PATH. ;) + # This is preferable to no-op'ing if the path already exists, to ensure that system paths + # don't take precedence in tmux or screen-like environments. + local CLEAN_PATH=$(echo "${PATH}:" | sed -e "s|$1:||" -e 's|:$||') + export PATH="$1:$CLEAN_PATH" + fi } # don't bother adding paths if it'll do no good. @@ -39,7 +36,7 @@ if command -v brew &> /dev/null; then source_if_exists "${HOMEBREW_ROOT}/etc/profile.d/bash_completion.sh" fi -source_if_exists "$HOME/.fzf.bash" +source_if_exists "$HOME/.fzf.bash" # fzf --bash > ~/.fzf.bash source_if_exists "$HOME/.bashrc" # always prefer the current directory's bin diff --git a/.bashrc.Darwin b/.bashrc.Darwin index 7f503ea..f82895c 100644 --- a/.bashrc.Darwin +++ b/.bashrc.Darwin @@ -3,7 +3,7 @@ export BASH_SILENCE_DEPRECATION_WARNING=1 export EDITNOW='subl' -export EDITOR='subl -w' +export EDITOR='subl -w -n' export LESS="$LESS -i -F -R -X" export CLICOLOR=1 diff --git a/.bashrc.Linux b/.bashrc.Linux index 8049e31..7575142 100644 --- a/.bashrc.Linux +++ b/.bashrc.Linux @@ -66,6 +66,7 @@ source_if_exists() { [[ -s "$1" ]] && source "$1" } +source_if_exists "$HOME/.fzf.bash" source_if_exists "$HOME/.homesick/repos/homeshick/homeshick.sh" source_if_exists "$HOME/.homesick/repos/homeshick/completions/homeshick-completion.bash" source_if_exists "$HOME/.asdf/asdf.sh" diff --git a/.bashrc.mercury b/.bashrc.mercury index c0d7eb7..0694792 100644 --- a/.bashrc.mercury +++ b/.bashrc.mercury @@ -1,5 +1,14 @@ #!/usr/bin/env bash +# Copied from https://github.com/scop/bash-completion/bash_completion +# Fixes https://github.com/Backblaze/B2_Command_Line_Tool/issues/500 +_have() +{ + # Completions for system administrator commands are installed as well in + # case completion is attempted via `sudo command ...'. + PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin type $1 &>/dev/null +} + # enable the 1password ssh agent export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock diff --git a/.bashrc.eris b/.bashrc.perses similarity index 91% rename from .bashrc.eris rename to .bashrc.perses index b381d2a..910d5f6 100644 --- a/.bashrc.eris +++ b/.bashrc.perses @@ -4,8 +4,7 @@ export ERL_AFLAGS="-kernel shell_history enabled" export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH" export PATH="$HOME/.parallelize/bin:$PATH" - -alias standup="subl ~/Documents/standup.md" +alias standup="subl ~/.parallelize/standup.md" alias fmcode="code ~/wrk/futurism.code-workspace" alias fmstart="tmuxinator start futurism" alias fmstop="tmuxinator stop futurism" diff --git a/Brewfile b/Brewfile index 530c843..06a7aa5 100644 --- a/Brewfile +++ b/Brewfile @@ -3,9 +3,6 @@ tap "homebrew/services" tap "1password/tap" -# tap 'puma/puma' -# brew 'puma/puma/puma-dev' - # __ _ # / _| ___ _ __ _ __ ___ _ _| | __ _ # | |_ / _ \| '__| '_ ` _ \| | | | |/ _` | @@ -29,6 +26,7 @@ brew "gnu-sed" brew "gnu-tar" brew "gnupg" brew "hub" +brew "just" brew "mas" brew "openssl" brew "rclone" diff --git a/Makefile b/Makefile index 93fae5d..59dcfad 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +SHELL := /bin/bash + default: @echo "Cowardly refusing to run on $(shell uname). Use platform specific targets." @@ -5,9 +7,8 @@ brew-install: /bin/bash -c "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew-bundle: - eval "$$(/opt/homebrew/bin/brew shellenv)" - brew update - brew bundle + /opt/homebrew/bin/brew shellenv > /tmp/brew-shell.env + source /tmp/brew-shell.env && which brew && brew update && brew bundle macos: sh .macos diff --git a/README.md b/README.md index c05c609..0ab2315 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,19 @@ cd .dotfiles make brew-install make brew-bundle +# close terminal +# grant iterm full disk access +# auth with 1password +# safari auth to github + # set modern bash as the default shell -(($(grep bash /etc/shells | wc -l)<2)) && which -a bash | head -n1 | sudo tee -a /etc/shells -chsh -s $(which -a bash | head -n1) + +if [ -f /opt/homebrew/bin/bash ]; then + echo '/opt/homebrew/bin/bash' | sudo tee -a /etc/shells + chsh -s '/opt/homebrew/bin/bash' +else + echo 'Unable to set default shell to `/opt/homebrew/bin/bash`' +fi make link-dotfiles make link-karabiner @@ -27,6 +37,9 @@ make restore-preferences make macos-reset-dock make macos-disable-restore-apps-on-login make macos +# restart + +# enable 1password shell integration / ssh agent ``` ## GNU/Linux diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..af03072 --- /dev/null +++ b/TODO.md @@ -0,0 +1,8 @@ +# TODO + +## macOS Config + +- Disable Click wallpaper to reveal desktop +- Correctly configure 4-finger swiping +- Grant iTerm.app full disk access +- Grant 1Password, Karabiner, and Dropbox accessibility access