···33# ==============================================================================
4455tap "homebrew/bundle"
66+tap "homebrew/cask-drivers"
67tap "homebrew/cask-fonts"
88+tap "homebrew/cask-versions"
79tap "homebrew/cask"
810tap "homebrew/core"
99-tap "homebrew/cask-drivers"
1010-tap "homebrew/cask-versions"
1111tap "homebrew/services"
1212tap "homebrew/test-bot"
1313···1616# ==============================================================================
17171818tap "ian-h-chamberlain/dotfiles"
1919-tap "jason0x43/neovim-nightly"
2020-tap "nektos/tap"
2121-tap "srkomodo/tap"
1919+tap "shihanng/gig"
22202321# ==============================================================================
2422# Regular packages
2523# ==============================================================================
26242525+# Run your GitHub Actions locally 🚀
2626+brew "act"
2727+2728# Automatic configure script builder
2829brew "autoconf"
2930···3334# Bourne-Again SHell, a UNIX command interpreter
3435brew "bash"
35363636-# Programmable completion for Bash 4.1+
3737+# Programmable completion for Bash 4.2+
3738brew "bash-completion@2"
38393940# Informative, fancy bash prompt for Git users
···4546# User-friendly launcher for Bazel
4647brew "bazelisk"
47484848-# Generate compilation database for clang tooling
4949-brew "bear"
5050-5151-# Bash and Zsh completion for Cargo
5252-brew "cargo-completion"
5353-5449# Formatting tools for C, C++, Obj-C, Java, JavaScript, TypeScript
5550brew "clang-format"
5651···6964# Get a file from an HTTP, HTTPS or FTP server
7065brew "curl"
71666767+# 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+7373+# Simple, fast and user-friendly alternative to find
7474+brew "fd"
7575+7276# User-friendly command-line shell for UNIX-like operating systems
7377brew "fish"
7478···83878488# Git extension for versioning large files
8589brew "git-lfs"
8686-8787-# Core application library for C
8888-brew "glib"
89909091# Open source programming language to build simple/reliable/efficient software
9192brew "go"
92939494+# Fast linters runner for Go
9595+brew "golangci-lint"
9696+9397# GNU Pretty Good Privacy (PGP) package
9498brew "gnupg"
959996100# Graph visualization software from AT&T and Bell Labs
97101brew "graphviz"
9898-9999-# Hex editor focussing on speed
100100-cask "hex-fiend"
101102102103# Improved top (interactive process viewer)
103104brew "htop"
···108109# Lightweight and flexible command-line JSON processor
109110brew "jq"
110111111111-# Package manager for the Lua programming language
112112-brew "luarocks"
113113-114112# Curses-based tool for viewing and analyzing log files
115113brew "lnav"
116116-117117-# Mac App Store command-line interface
118118-brew "mas"
119114120115# Simple tool to make locally trusted development certificates
121116brew "mkcert"
122117123123-# Run GitHub Actions locally
124124-brew "nektos/tap/act"
125125-126118# Ambitious Vim-fork focused on extensibility and agility
127127-brew "neovim-nightly"
119119+brew "neovim"
128120129121# OpenBSD freely-licensed SSH connectivity tools
130122brew "openssh"
131123132132-# Cryptography and SSL/TLS Toolkit
133133-brew "openssl@1.1"
134134-135135-# Perl compatible regular expressions library
136136-# NOTE: this is a dependency of lnav and may need to be upgraded to HEAD at some point
137137-brew "pcre"
138138-139139-# Pinentry for GPG on Mac
140140-brew "pinentry-mac"
141141-142142-# Tool for managing OCI containers and pods
143143-brew "podman"
144144-145124# Python version management
146125brew "pyenv"
147126···154133# Search tool like grep and The Silver Searcher
155134brew "ripgrep"
156135157157-# The Rust toolchain installer
136136+# Rust toolchain installer
158137brew "rustup-init"
159138160139# Static analysis and lint tool, for (ba)sh scripts
161140brew "shellcheck"
162141163163-# An automatic updater for ShadowFox
164164-brew "srkomodo/tap/shadowfox-updater"
142142+# gitignore file generator
143143+brew "shihanng/gig/gig"
165144166145# User interface to the TELNET protocol
167146brew "telnet"
168147169169-# Programatically correct mistyped console commands
148148+# Programmatically correct mistyped console commands
170149brew "thefuck"
171150172151# Terminal multiplexer
···178157# Vi 'workalike' with many additional features
179158brew "vim"
180159160160+# Executes a program periodically, showing output fullscreen
161161+brew "watch"
162162+181163# Internet file retriever
182164brew "wget"
183165184166# Yet Another Dotfiles Manager
185167brew "yadm"
186168187187-# General-purpose lossless data-compression library
188188-brew "zlib"
169169+# ==============================================================================
170170+# macOS-specific packages (including casks and Mac App Store apps)
171171+# ==============================================================================
172172+if `uname -s` == "Darwin"
173173+ # Mac App Store command-line interface
174174+ brew "mas"
189175176176+ # Container runtimes on MacOS (and Linux) with minimal setup
177177+ brew "colima"
190178191191-# ==============================================================================
192192-# Packages that are work-specific or personal-only
193193-# ==============================================================================
179179+ # Pinentry for GPG on Mac
180180+ brew "pinentry-mac"
181181+182182+ # ==============================================================================
183183+ # Packages that are work-specific or personal-only
184184+ # ==============================================================================
194185195195-case `yadm config local.class`.strip
186186+ case `yadm config local.class`.strip
196187197197-when "personal"
188188+ when "personal"
198189 # Nothing yet...
199190200200-when "work"
191191+ when "work"
201192 # Collection of portable C++ source libraries
202193 brew "ian-h-chamberlain/dotfiles/boost@1.69", args: ["--cc=llvm_clang"]
203194···254245255246 # Rich and complete approach to parallelism in C++
256247 brew "tbb"
257257-end
248248+ end
258249250250+ # ==============================================================================
251251+ # Casks
252252+ # ==============================================================================
259253260260-# ==============================================================================
261261-# Casks
262262-# ==============================================================================
254254+ case `yadm config local.class`.strip
263255264264-case `yadm config local.class`.strip
265265-266266-when "personal"
256256+ when "personal"
267257 # Install in home dir instead of /Applications
268258 cask_args appdir: "~/Applications"
269259···282272283273 # Video game digital distribution service
284274 cask "steam"
285285-286286-when "work"
275275+ when "work"
287276 # OpenVPN client
288277 cask "pritunl"
289278···292281293282 # Team communication and collaboration software
294283 cask "slite"
295295-end
284284+ end
296285297297-# Application uninstaller
298298-cask "appcleaner"
286286+ # Application uninstaller
287287+ cask "appcleaner"
299288300300-# Compact TeX distribution as alternative to the full TeX Live / MacTeX
301301-cask "basictex"
289289+ # Compact TeX distribution as alternative to the full TeX Live / MacTeX
290290+ cask "basictex"
302291303303-# Fixes issues with macOS audio becoming unbalanced
304304-cask "balance-lock"
292292+ # Prevents audio balance from drifting left or right
293293+ cask "balance-lock"
305294306306-# Tool to customize input devices and automate computer systems
307307-cask "bettertouchtool"
295295+ # Tool to customize input devices and automate computer systems
296296+ cask "bettertouchtool"
308297309309-# Web browser
310310-cask "google-chrome"
298298+ # Text editor
299299+ cask "emacs"
311300312312-# App to build and share containerized applications and microservices
313313-cask "docker"
301301+ # Web browser
302302+ cask "firefox"
314303315315-# Text editor
316316-cask "emacs"
304304+ # Screen color temperature controller
305305+ cask "flux"
317306318318-# Web browser
319319-cask "firefox"
307307+ # GIT client
308308+ cask "fork"
320309321321-# Screen color temperature controller
322322-cask "flux"
310310+ # Free and open-source image editor
311311+ cask "gimp"
323312324324-# GIT client
325325-cask "fork"
313313+ # Hex editor focussing on speed
314314+ cask "hex-fiend"
326315327327-# Free and open-source image editor
328328-cask "gimp"
316316+ # Preferred font for fixed-width text e.g. terminal + editors
317317+ cask "ian-h-chamberlain/dotfiles/font-input"
329318330330-# Preferred font for fixed-width text e.g. terminal + editors
331331-cask "ian-h-chamberlain/dotfiles/font-input"
319319+ # Vector graphics editor
320320+ cask "inkscape"
332321333333-# Vector graphics editor
334334-cask "inkscape"
335335-336336-# Cross-platform HTTP and GraphQL Client
337337-cask "insomnia"
322322+ # HTTP and GraphQL Client
323323+ cask "insomnia"
338324339339-# Terminal emulator as alternative to Apple's Terminal app
340340-cask "iterm2"
325325+ # Terminal emulator as alternative to Apple's Terminal app
326326+ cask "iterm2"
341327342342-# Password manager app
343343-cask "keepassxc"
328328+ # Password manager app
329329+ cask "keepassxc"
344330345345-# Support for Logitech G gear
346346-cask "logitech-g-hub"
331331+ # Support for Logitech G gear
332332+ cask "logitech-g-hub"
347333348348-# Cross-platform instant messaging application focusing on security
349349-cask "signal"
334334+ # Full TeX Live distribution with GUI applications
335335+ cask "mactex"
350336351351-# Music streaming service
352352-cask "spotify"
337337+ # Cross-platform instant messaging application focusing on security
338338+ cask "signal"
353339354354-# Real time file synchronization software
355355-cask "syncthing"
340340+ # Music streaming service
341341+ cask "spotify"
356342357357-# Finder extension for opening a terminal from the current directory
358358-cask "termhere"
343343+ # Real time file synchronization software
344344+ cask "syncthing"
359345360360-# GUI frontend editor for LaTeX
361361-cask "texworks"
346346+ # Finder extension for opening a terminal from the current directory
347347+ cask "termhere"
362348363363-# Open-source code editor
364364-cask "visual-studio-code"
349349+ # Virtualizer for x86 hardware
350350+ cask "virtualbox"
365351366366-# Multimedia player
367367-cask "vlc"
352352+ # GUI frontend editor for LaTeX
353353+ cask "texworks"
368354369369-# Network protocol analyzer
370370-cask "wireshark"
355355+ # Open-source code editor
356356+ cask "visual-studio-code"
371357372372-# Open-source version of the X.Org X Window System
373373-cask "xquartz"
358358+ # Multimedia player
359359+ cask "vlc"
374360361361+ # Network protocol analyzer
362362+ cask "wireshark"
375363376376-# ==============================================================================
377377-# Mac App Store apps
378378-# ==============================================================================
364364+ # Open-source version of the X.Org X Window System
365365+ cask "xquartz"
379366380380-# TODO add some more:
381381-# - AppCleaner
382382-# - DTerm? (custom cask?)
383383-# - Amphetamine Enhancer (maybe also custom cask?)
367367+ # ==============================================================================
368368+ # Mac App Store apps
369369+ # ==============================================================================
384370385385-# Powerful keep-awake utility
386386-mas "Amphetamine", id: 937984704
371371+ # Powerful keep-awake utility
372372+ mas "Amphetamine", id: 937984704
387373388388-# Stand up and stretch regularly
389389-mas "StandUp", id: 1439378680
374374+ # Stand up and stretch regularly
375375+ mas "StandUp", id: 1439378680
390376391391-# Developer Tools
392392-mas "Xcode", id: 497799835
377377+ # Developer Tools
378378+ mas "Xcode", id: 497799835
379379+end
···11function fish_check_saved_functions --description 'check syntax of saved files'
22- set -l exclude_functions \
33- fish_check_saved_functions \
44- fish_prompt \
55- fisher
22+ echo "Checking syntax and style of fish files..."
33+44+ set -l exclude_functions '(fish_check_saved_functions|fish_prompt|fisher)'
6576 for fish_function in ~/.config/fish/functions/*.fish
87 set -l func_name (basename $fish_function .fish)
98 set -l rel_func_path '~/.config/fish/functions/'$func_name'.fish'
1091111- if contains $func_name $exclude_functions
1010+ if string match --quiet --regex $exclude_functions $func_name
1211 continue
1312 end
1413···1817 end
19182019 set -l retcode 0
2020+ set -l check_files
21212222 for fish_file in ~/.config/fish/**/*.fish
2323- if contains $fish_file $exclude_functions
2323+ if string match --quiet --regex $exclude_functions $fish_file
2424 continue
2525 end
2626+2727+ set -a check_files $fish_file
26282729 if ! fish --no-execute $fish_file
2830 set -l retcode (math 1 + $retcode)
2931 end
3032 end
31333232- fish_indent --check ~/.config/fish/**/*.fish
3434+ fish_indent --check $check_files
3335 set -l failed_files $status
3436 if test $failed_files -ne 0
3537 set retcode (math $retcode + $failed_files)
3636- fish_indent --write ~/.config/fish/**/*.fish
3838+ fish_indent --write $check_files
3739 end
38403941 return $retcode
+8
.config/fish/functions/info.fish
···11+function info
22+ if test -f (command info --where $argv[1])
33+ # Info file really exists, open it with vim :Info
44+ vim -R -M -c "Info $argv[1] $argv[2]" +only -c 'buffer 1 | bdelete'
55+ else
66+ man $argv
77+ end
88+end
+3
.config/fish/functions/york.fish
···11+function york
22+ yadm enter open -n -a Fork ~
33+end
···44set -o nounset
55set -o pipefail
6677+trap 'exit -2' INT
88+79# shellcheck source=utils.sh
810source ~/.config/yadm/utils.sh
911···11131214# A "full" bootstrap means to run everything. Otherwise just update vscode extension
1315# (and maybe fish completions)
1414-YADM_BOOTSTRAP_FULL=0
1616+: "${YADM_BOOTSTRAP_FULL:=0}"
15171618function setup_macos() {
1717- # Install homebrew and use it to install basic packages/apps
1818- if ! command -v brew &>/dev/null && \
1919- confirm "'brew' command not found. Install it? "
2020- then
2121- eval "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
2222- echo
2323- fi
2424-2519 # Specify iTerm2 preferences directory
2620 #shellcheck disable=SC2088
2721 defaults write com.googlecode.iterm2.plist PrefsCustomFolder -string '~/.config/iterm2/'
2822 defaults write com.googlecode.iterm2.plist LoadPrefsFromCustomFolder -bool true
29233030- # TODO: should there be a step to `brew bundle cleanup` here?
3131- if ! brew bundle --global check && \
3232- confirm "Install packages from Brewfile? "
3333- then
3434- brew bundle --global install
3535- echo
3636- fi
3737-3838- echo "macOS setup is complete!"
2424+ echo "macOS-specific setup is complete!"
3925}
40264127function setup_linux() {
4228 # TBD. Might need separate function each for NixOS / Termux
4343- # To consider: brew on linux? Gets a bunch of stuff for free I guess...
4444- :
2929+ echo "Linux-specific setup is complete!"
4530}
46314732function main() {
···6348 setup_linux
6449 fi
65505151+ # Install homebrew and use it to install basic packages/apps
5252+ if ! command -v brew &>/dev/null && \
5353+ confirm "'brew' command not found. Install it? "
5454+ then
5555+ eval "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
5656+ echo
5757+ fi
5858+5959+ if ! brew bundle --global check && \
6060+ confirm "Install packages from Brewfile? "
6161+ then
6262+ brew bundle --global install
6363+ echo
6464+ fi
6565+6666 if confirm "Update fish auto-generated completions?"; then
6767 fish -c 'fish_update_completions'
6868+ fi
6969+7070+ if confirm "Install fisher plugins?"; then
7171+ fish -c 'set -gx fisher_path ~/.config/fish/fisher_install && fisher update'
6872 fi
69737074 # Load GPG configuration for timeouts
+25-5
.config/yadm/hooks/pre_commit
···33set -o errexit
44set -o nounset
5566+trap 'exit -2' INT
77+68# Start from the base yadm directory
79cd "$(dirname "${BASH_SOURCE[0]}")"
810cd ..
···2022 exit 0
2123fi
22242525+# Sort of hacky, but handle `yadm commit -a` to check all modified files
2626+cached_arg=""
2727+if ! [[ "$YADM_HOOK_FULL_COMMAND" =~ ( )-a($| ) ]]; then
2828+ cached_arg="--cached"
2929+fi
3030+CHANGED_FILES=$(yadm diff $cached_arg --name-only --diff-filter=ACM)
3131+2332if command -v shellcheck >/dev/null; then
2433 SHELLCHECK_SOURCES=(
2534 bootstrap
···3241 fi
3342fi
34433535-if git rev-parse -q --verify MERGE_HEAD command -v code >/dev/null; then
4444+if ! git rev-parse -q --verify MERGE_HEAD && command -v code >/dev/null; then
3645 if ! check_vscode_exts &>/dev/null; then
3746 # Update vscode extension list to be current with installed extensions
3847 list_vscode_exts >"$VSCODE_EXTENSIONS"
···4049 fi
4150fi
42515252+if grep --quiet .Brewfile <(echo "$CHANGED_FILES"); then
5353+ echo "Checking that all packages in Brewfile are installed..."
5454+ # A little faster if we don't have to wait for auto-update
5555+ export HOMEBREW_NO_AUTO_UPDATE=1
5656+ if ! brew bundle check --global --no-upgrade --verbose ; then
5757+ warn "$HOME/.Brewfile is out of date or incorrect"
5858+ fi
5959+fi
6060+4361# Check for unstaged changes (typically new functions/completions or config files)
4462CHECK_UNTRACKED_DIRS=(
4563 ~/.config/fish/
···5270 exit_with_error "Untracked files found in repository:" "$untracked_files"
5371fi
54725555-fish -c fish_check_saved_functions
5656-failed_files=$?
5757-if [[ $failed_files -ne 0 ]] ; then
5858- exit_with_error "$failed_files files failed fish lint/format checks!"
7373+if grep -q fish <(echo "$CHANGED_FILES"); then
7474+ fish -c fish_check_saved_functions
7575+ failed_files=$?
7676+ if [[ $failed_files -ne 0 ]] ; then
7777+ exit_with_error "$failed_files files failed fish lint/format checks!"
7878+ fi
5979fi
60806181# TODO: convert other scripts to fish instead of bash (except bootstrap)
+4-1
.gdbinit
···11add-auto-load-safe-path ~
22-set startup-with-shell off
22+# set startup-with-shell off
3344# source ~/.config/gdb/init.py
55set index-cache on
6677set substitute-path /home/fincs/git/pacman-packages/libctru/src/libctru-2.1.1/ /Users/ianchamberlain/Documents/Development/3ds/libctru/
88+99+set history save
1010+set history filename ~/.gdb_history
+2
.gitconfig
···6868 defaultBranch = main
6969[fetch]
7070 recurseSubmodules = no
7171+[protocol "file"]
7272+ allow = always
···4747noremap gU <Nop>
4848noremap gUU <Nop>
49495050+" Use newer info than the macOS builtin
5151+let g:infoprg = '/usr/local/opt/texinfo/bin/info'
5252+5353+" Keybinds for info files
5454+augroup InfoFile
5555+ autocmd!
5656+ autocmd FileType info nmap <buffer> gu <Plug>(InfoUp)
5757+ autocmd FileType info nmap <buffer> gn <Plug>(InfoNext)
5858+ autocmd FileType info nmap <buffer> gp <Plug>(InfoPrev)
5959+6060+ autocmd FileType info nmap <buffer> gm <Plug>(InfoMenu)
6161+ autocmd FileType info nmap <buffer> gf <Plug>(InfoFollow)
6262+ autocmd FileType info nmap <buffer> go <Plug>(InfoGoto)
6363+6464+ autocmd FileType info let g:airline#extensions#tabline#tabs_label = "hoo boy"
6565+augroup END
50665167" Augroups, must be before `syntax on`
5268augroup CustomTodo