···6464# Get a file from an HTTP, HTTPS or FTP server
6565brew "curl"
66666767-# Pack, ship and run any application as a lightweight container
6868-brew "docker"
6969-7070-# Platform keystore credential helper for Docker
7171-brew "docker-credential-helper"
7272-7367# Simple, fast and user-friendly alternative to find
7468brew "fd"
7569···379373380374 # Developer Tools
381375 mas "Xcode", id: 497799835
376376+else
377377+ # ==============================================================================
378378+ # Linux-specific packages (assume != Darwin means linux)
379379+ # ==============================================================================
380380+381381+ # Tool for managing OCI containers and pods
382382+ brew "podman"
383383+384384+ # Access X11 clipboards from the command-line
385385+ brew "xclip"
382386end
···2626 and return 0
2727end
28282929+if test -f /usr/share/fish/completions/git.fish
3030+ source /usr/share/fish/completions/git.fish
3131+else if test -f /usr/local/share/fish/completions/git.fish
3232+ source /usr/local/share/fish/completions/git.fish
3333+end
3434+3535+function __fish_yadm_files
3636+ # if we use `yadm` directly, it will setup alts which can cause a race, so instead
3737+ # just manually set the env variables it would normally set (a la `yadm enter`)
3838+ set -fx GIT_DIR $HOME/.local/share/yadm/repo.git
3939+ set -fx GIT_WORKTREE $HOME
4040+4141+ __fish_git_files $argv
4242+end
4343+2944# yadm's specific autocomplete
3045complete -x -c yadm -n __fish_yadm_needs_command -a clone -d 'Clone an existing repository'
3146complete -F -c yadm -n '__fish_yadm_using_command clone' -s w -d 'work-tree to use (default: $HOME)'
···7186complete --force-files -c yadm -l yadm-archive -d 'Override location of yadm encrypted files archive'
7287complete --force-files -c yadm -l yadm-bootstrap -d 'Override location of yadm bootstrap program'
73887474-# if we use `yadm` directly, it will setup alts which can cause a race, so instead
7575-# just manually set the env variables it would normally set (a la `yadm enter`)
7676-set -lx GIT_DIR $HOME/.local/share/yadm/repo.git
7777-set -lx GIT_WORKTREE $HOME
7878-7989# setup variables for git completion using `yadm enter`
8090complete -c yadm -w "git --git-dir='$GIT_DIR' --work-tree='$GIT_WORK_TREE'"
9191+9292+# Override some file completions to avoid waiting forever for untracked files.
9393+# These are mostly just copy-pastes of the same completions in git.fish with minor
9494+# modifications
9595+complete -f -c yadm -n '__fish_git_using_command add' -a '(__fish_yadm_files modified deleted unmerged modified-staged-deleted)'
9696+complete -f -c yadm -n '__fish_git_using_command commit' -a '(__fish_yadm_files modified deleted modified-staged-deleted)'
9797+complete -f -c yadm -n '__fish_git_using_command diff' -n '__fish_git_contains_opt cached staged' -a '(__fish_yadm_files all-staged)'
9898+complete -f -c yadm -n '__fish_git_using_command diff' -n 'not __fish_git_contains_opt cached staged' -a '(__fish_yadm_files all-staged modified modified-staged-deleted)'
9999+complete -f -c yadm -n '__fish_git_using_command reset' -n 'not contains -- -- (commandline -opc)' -a '(__fish_yadm_files all-staged modified)'
100100+complete -f -c yadm -n '__fish_git_using_command reset' -n 'contains -- -- (commandline -opc)' -a '(__fish_yadm_files all-staged deleted modified)'
101101+complete -f -c yadm -n '__fish_git_using_command restore' -n 'not __fish_git_contains_opt -s S staged' -a '(__fish_yadm_files modified deleted modified-staged-deleted unmerged)'
102102+complete -f -c yadm -n '__fish_git_using_command restore' -n '__fish_git_contains_opt -s S staged' -a '(__fish_yadm_files added modified-staged deleted-staged renamed copied)'
103103+complete -f -c yadm -n '__fish_git_using_command rm' -n '__fish_git_contains_opt cached' -a '(__fish_yadm_files all-staged)'
104104+complete -f -c yadm -n '__fish_git_using_command rm' -n 'not __fish_git_contains_opt cached' -a '(__fish_yadm_files all-staged)'
105105+complete -f -c yadm -n '__fish_git_stash_using_command push' -a '(__fish_yadm_files modified deleted modified-staged-deleted)'
+1-1
.config/fish/conf.d/.gitignore
···11# Ignore yadm alt on non-applicable systems
22-50-cask-appdir.fish
22+55-cask-appdir.fish
+3-2
.config/fish/conf.d/50-config.fish
···11-if test -f ~/.config/yadm/env
22- source ~/.config/yadm/env
11+if test -f ~/.local/state/yadm/env
22+ source ~/.local/state/yadm/env
33end
4455set -gx GOPATH ~/go
···7979# Set fish_user_paths here instead of fish_variables to expand $HOME per-machine
8080set -Ux fish_user_paths \
8181 $DEVKITARM/bin \
8282+ $DEVKITPRO/tools/bin \
8283 ~/.cargo/bin \
8384 ~/.local/bin \
8485 $GOPATH/bin \
···44 login = ianchamberlain
55 # NOTE this is the key *fingerprint* not its ID
66 signingkey = AF8ED27FD663CC3D321F9F23AE5484D09405AA60
77-[gpg]
88- program = pinentry-mac
···11+# Use builtin GTK pinentry
22+pinentry-program /usr/bin/pinentry-qt
33+# Set TTL to 5 days for GPG passphrase prompt
44+default-cache-ttl 432000
55+max-cache-ttl 432000
+10-3
.config/yadm/hooks/pre_commit
···11#!/usr/bin/env bash
2233-set -o errexit
43set -o nounset
5465trap 'exit -2' INT
7687# Start from the base yadm directory
99-cd "$(dirname "${BASH_SOURCE[0]}")"
1010-cd ..
88+cd "$(dirname "${BASH_SOURCE[0]}")" || exit_with_error "Failed to find yadm directory!"
99+cd .. || exit_with_error "Failed to find yadm directory!"
11101211if [[ "$YADM_HOOK_FULL_COMMAND" =~ (^| )(--no-verify|-n)($| ) ]]; then
1312 # Same as `git commit --no-verify`
···2120if is_merging; then
2221 exit 0
2322fi
2323+2424+WARNINGS=0
24252526# Sort of hacky, but handle `yadm commit -a` to check all modified files
2627cached_arg=""
···4647 # Update vscode extension list to be current with installed extensions
4748 list_vscode_exts >"$VSCODE_EXTENSIONS"
4849 warn "$VSCODE_EXTENSIONS was out-of-date. It has been updated automatically."
5050+ WARNINGS=$((WARNINGS + 1))
4951 fi
5052fi
5153···5557 export HOMEBREW_NO_AUTO_UPDATE=1
5658 if ! brew bundle check --global --no-upgrade --verbose ; then
5759 warn "$HOME/.Brewfile is out of date or incorrect"
6060+ WARNINGS=$((WARNINGS + 1))
5861 fi
5962fi
6063···7679 if [[ $failed_files -ne 0 ]] ; then
7780 exit_with_error "$failed_files files failed fish lint/format checks!"
7881 fi
8282+fi
8383+8484+if [ $WARNINGS -gt 0 ]; then
8585+ read -r -p "Some pre-commit checks had warnings. Press enter to continue or Ctrl-C to cancel."
7986fi
80878188# TODO: convert other scripts to fish instead of bash (except bootstrap)
+4-1
.config/yadm/utils.sh
···2323}
24242525function list_vscode_exts() {
2626- code --list-extensions --show-versions
2626+ # Linux `code` outputs with CRLF for some reason
2727+ code --list-extensions --show-versions | sed 's/\r$//g'
2728}
28292930function check_vscode_exts() {
3131+ command -v code || return 0
3232+3033 diff "$VSCODE_EXTENSIONS" \
3134 <(list_vscode_exts) \
3235 --unchanged-line-format="" \