From bf32346c1defbba9525a76e5ec02c820b985738c Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 09:10:42 +0000 Subject: [PATCH 01/76] zsh: load fzf key bindings with fzf --zsh The vendored key-bindings.zsh was the `fzf --zsh` output of fzf 0.73 with the file widget moved from Ctrl-T to Ctrl-F, so it drifted from the installed fzf on every upgrade. Source `fzf --zsh` instead and rebind afterwards: the file widget goes on Ctrl-F and Ctrl-T gets its default zsh binding back in each keymap. This also loads fzf's ** completion, which the existing _fzf_compgen_path and _fzf_compgen_dir functions are for. fzf has to be on PATH when .zshrc sources it, so the block moves below the PATH exports. The install script no longer appends `fzf --zsh` to a _fzf "completion" file on every run, and removes the old file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 1 - dot_config/fzf/key-bindings.zsh | 187 -------------------------------- dot_zshrc.tmpl | 46 ++++---- run_install-unix.sh.tmpl | 2 +- 4 files changed, 28 insertions(+), 208 deletions(-) delete mode 100644 dot_config/fzf/key-bindings.zsh diff --git a/.chezmoiignore b/.chezmoiignore index 5ca2e75..9b3a4fc 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -15,7 +15,6 @@ install-windows.ps1 {{ if eq .chezmoi.os "windows" -}} .config/atuin .config/bpytop -.config/fzf .config/tmuxinator .config/zsh .tmux.conf diff --git a/dot_config/fzf/key-bindings.zsh b/dot_config/fzf/key-bindings.zsh deleted file mode 100644 index 10cd2a3..0000000 --- a/dot_config/fzf/key-bindings.zsh +++ /dev/null @@ -1,187 +0,0 @@ -# ____ ____ -# / __/___ / __/ -# / /_/_ / / /_ -# / __/ / /_/ __/ -# /_/ /___/_/ key-bindings.zsh -# -# - $FZF_CTRL_T_COMMAND -# - $FZF_CTRL_T_OPTS -# - $FZF_CTRL_R_COMMAND -# - $FZF_CTRL_R_OPTS -# - $FZF_ALT_C_COMMAND -# - $FZF_ALT_C_OPTS - - -# Key bindings -# ------------ - -# The code at the top and the bottom of this file is the same as in completion.zsh. -# Refer to that file for explanation. -if 'zmodload' 'zsh/parameter' 2>'/dev/null' && (( ${+options} )); then - __fzf_key_bindings_options="options=(${(j: :)${(kv)options[@]}})" -else - () { - __fzf_key_bindings_options="setopt" - 'local' '__fzf_opt' - for __fzf_opt in "${(@)${(@f)$(set -o)}%% *}"; do - if [[ -o "$__fzf_opt" ]]; then - __fzf_key_bindings_options+=" -o $__fzf_opt" - else - __fzf_key_bindings_options+=" +o $__fzf_opt" - fi - done - } -fi - -'builtin' 'emulate' 'zsh' && 'builtin' 'setopt' 'no_aliases' - -{ -if [[ -o interactive ]]; then - -#----BEGIN INCLUDE common.sh -# NOTE: Do not directly edit this section, which is copied from "common.sh". -# To modify it, one can edit "common.sh" and run "./update.sh" to apply -# the changes. See code comments in "common.sh" for the implementation details. - -__fzf_defaults() { - builtin printf '%s\n' "--height ${FZF_TMUX_HEIGHT:-40%} --min-height 20+ --bind=ctrl-z:ignore $1" - command cat "${FZF_DEFAULT_OPTS_FILE-}" 2> /dev/null - builtin printf '%s\n' "${FZF_DEFAULT_OPTS-} $2" -} - -__fzf_exec_awk() { - if [[ -z ${__fzf_awk-} ]]; then - __fzf_awk=awk - if [[ $OSTYPE == solaris* && -x /usr/xpg4/bin/awk ]]; then - __fzf_awk=/usr/xpg4/bin/awk - elif command -v mawk > /dev/null 2>&1; then - local n x y z d - IFS=' .' read -r n x y z d <<< $(command mawk -W version 2> /dev/null) - [[ $n == mawk ]] && - (((x * 1000 + y) * 1000 + z >= 1003004)) 2> /dev/null && - ((d >= 20230302)) 2> /dev/null && - __fzf_awk=mawk - fi - fi - LC_ALL=C exec "$__fzf_awk" "$@" -} -#----END INCLUDE - -# CTRL-F - Paste the selected file path(s) into the command line -__fzf_select() { - setopt localoptions pipefail no_aliases 2> /dev/null - local item - FZF_DEFAULT_COMMAND=${FZF_CTRL_T_COMMAND:-} \ - FZF_DEFAULT_OPTS=$(__fzf_defaults "--reverse --walker=file,dir,follow,hidden --scheme=path" "${FZF_CTRL_T_OPTS-} -m") \ - FZF_DEFAULT_OPTS_FILE='' $(__fzfcmd) "$@" < /dev/tty | while read -r item; do - echo -n -E "${(q)item} " - done - local ret=$? - echo - return $ret -} - -__fzfcmd() { - [ -n "${TMUX_PANE-}" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "${FZF_TMUX_OPTS-}" ]; } && - echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf" -} - -fzf-file-widget() { - LBUFFER="${LBUFFER}$(__fzf_select)" - local ret=$? - zle reset-prompt - return $ret -} -if [[ "${FZF_CTRL_T_COMMAND-x}" != "" ]]; then - zle -N fzf-file-widget - bindkey -M emacs '^F' fzf-file-widget - bindkey -M vicmd '^F' fzf-file-widget - bindkey -M viins '^F' fzf-file-widget -fi - -# ALT-C - cd into the selected directory -fzf-cd-widget() { - setopt localoptions pipefail no_aliases 2> /dev/null - local dir="$( - FZF_DEFAULT_COMMAND=${FZF_ALT_C_COMMAND:-} \ - FZF_DEFAULT_OPTS=$(__fzf_defaults "--reverse --walker=dir,follow,hidden --scheme=path" "${FZF_ALT_C_OPTS-} +m") \ - FZF_DEFAULT_OPTS_FILE='' $(__fzfcmd) < /dev/tty)" - if [[ -z "$dir" ]]; then - zle redisplay - return 0 - fi - zle push-line # Clear buffer. Auto-restored on next prompt. - BUFFER="builtin cd -- ${(q)dir:a}" - zle accept-line - local ret=$? - unset dir # ensure this doesn't end up appearing in prompt expansion - zle reset-prompt - return $ret -} -if [[ "${FZF_ALT_C_COMMAND-x}" != "" ]]; then - zle -N fzf-cd-widget - bindkey -M emacs '\ec' fzf-cd-widget - bindkey -M vicmd '\ec' fzf-cd-widget - bindkey -M viins '\ec' fzf-cd-widget -fi - -# CTRL-R - Paste the selected command from history into the command line -fzf-history-widget() { - local selected extracted_with_perl=0 - setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases no_glob no_sh_glob no_ksharrays extendedglob 2> /dev/null - if zmodload -F zsh/parameter p:{commands,history} 2>/dev/null && (( ${+commands[perl]} )); then - selected="$(printf '%s\t%s\000' "${(kv)history[@]}" | - perl -0 -ne 'if (!$seen{(/^\s*[0-9]+\**\t(.*)/s, $1)}++) { s/\n/\n\t/gm; print; }' | - FZF_DEFAULT_OPTS=$(__fzf_defaults "" "-n2..,.. --scheme=history --bind=ctrl-r:toggle-sort,alt-r:toggle-raw --wrap-sign '"$'\t'"↳ ' --highlight-line --multi ${FZF_CTRL_R_OPTS-} --query=${(qqq)LBUFFER} --read0") \ - FZF_DEFAULT_OPTS_FILE='' $(__fzfcmd))" - extracted_with_perl=1 - else - selected="$(fc -rl 1 | __fzf_exec_awk '{ cmd=$0; sub(/^[ \t]*[0-9]+\**[ \t]+/, "", cmd); if (!seen[cmd]++) print $0 }' | - FZF_DEFAULT_OPTS=$(__fzf_defaults "" "-n2..,.. --scheme=history --bind=ctrl-r:toggle-sort,alt-r:toggle-raw --wrap-sign '"$'\t'"↳ ' --highlight-line --multi ${FZF_CTRL_R_OPTS-} --query=${(qqq)LBUFFER}") \ - FZF_DEFAULT_OPTS_FILE='' $(__fzfcmd))" - fi - local ret=$? - local -a cmds - local -a mbegin mend match - if [ -n "$selected" ]; then - if ((( extracted_with_perl )) && [[ $selected == <->$'\t'* ]]) || - ((( ! extracted_with_perl )) && [[ $selected == [[:blank:]]#<->( |\* )* ]]); then - for line in ${(ps:\n:)selected}; do - if (( extracted_with_perl )); then - if [[ $line == (#b)(<->)(#B)$'\t'* ]]; then - (( ${+history[${match[1]}]} )) && cmds+=("${history[${match[1]}]}") - fi - elif [[ $line == [[:blank:]]#(#b)(<->)(#B)( |\* )* ]]; then - zle .push-line - zle vi-fetch-history -n ${match[1]} - (( ${#BUFFER} )) && cmds+=("${BUFFER}") - BUFFER="" - zle .get-line - fi - done - if (( ${#cmds[@]} )); then - BUFFER="${(pj:\n:)${(@)cmds%%$'\n'#}}" - CURSOR=${#BUFFER} - fi - else - LBUFFER="$selected" - fi - fi - zle reset-prompt - return $ret -} -if [[ ${FZF_CTRL_R_COMMAND-x} != "" ]]; then - if [[ -n ${FZF_CTRL_R_COMMAND-} ]]; then - echo "warning: FZF_CTRL_R_COMMAND is set to a custom command, but custom commands are not yet supported for CTRL-R" >&2 - fi - zle -N fzf-history-widget - bindkey -M emacs '^R' fzf-history-widget - bindkey -M vicmd '^R' fzf-history-widget - bindkey -M viins '^R' fzf-history-widget -fi -fi - -} always { - eval $__fzf_key_bindings_options - 'unset' '__fzf_key_bindings_options' -} diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 7511cfb..0001aa1 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -59,9 +59,25 @@ bindkey "^[OA" up-line-or-beginning-search bindkey "^[[B" down-line-or-beginning-search bindkey "^[OB" down-line-or-beginning-search -# fzf configuration -source $HOME/.config/fzf/key-bindings.zsh +# Aliases +source $HOME/.config/zsh/aliases.zsh + +# Environment Variables +export PATH=/usr/local/go/bin:$PATH +export PATH=$HOME/.cargo/bin:$PATH +export PATH=$HOME/.local/bin:$PATH +{{- if and (eq .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} +export PATH="/mnt/c/Windows/System32:$PATH" +{{- end }} +export VISUAL=nvim +export EDITOR="$VISUAL" +export DOCKER_BUILDKIT=1 +# https://github.com/lukechilds/zsh-nvm +export NVM_COMPLETION=true +export NVM_LAZY_LOAD=true +export NVM_LAZY_LOAD_EXTRA_COMMANDS=('nvim' 'lazygit' 'copilot' 'make') +# fzf configuration # Use fd (https://github.com/sharkdp/fd) instead of the default find command for listing path candidates. # - The first argument to the function ($1) is the base path to start traversal # - See the source code (completion.{bash,zsh}) for the details. @@ -80,23 +96,15 @@ export FZF_DEFAULT_COMMAND="fd --hidden --follow --exclude '.git'" export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" export FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND --type d" -# Aliases -source $HOME/.config/zsh/aliases.zsh - -# Environment Variables -export PATH=/usr/local/go/bin:$PATH -export PATH=$HOME/.cargo/bin:$PATH -export PATH=$HOME/.local/bin:$PATH -{{- if and (eq .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} -export PATH="/mnt/c/Windows/System32:$PATH" -{{- end }} -export VISUAL=nvim -export EDITOR="$VISUAL" -export DOCKER_BUILDKIT=1 -# https://github.com/lukechilds/zsh-nvm -export NVM_COMPLETION=true -export NVM_LAZY_LOAD=true -export NVM_LAZY_LOAD_EXTRA_COMMANDS=('nvim' 'lazygit' 'copilot' 'make') +# Key bindings and ** completion from the installed fzf, so they match its +# version. Move the file widget from Ctrl-T to Ctrl-F and restore Ctrl-T. +source <(fzf --zsh) +bindkey -M emacs '^F' fzf-file-widget +bindkey -M vicmd '^F' fzf-file-widget +bindkey -M viins '^F' fzf-file-widget +bindkey -M emacs '^T' transpose-chars +bindkey -M vicmd '^T' undefined-key +bindkey -M viins '^T' self-insert # Other Zsh scripts source $HOME/.local/share/zsh-nvm/zsh-nvm.plugin.zsh diff --git a/run_install-unix.sh.tmpl b/run_install-unix.sh.tmpl index 0cb2132..f71c676 100644 --- a/run_install-unix.sh.tmpl +++ b/run_install-unix.sh.tmpl @@ -68,7 +68,7 @@ $HOME/.local/bin/chezmoi completion zsh >> _chezmoi $HOME/.local/bin/delta --generate-completion zsh >> _delta # needs to be sourced manually curl -o _dust https://raw.githubusercontent.com/bootandy/dust/master/completions/_dust curl -o _fd https://raw.githubusercontent.com/sharkdp/fd/master/contrib/completion/_fd -$HOME/.local/bin/fzf --zsh >> _fzf # doesn't work +rm -f _fzf # fzf --zsh output, which .zshrc now sources directly $HOME/.local/bin/grm completion zsh >> _grm # needs to be sourced manually # could not find zsh completion for lsd $HOME/.local/bin/rg --generate=complete-zsh >> _rg From d96c7de989030149592cf2b4d9611a4b0311c1ed Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 09:15:51 +0000 Subject: [PATCH 02/76] install: move system setup into a run_onchange_before script run_install-unix.sh ran on every apply and mixed user-level installs with system changes. Move the parts that need root into run_onchange_before_install-packages-unix.sh, which chezmoi runs before applying files and again only when the rendered script changes. - Install only the missing commands with apt or dnf, so sudo is only used when something is missing. The Fedora block no longer runs `dnf -y update`, and no longer renders to a syntax error: its last package line ended in a backslash, and `{{- end -}}` joined the font check onto it. - Install zsh, git and curl instead of exiting when zsh is missing. git is needed for the git-repo externals, which are applied after this script. - Ask dnf for /usr/bin/chsh, because newer Fedora releases moved chsh from util-linux-user to util-linux. - Download the font with curl -f into a temporary directory, so a failed download doesn't leave an empty font directory that skips the install. - Compare the login shell from the user database instead of $SHELL, use the zsh path the package registered, and only add it to /etc/shells when it is missing. Previously every run appended a duplicate line. - Treat a failed chsh as a warning, as before, but with set -euo pipefail for the rest of the script. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 1 + run_install-unix.sh.tmpl | 35 --------- ...hange_before_install-packages-unix.sh.tmpl | 77 +++++++++++++++++++ 3 files changed, 78 insertions(+), 35 deletions(-) create mode 100644 run_onchange_before_install-packages-unix.sh.tmpl diff --git a/.chezmoiignore b/.chezmoiignore index 9b3a4fc..0d3ece3 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -20,6 +20,7 @@ install-windows.ps1 .tmux.conf .zshrc decrypt-private-key-unix.sh +install-packages-unix.sh install-unix.sh {{- end }} diff --git a/run_install-unix.sh.tmpl b/run_install-unix.sh.tmpl index f71c676..1bd52a9 100644 --- a/run_install-unix.sh.tmpl +++ b/run_install-unix.sh.tmpl @@ -9,10 +9,8 @@ check_installed() { exit 1 fi } -check_installed curl check_installed nvim check_installed tmux -check_installed zsh pushd ~ printf "\n# Install/update Chezmoi\n" @@ -78,30 +76,6 @@ $HOME/.local/bin/uvx --generate-shell-completion zsh > _uvx curl -o _zoxide https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/contrib/completions/_zoxide popd -{{ if or (eq .chezmoi.os "darwin") (not (.chezmoi.kernel.osrelease | lower | contains "microsoft")) -}} -{{ if eq .chezmoi.os "linux" -}} -{{ if eq .chezmoi.osRelease.id "fedora" -}} -printf "\n# Install dnf utilities\n" -sudo dnf -y update && sudo dnf -y install \ - fontconfig \ - unzip \ - util-linux-user \ -{{- end -}} - -if [ ! -d ~/.local/share/fonts/FiraCode ] -then - printf "\n# Install fonts\n" - mkdir -p ~/.local/share/fonts/FiraCode - curl -L https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.zip --output FiraCode.zip - unzip FiraCode.zip -d ~/.local/share/fonts/FiraCode "Fira*Mono*.ttf" - rm FiraCode.zip - fc-cache -f -else - printf "\n# Fonts already installed\n" -fi -{{ end }} -{{- end -}} - printf "\n# Checking GitHub account status\n" $HOME/.local/bin/grm install --yes{{ if eq .chezmoi.os "linux" }} -f tar.gz{{ end }} cli/cli gh auth status @@ -110,13 +84,4 @@ then gh auth login fi -if [ $(basename $SHELL) != "zsh" ] -then - printf "\n# Make Zsh default shell\n" - command -v zsh | sudo tee -a /etc/shells - chsh -s $(which zsh) -else - printf "\n# Zsh already default shell\n" -fi - printf "\n# Script finished successfully, open a new terminal to use new configuration\n" diff --git a/run_onchange_before_install-packages-unix.sh.tmpl b/run_onchange_before_install-packages-unix.sh.tmpl new file mode 100644 index 0000000..21ecab0 --- /dev/null +++ b/run_onchange_before_install-packages-unix.sh.tmpl @@ -0,0 +1,77 @@ +#!/bin/bash +# Installs the system packages the dotfiles need, adds fonts and makes zsh the +# login shell. chezmoi runs this before applying files and again only when the +# rendered script changes. sudo is only used when something is missing. +set -euo pipefail + +as_root() { + if [ "$(id -u)" -eq 0 ]; then + "$@" + else + sudo "$@" + fi +} + +{{ if eq .chezmoi.os "linux" -}} +missing=() +need() { # need COMMAND [PACKAGE] + command -v "$1" >/dev/null 2>&1 || missing+=("${2:-$1}") +} +need curl +need git +need zsh +{{- if eq .chezmoi.osRelease.id "fedora" }} +need chsh /usr/bin/chsh # dnf resolves the path; newer Fedora moved chsh to util-linux +{{- end }} +{{- if not (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} +need fc-cache fontconfig +need unzip +{{- end }} + +if [ ${#missing[@]} -gt 0 ]; then + printf "\n# Install %s\n" "${missing[*]}" + if command -v apt-get >/dev/null 2>&1; then + as_root apt-get update + as_root apt-get install -y "${missing[@]}" + elif command -v dnf >/dev/null 2>&1; then + as_root dnf install -y "${missing[@]}" + else + echo "Install ${missing[*]}, then run chezmoi apply again" >&2 + exit 1 + fi +fi +{{- if not (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} + +font_dir="$HOME/.local/share/fonts/FiraCode" +if [ ! -d "$font_dir" ]; then + printf "\n# Install FiraCode Nerd Font\n" + tmp=$(mktemp -d) + trap 'rm -rf "$tmp"' EXIT + curl -fsSL -o "$tmp/FiraCode.zip" https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.zip + unzip -q "$tmp/FiraCode.zip" 'Fira*Mono*.ttf' -d "$tmp/FiraCode" + mkdir -p "$(dirname "$font_dir")" + mv "$tmp/FiraCode" "$font_dir" + fc-cache -f +fi +{{- end }} + +{{ end -}} +change_login_shell() { + grep -qxF "$1" /etc/shells || echo "$1" | as_root tee -a /etc/shells >/dev/null + as_root chsh -s "$1" "$(id -un)" +} + +zsh_path=$(grep -m1 "/zsh$" /etc/shells || command -v zsh) +{{- if eq .chezmoi.os "darwin" }} +login_shell=$(dscl . -read "/Users/$(id -un)" UserShell | awk '{print $2}') +{{- else }} +login_shell=$(getent passwd "$(id -un)" | cut -d: -f7) +{{- end }} +case "$login_shell" in + */zsh) ;; + *) + printf "\n# Make zsh the login shell\n" + change_login_shell "$zsh_path" || + echo "Could not make zsh the login shell, run: chsh -s $zsh_path" >&2 + ;; +esac From 74a403dff5535fbbb29518fb78b118db006411ca Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 09:23:14 +0000 Subject: [PATCH 03/76] install: replace grm with mise run_install-unix.sh reinstalled chezmoi and every grm tool on each `chezmoi apply`, calling the GitHub API without a token about 15 times per run, which is a quarter of the unauthenticated hourly limit. Install the tools with mise (https://mise.jdx.dev) instead. They're listed in ~/.config/mise/config.toml, and `mise upgrade` updates them. mise's registry knows each project's release assets, so the grm asset filters go away, and its aqua backend verifies the checksums and signatures projects publish. mise can also manage node and go, which a later commit uses. run_onchange_after_install-tools-unix.sh installs mise if needed, runs `mise install` and generates the completions. It embeds a hash of the mise config, so chezmoi runs it again only when the script or the tool list changes. Update chezmoi with `chezmoi upgrade` instead of reinstalling it. - atuin and yazi use their static musl builds, because their glibc builds need glibc 2.39. The other tools run on Ubuntu 22.04's glibc 2.35, and lsd keeps its glibc build, which shows user names instead of uids. - nvim and tmux come from mise, so they're no longer prerequisites. - Write completions with > instead of >>, so the files don't grow on every run, and remove the old _grm. Copy the completions that lsd, yazi and zoxide ship in their archives, generate fd's, and download dust's from the installed version's tag instead of master. - delta's completion didn't work because zsh's own _sccs completion also claims `delta` (the SCCS command). Map it with compdef instead of sourcing the file. bat's completion works now that the file isn't duplicated. - Only run `gh auth login` from a terminal, and warn instead of failing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 3 +- dot_config/mise/config.toml.tmpl | 22 +++++ dot_zshrc.tmpl | 9 +- run_install-unix.sh.tmpl | 87 ------------------- run_onchange_after_install-tools-unix.sh.tmpl | 51 +++++++++++ 5 files changed, 80 insertions(+), 92 deletions(-) create mode 100644 dot_config/mise/config.toml.tmpl delete mode 100644 run_install-unix.sh.tmpl create mode 100644 run_onchange_after_install-tools-unix.sh.tmpl diff --git a/.chezmoiignore b/.chezmoiignore index 0d3ece3..ecb01a5 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -15,13 +15,14 @@ install-windows.ps1 {{ if eq .chezmoi.os "windows" -}} .config/atuin .config/bpytop +.config/mise .config/tmuxinator .config/zsh .tmux.conf .zshrc decrypt-private-key-unix.sh install-packages-unix.sh -install-unix.sh +install-tools-unix.sh {{- end }} # linux without WSL files diff --git a/dot_config/mise/config.toml.tmpl b/dot_config/mise/config.toml.tmpl new file mode 100644 index 0000000..63a240d --- /dev/null +++ b/dot_config/mise/config.toml.tmpl @@ -0,0 +1,22 @@ +# Command-line tools, installed by run_onchange_after_install-tools-unix.sh. +# Update them with `mise upgrade`. See https://mise.jdx.dev/configuration.html +[tools] +# On Linux, the glibc builds of atuin and yazi need glibc 2.39 (Ubuntu 24.04), +# so use their static musl builds. mise uses glibc builds for the other tools, +# which matters for lsd: its musl build shows uid/gid instead of user names. +atuin = { version = "latest", libc = "musl" } +bat = "latest" +delta = "latest" +dust = "latest" +fd = "latest" +fzf = "latest" +gh = "latest" +lazygit = "latest" +lsd = "latest" +neovim = "latest" +ripgrep = "latest" +starship = "latest" +tmux = "latest" +uv = "latest" +yazi = { version = "latest", libc = "musl" } +zoxide = "latest" diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 0001aa1..17d76a0 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -6,6 +6,8 @@ fpath=($HOME/.config/zsh/completions $fpath) autoload -Uz compinit zmodload zsh/complist compinit +# zsh's SCCS completion also claims delta +compdef _delta delta # can't get caching to work #typeset -i USE_CACHE #(( $+commands[compaudit] && $+commands[compinit] )) && compaudit | read -ra USE_CACHE @@ -77,6 +79,9 @@ export NVM_COMPLETION=true export NVM_LAZY_LOAD=true export NVM_LAZY_LOAD_EXTRA_COMMANDS=('nvim' 'lazygit' 'copilot' 'make') +# Tools installed by mise: https://mise.jdx.dev +eval "$($HOME/.local/bin/mise activate zsh)" + # fzf configuration # Use fd (https://github.com/sharkdp/fd) instead of the default find command for listing path candidates. # - The first argument to the function ($1) is the base path to start traversal @@ -113,10 +118,6 @@ source $HOME/.local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source $HOME/.config/zsh/openvpn3.zsh {{- end }} -# Some completions are broken and need to be sourced manually -. $HOME/.config/zsh/completions/_delta -. $HOME/.config/zsh/completions/_grm - # Atuin: https://github.com/atuinsh/atuin eval "$(atuin init zsh --disable-up-arrow --disable-ai)" diff --git a/run_install-unix.sh.tmpl b/run_install-unix.sh.tmpl deleted file mode 100644 index 1bd52a9..0000000 --- a/run_install-unix.sh.tmpl +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -printf "\n# Check Prerequisites\n" -check_installed() { - if command -v $1 &>/dev/null; then - printf "# $1 is installed at\t\t$(which $1)\n" - else - printf "# $1 is NOT installed\n" - exit 1 - fi -} -check_installed nvim -check_installed tmux - -pushd ~ -printf "\n# Install/update Chezmoi\n" -sh -c "$(curl -fsLS get.chezmoi.io/lb)" - -printf "\n# Install/update GRM\n" -BINARY=grm_{{.chezmoi.os}}_{{.chezmoi.arch}}.tar.gz -curl -s https://api.github.com/repos/jsnjack/grm/releases/latest \ - | awk -F'"' '/"browser_download_url":/{print $4}' | grep $BINARY \ - | xargs curl -LOs && tar -xf $BINARY && rm $BINARY && mv grm $HOME/.local/bin/ -echo "info found version $($HOME/.local/bin/grm version) for latest/{{.chezmoi.os}}/{{.chezmoi.arch}}" -echo "info installed .local/bin/grm" -$HOME/.local/bin/grm set bin_dir $HOME/.local/bin -popd - -printf "\n# Install/update GRM dotfile dependencies\n" -# grm remembers each package's filters and selected binaries. Changing a -f -# filter or passing --asset or --binary makes it select and reinstall again. -# With --yes grm installs the first asset matching every -f filter, and gnu -# builds are listed before musl ones. Filter on the full Rust target so Linux -# gets the static musl build, which also runs on older glibc. A filter that -# matches nothing is ignored, so tools without that build still install. lsd -# uses gnu because its musl build shows uid/gid instead of user/group names. -{{- $arch := .chezmoi.arch | replace "amd64" "x86_64" | replace "arm64" "aarch64" }} -{{- $target := printf "%s-apple-darwin" $arch }} -{{- $gnuTarget := $target }} -{{- if eq .chezmoi.os "linux" }} -{{- $target = printf "%s-unknown-linux-musl" $arch }} -{{- $gnuTarget = printf "%s-unknown-linux-gnu" $arch }} -{{- end }} -$HOME/.local/bin/grm install --yes -f tar.gz -f atuin-{{ $target }} atuinsh/atuin # atuin- skips atuin-server -$HOME/.local/bin/grm install --yes -f tar.gz -f {{ $target }} sharkdp/bat -$HOME/.local/bin/grm install --yes -f tar.gz -f {{ $target }} dandavison/delta -$HOME/.local/bin/grm install --yes -f tar.gz -f {{ $target }} bootandy/dust -$HOME/.local/bin/grm install --yes -f tar.gz -f {{ $target }} sharkdp/fd -$HOME/.local/bin/grm install --yes -f tar.gz junegunn/fzf -$HOME/.local/bin/grm install --yes -f tar.gz jesseduffield/lazygit -$HOME/.local/bin/grm install --yes -f tar.gz -f {{ $gnuTarget }} lsd-rs/lsd -$HOME/.local/bin/grm install --yes -f tar.gz -f {{ $target }} BurntSushi/ripgrep -$HOME/.local/bin/grm install --yes -f tar.gz -f {{ $target }} starship/starship -$HOME/.local/bin/grm install --yes -f tar.gz -f {{ $target }} astral-sh/uv -# Remove the standalone installer's receipt so uv self update can't replace grm's uv -rm -f "${XDG_CONFIG_HOME:-$HOME/.config}/uv/uv-receipt.json" -$HOME/.local/bin/grm install --yes -f zip -f {{ $target }} sxyazi/yazi -$HOME/.local/bin/grm install --yes -f tar.gz -f {{ $target }} ajeetdsouza/zoxide - -printf "\n# Install/update completions\n" -mkdir -p $HOME/.config/zsh/completions -pushd $HOME/.config/zsh/completions -$HOME/.local/bin/atuin gen-completions --shell zsh -o . -$HOME/.local/bin/bat --completion zsh >> _bat # doesn't work -$HOME/.local/bin/chezmoi completion zsh >> _chezmoi -$HOME/.local/bin/delta --generate-completion zsh >> _delta # needs to be sourced manually -curl -o _dust https://raw.githubusercontent.com/bootandy/dust/master/completions/_dust -curl -o _fd https://raw.githubusercontent.com/sharkdp/fd/master/contrib/completion/_fd -rm -f _fzf # fzf --zsh output, which .zshrc now sources directly -$HOME/.local/bin/grm completion zsh >> _grm # needs to be sourced manually -# could not find zsh completion for lsd -$HOME/.local/bin/rg --generate=complete-zsh >> _rg -$HOME/.local/bin/starship completions zsh >> _starship -$HOME/.local/bin/uv generate-shell-completion zsh > _uv -$HOME/.local/bin/uvx --generate-shell-completion zsh > _uvx -curl -o _zoxide https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/contrib/completions/_zoxide -popd - -printf "\n# Checking GitHub account status\n" -$HOME/.local/bin/grm install --yes{{ if eq .chezmoi.os "linux" }} -f tar.gz{{ end }} cli/cli -gh auth status -if [ $? -ne 0 ] -then - gh auth login -fi - -printf "\n# Script finished successfully, open a new terminal to use new configuration\n" diff --git a/run_onchange_after_install-tools-unix.sh.tmpl b/run_onchange_after_install-tools-unix.sh.tmpl new file mode 100644 index 0000000..0b310b8 --- /dev/null +++ b/run_onchange_after_install-tools-unix.sh.tmpl @@ -0,0 +1,51 @@ +#!/bin/bash +# Installs mise (https://mise.jdx.dev) and the tools in ~/.config/mise/config.toml, +# then generates zsh completions for them. chezmoi runs this after applying +# files and again whenever this script or the rendered mise config changes. +# mise config hash: {{ includeTemplate "dot_config/mise/config.toml.tmpl" . | sha256sum }} +set -euo pipefail + +mise="$HOME/.local/bin/mise" +if [ ! -x "$mise" ]; then + printf "\n# Install mise\n" + curl -fsSL https://mise.run | MISE_INSTALL_PATH="$mise" sh +fi + +printf "\n# Install tools with mise\n" +"$mise" install +eval "$("$mise" env --shell bash)" + +# Remove the standalone installer's receipt so `uv self update` can't replace mise's uv +rm -f "${XDG_CONFIG_HOME:-$HOME/.config}/uv/uv-receipt.json" + +printf "\n# Generate zsh completions\n" +mkdir -p "$HOME/.config/zsh/completions" +cd "$HOME/.config/zsh/completions" +rm -f _fzf _grm # left by older versions of this script +atuin gen-completions --shell zsh --out-dir . +bat --completion zsh > _bat +"{{ .chezmoi.executable }}" completion zsh > _chezmoi +delta --generate-completion zsh > _delta +fd --gen-completions zsh > _fd +gh completion --shell zsh > _gh +"$mise" completion zsh > _mise +rg --generate=complete-zsh > _rg +starship completions zsh > _starship +uv generate-shell-completion zsh > _uv +uvx --generate-shell-completion zsh > _uvx + +# Some tools ship their completions in the release archive instead +copy_completion() { # copy_completion TOOL FILE + find "$("$mise" where "$1")" -name "$2" -type f -exec cp {} . \; +} +copy_completion lsd _lsd +copy_completion yazi _ya +copy_completion yazi _yazi +copy_completion zoxide _zoxide +curl -fsSL -o _dust "https://raw.githubusercontent.com/bootandy/dust/v$("$mise" current dust)/completions/_dust" \ + || echo "Couldn't download the dust completions" >&2 + +if [ -t 0 ] && ! gh auth status >/dev/null 2>&1; then + printf "\n# Log in to GitHub\n" + gh auth login || echo "gh auth login failed, run it again later" >&2 +fi From 2dfb843bce31623bfebeb3d8b15fda09199f8e99 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 09:23:57 +0000 Subject: [PATCH 04/76] install: manage node and go with mise Install node (the latest LTS) and go with mise, replacing zsh-nvm and the manually installed /usr/local/go. zsh-nvm's lazy loading wrapped nvim, lazygit, copilot and make in functions that loaded nvm on first use, while mise puts node on PATH directly. Node.js 26 links against libatomic, which minimal Ubuntu and Fedora installs don't have, so the packages script installs it when missing. Install the Copilot CLI as its standalone binary with mise instead of as an npm global, which nvm tied to a single node version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiexternal.toml | 4 ---- dot_config/mise/config.toml.tmpl | 5 ++++- dot_zshrc.tmpl | 6 ------ run_onchange_before_install-packages-unix.sh.tmpl | 6 ++++++ 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.chezmoiexternal.toml b/.chezmoiexternal.toml index f945af8..aa3bfbb 100644 --- a/.chezmoiexternal.toml +++ b/.chezmoiexternal.toml @@ -1,8 +1,4 @@ {{ if or (eq .chezmoi.os "darwin") (eq .chezmoi.os "linux") -}} -[".local/share/zsh-nvm"] - type = "git-repo" - url = "https://github.com/lukechilds/zsh-nvm.git" - refreshPeriod = "168h" [".vim/pack/plugins/start/vim-tmux-navigator"] type = "git-repo" url = "https://github.com/christoomey/vim-tmux-navigator.git" diff --git a/dot_config/mise/config.toml.tmpl b/dot_config/mise/config.toml.tmpl index 63a240d..e355528 100644 --- a/dot_config/mise/config.toml.tmpl +++ b/dot_config/mise/config.toml.tmpl @@ -1,4 +1,4 @@ -# Command-line tools, installed by run_onchange_after_install-tools-unix.sh. +# Tools installed by run_onchange_after_install-tools-unix.sh. # Update them with `mise upgrade`. See https://mise.jdx.dev/configuration.html [tools] # On Linux, the glibc builds of atuin and yazi need glibc 2.39 (Ubuntu 24.04), @@ -6,14 +6,17 @@ # which matters for lsd: its musl build shows uid/gid instead of user names. atuin = { version = "latest", libc = "musl" } bat = "latest" +copilot = "latest" delta = "latest" dust = "latest" fd = "latest" fzf = "latest" gh = "latest" +go = "latest" lazygit = "latest" lsd = "latest" neovim = "latest" +node = "lts" ripgrep = "latest" starship = "latest" tmux = "latest" diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 17d76a0..2d80f56 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -65,7 +65,6 @@ bindkey "^[OB" down-line-or-beginning-search source $HOME/.config/zsh/aliases.zsh # Environment Variables -export PATH=/usr/local/go/bin:$PATH export PATH=$HOME/.cargo/bin:$PATH export PATH=$HOME/.local/bin:$PATH {{- if and (eq .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} @@ -74,10 +73,6 @@ export PATH="/mnt/c/Windows/System32:$PATH" export VISUAL=nvim export EDITOR="$VISUAL" export DOCKER_BUILDKIT=1 -# https://github.com/lukechilds/zsh-nvm -export NVM_COMPLETION=true -export NVM_LAZY_LOAD=true -export NVM_LAZY_LOAD_EXTRA_COMMANDS=('nvim' 'lazygit' 'copilot' 'make') # Tools installed by mise: https://mise.jdx.dev eval "$($HOME/.local/bin/mise activate zsh)" @@ -112,7 +107,6 @@ bindkey -M vicmd '^T' undefined-key bindkey -M viins '^T' self-insert # Other Zsh scripts -source $HOME/.local/share/zsh-nvm/zsh-nvm.plugin.zsh source $HOME/.local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh {{- if and (eq .chezmoi.os "linux") (not (.chezmoi.kernel.osrelease | lower | contains "microsoft")) }} source $HOME/.config/zsh/openvpn3.zsh diff --git a/run_onchange_before_install-packages-unix.sh.tmpl b/run_onchange_before_install-packages-unix.sh.tmpl index 21ecab0..9cb0431 100644 --- a/run_onchange_before_install-packages-unix.sh.tmpl +++ b/run_onchange_before_install-packages-unix.sh.tmpl @@ -17,11 +17,17 @@ missing=() need() { # need COMMAND [PACKAGE] command -v "$1" >/dev/null 2>&1 || missing+=("${2:-$1}") } +need_lib() { # need_lib LIBRARY PACKAGE + /sbin/ldconfig -p | grep -F "$1" >/dev/null || missing+=("$2") +} need curl need git need zsh {{- if eq .chezmoi.osRelease.id "fedora" }} need chsh /usr/bin/chsh # dnf resolves the path; newer Fedora moved chsh to util-linux +need_lib libatomic.so.1 libatomic # Node.js from mise links against it +{{- else }} +need_lib libatomic.so.1 libatomic1 # Node.js from mise links against it {{- end }} {{- if not (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} need fc-cache fontconfig From c361dfc84817a56d0e70cc338abaec630579a9dd Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 09:37:50 +0000 Subject: [PATCH 05/76] chezmoi: replace the work and no-encryption branches with prompts The work and no-encryption branches were copies of main with a few changes, so they had to be kept in sync by hand: work is 31 commits behind main and no-encryption 101. chezmoi init now asks two questions instead, and the templates handle the differences. "Is this a work machine" (default no) uses the work email and lazygit branch prefix, copies from tmux with xclip, gives starship a longer command timeout, sources ~/.zshrc.$USER and manages ~/.bashrc. mise lives in ~/bin, as the work tools did, and ~/.local/bin stays off PATH. Go isn't installed, and the Alacritty, Hatch and IdeaVim configs are skipped. The rendered files match the work branch's. "Decrypt the encrypted files with the key passphrase" (default yes) isn't asked on work machines, which skipped the encrypted files already. With no, the decrypt script, SSH config and OpenVPN functions are ignored instead of deleted from a branch. The work bashrc runs `fzf --bash` instead of a copy of fzf's key-bindings.bash, still without the file widget, and only loads pixi completions if pixi is installed. Starship can be disabled with STARSHIP_DISABLE=true on every machine. Existing machines need `chezmoi init` to answer the prompts. Until then, templates fail with "map has no entry for key work". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoi.yaml.tmpl | 9 +++++ .chezmoiignore | 18 ++++++++++ dot_bashrc | 33 +++++++++++++++++++ .../lazygit/{config.yml => config.yml.tmpl} | 2 +- dot_config/mise/config.toml.tmpl | 2 ++ .../{starship.toml => starship.toml.tmpl} | 4 +++ dot_gitconfig.tmpl | 2 +- dot_tmux.conf => dot_tmux.conf.tmpl | 4 +-- dot_zshrc.tmpl | 11 +++++-- run_onchange_after_install-tools-unix.sh.tmpl | 2 +- 10 files changed, 79 insertions(+), 8 deletions(-) create mode 100644 dot_bashrc rename dot_config/lazygit/{config.yml => config.yml.tmpl} (65%) rename dot_config/{starship.toml => starship.toml.tmpl} (94%) rename dot_tmux.conf => dot_tmux.conf.tmpl (96%) diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl index c69e426..3b24298 100644 --- a/.chezmoi.yaml.tmpl +++ b/.chezmoi.yaml.tmpl @@ -1,3 +1,9 @@ +{{- $work := promptBoolOnce . "work" "Is this a work machine" false -}} +{{- /* Work machines don't use the encrypted files */ -}} +{{- $encryption := false -}} +{{- if not $work -}} +{{- $encryption = promptBoolOnce . "encryption" "Decrypt the encrypted files with the key passphrase" true -}} +{{- end -}} {{ if eq .chezmoi.os "windows" -}} cd: command: "pwsh" @@ -8,6 +14,9 @@ interpreters: args: ["-NoLogo"] {{ end -}} +data: + work: {{ $work }} + encryption: {{ $encryption }} diff: pager: "delta" edit: diff --git a/.chezmoiignore b/.chezmoiignore index ecb01a5..a5eaf20 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -13,6 +13,7 @@ install-windows.ps1 # unix files {{ if eq .chezmoi.os "windows" -}} +.bashrc .config/atuin .config/bpytop .config/mise @@ -30,3 +31,20 @@ install-tools-unix.sh .alacritty.toml .config/zsh/openvpn3.zsh {{- end }} + +# encrypted files +{{ if not .encryption -}} +.config/zsh/openvpn3.zsh +.ssh +decrypt-private-key-unix.sh +decrypt-private-key-windows.ps1 +{{- end }} + +# personal or work files +{{ if .work -}} +.alacritty.toml +.config/hatch +.ideavimrc +{{- else -}} +.bashrc +{{- end }} diff --git a/dot_bashrc b/dot_bashrc new file mode 100644 index 0000000..9eb619e --- /dev/null +++ b/dot_bashrc @@ -0,0 +1,33 @@ +# Functions +source "$HOME/.config/zsh/functions.zsh" + +# Aliases +source "$HOME/.config/zsh/aliases.zsh" + +# Tools installed by mise: https://mise.jdx.dev +eval "$("$HOME/bin/mise" activate bash)" + +# Pixi: https://github.com/prefix-dev/pixi +command -v pixi >/dev/null && eval "$(pixi completion --shell bash)" + +# Zoxide: https://github.com/ajeetdsouza/zoxide +eval "$(zoxide init bash)" + +# fzf configuration +export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --info=inline' +export FZF_DEFAULT_COMMAND="fd --hidden --follow --exclude '.git'" +export FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND --type d" + +# Use fd for fzf path/dir completion +_fzf_compgen_path() { + fd --hidden --follow --exclude ".git" . "$1" +} +_fzf_compgen_dir() { + fd --type d --hidden --follow --exclude ".git" . "$1" +} + +# Key bindings and ** completion. The empty FZF_CTRL_T_COMMAND skips the file +# widget, which conflicts with the Copilot CLI file picker. +FZF_CTRL_T_COMMAND='' eval "$(fzf --bash)" + +[[ "$TERM_PROGRAM" == "vscode" ]] && source "$(code --locate-shell-integration-path bash)" diff --git a/dot_config/lazygit/config.yml b/dot_config/lazygit/config.yml.tmpl similarity index 65% rename from dot_config/lazygit/config.yml rename to dot_config/lazygit/config.yml.tmpl index ba3ded1..4a39b5f 100644 --- a/dot_config/lazygit/config.yml +++ b/dot_config/lazygit/config.yml.tmpl @@ -1,4 +1,4 @@ git: - branchPrefix: "patrick-5546/" + branchPrefix: "{{ if .work }}users/pcreighton/{{ else }}patrick-5546/{{ end }}" diffRenderers: - command: delta --dark --paging=never --line-numbers --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}" diff --git a/dot_config/mise/config.toml.tmpl b/dot_config/mise/config.toml.tmpl index e355528..a2b3273 100644 --- a/dot_config/mise/config.toml.tmpl +++ b/dot_config/mise/config.toml.tmpl @@ -12,7 +12,9 @@ dust = "latest" fd = "latest" fzf = "latest" gh = "latest" +{{ if not .work -}} go = "latest" +{{ end -}} lazygit = "latest" lsd = "latest" neovim = "latest" diff --git a/dot_config/starship.toml b/dot_config/starship.toml.tmpl similarity index 94% rename from dot_config/starship.toml rename to dot_config/starship.toml.tmpl index 8c2cf8a..2b9b17c 100644 --- a/dot_config/starship.toml +++ b/dot_config/starship.toml.tmpl @@ -1,3 +1,7 @@ +{{ if .work -}} +command_timeout = 3000 + +{{ end -}} [shell] unknown_indicator = "unknownsh" style = "cyan bold" diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index c48c554..f4f858c 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -1,5 +1,5 @@ [user] - email = pcreighton429@gmail.com + email = {{ if .work }}pcreighton@microsoft.com{{ else }}pcreighton429@gmail.com{{ end }} name = Patrick Creighton [push] autoSetupRemote = true diff --git a/dot_tmux.conf b/dot_tmux.conf.tmpl similarity index 96% rename from dot_tmux.conf rename to dot_tmux.conf.tmpl index 15ac926..0bf5001 100644 --- a/dot_tmux.conf +++ b/dot_tmux.conf.tmpl @@ -67,8 +67,8 @@ set-option -g allow-rename off # enable and configure vi-copy-mode setw -g mode-keys vi bind -T copy-mode-vi v send -X begin-selection -bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel -bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel{{ if .work }} "xclip -in -selection clipboard"{{ end }} +bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel{{ if .work }} "xclip -in -selection clipboard"{{ end }} # TokyoNight colors for Tmux # https://github.com/folke/tokyonight.nvim/blob/main/extras/tmux/tokyonight_moon.tmux diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 2d80f56..5343941 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -66,7 +66,9 @@ source $HOME/.config/zsh/aliases.zsh # Environment Variables export PATH=$HOME/.cargo/bin:$PATH +{{- if not .work }} export PATH=$HOME/.local/bin:$PATH +{{- end }} {{- if and (eq .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} export PATH="/mnt/c/Windows/System32:$PATH" {{- end }} @@ -75,7 +77,7 @@ export EDITOR="$VISUAL" export DOCKER_BUILDKIT=1 # Tools installed by mise: https://mise.jdx.dev -eval "$($HOME/.local/bin/mise activate zsh)" +eval "$({{ if .work }}$HOME/bin{{ else }}$HOME/.local/bin{{ end }}/mise activate zsh)" # fzf configuration # Use fd (https://github.com/sharkdp/fd) instead of the default find command for listing path candidates. @@ -108,9 +110,12 @@ bindkey -M viins '^T' self-insert # Other Zsh scripts source $HOME/.local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -{{- if and (eq .chezmoi.os "linux") (not (.chezmoi.kernel.osrelease | lower | contains "microsoft")) }} +{{- if and .encryption (eq .chezmoi.os "linux") (not (.chezmoi.kernel.osrelease | lower | contains "microsoft")) }} source $HOME/.config/zsh/openvpn3.zsh {{- end }} +{{- if .work }} +[[ -f $HOME/.zshrc.$USER ]] && source $HOME/.zshrc.$USER +{{- end }} # Atuin: https://github.com/atuinsh/atuin eval "$(atuin init zsh --disable-up-arrow --disable-ai)" @@ -119,4 +124,4 @@ eval "$(atuin init zsh --disable-up-arrow --disable-ai)" eval "$(zoxide init zsh)" # Prompt -eval "$(starship init zsh)" +[[ "$STARSHIP_DISABLE" != "true" ]] && eval "$(starship init zsh)" diff --git a/run_onchange_after_install-tools-unix.sh.tmpl b/run_onchange_after_install-tools-unix.sh.tmpl index 0b310b8..174dbcd 100644 --- a/run_onchange_after_install-tools-unix.sh.tmpl +++ b/run_onchange_after_install-tools-unix.sh.tmpl @@ -5,7 +5,7 @@ # mise config hash: {{ includeTemplate "dot_config/mise/config.toml.tmpl" . | sha256sum }} set -euo pipefail -mise="$HOME/.local/bin/mise" +mise="{{ if .work }}$HOME/bin{{ else }}$HOME/.local/bin{{ end }}/mise" if [ ! -x "$mise" ]; then printf "\n# Install mise\n" curl -fsSL https://mise.run | MISE_INSTALL_PATH="$mise" sh From d2604af0958822f16bb02a39f993240ce74697e5 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 09:42:57 +0000 Subject: [PATCH 06/76] chezmoi: decrypt the key with built-in age Decrypt ~/.chezmoikey.txt with `chezmoi age decrypt --passphrase`, the pattern from the chezmoi encryption FAQ, so the age binary is no longer a prerequisite. chezmoi already falls back to its built-in age for the encrypted files when age isn't on PATH. Run the Unix script with `set -eu` and exit the Windows script when decryption fails, so a wrong passphrase stops the apply right away instead of failing later on the missing identity. Quote the Test-Path path on Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- run_before_decrypt-private-key-unix.sh.tmpl | 3 ++- run_before_decrypt-private-key-windows.ps1.tmpl | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/run_before_decrypt-private-key-unix.sh.tmpl b/run_before_decrypt-private-key-unix.sh.tmpl index 5bd53ea..b520a96 100644 --- a/run_before_decrypt-private-key-unix.sh.tmpl +++ b/run_before_decrypt-private-key-unix.sh.tmpl @@ -1,7 +1,8 @@ #!/bin/sh +set -eu if [ ! -f "{{ .chezmoi.homeDir }}/.chezmoikey.txt" ]; then printf "# create ~/.chezmoikey.txt\n" - age --decrypt --output "{{ .chezmoi.homeDir }}/.chezmoikey.txt" "{{ .chezmoi.sourceDir }}/key.txt.age" + "{{ .chezmoi.executable }}" age decrypt --output "{{ .chezmoi.homeDir }}/.chezmoikey.txt" --passphrase "{{ .chezmoi.sourceDir }}/key.txt.age" chmod 600 "{{ .chezmoi.homeDir }}/.chezmoikey.txt" fi diff --git a/run_before_decrypt-private-key-windows.ps1.tmpl b/run_before_decrypt-private-key-windows.ps1.tmpl index 185b6fb..fb67edb 100644 --- a/run_before_decrypt-private-key-windows.ps1.tmpl +++ b/run_before_decrypt-private-key-windows.ps1.tmpl @@ -1,4 +1,5 @@ -if (-Not (Test-Path {{ .chezmoi.homeDir }}/.chezmoikey.txt -PathType Leaf)) { +if (-Not (Test-Path "{{ .chezmoi.homeDir }}/.chezmoikey.txt" -PathType Leaf)) { Write-Host "# create ~/.chezmoikey.txt" - age --decrypt --output "{{ .chezmoi.homeDir }}/.chezmoikey.txt" "{{ .chezmoi.sourceDir }}/key.txt.age" + & "{{ .chezmoi.executable }}" age decrypt --output "{{ .chezmoi.homeDir }}/.chezmoikey.txt" --passphrase "{{ .chezmoi.sourceDir }}/key.txt.age" + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } } From 79d7d965dccaa15303e5c5a99cb08a2ba14110ea Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 09:43:35 +0000 Subject: [PATCH 07/76] cleanup: remove unused bpytop and tmuxinator configs Neither bpytop nor tmuxinator is installed by any script, and the tmuxinator sessions point at old course projects. Remove their configs, the commented-out btop alias, and the .chezmoiignore entries for them and for install-windows.ps1, which only exists under reference_dotfiles. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 3 - dot_config/bpytop/bpytop.conf | 153 ---------------------------- dot_config/tmuxinator/champsim2.yml | 61 ----------- dot_config/tmuxinator/champsim3.yml | 72 ------------- dot_config/tmuxinator/champsim4.yml | 63 ------------ dot_config/tmuxinator/config.yml | 64 ------------ dot_config/tmuxinator/hdlbits.yml | 55 ---------- dot_config/tmuxinator/rustlings.yml | 62 ----------- dot_config/zsh/aliases.zsh | 1 - 9 files changed, 534 deletions(-) delete mode 100644 dot_config/bpytop/bpytop.conf delete mode 100644 dot_config/tmuxinator/champsim2.yml delete mode 100644 dot_config/tmuxinator/champsim3.yml delete mode 100644 dot_config/tmuxinator/champsim4.yml delete mode 100644 dot_config/tmuxinator/config.yml delete mode 100644 dot_config/tmuxinator/hdlbits.yml delete mode 100644 dot_config/tmuxinator/rustlings.yml diff --git a/.chezmoiignore b/.chezmoiignore index a5eaf20..c8b1b38 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -8,16 +8,13 @@ reference_dotfiles .config/whkdrc Documents decrypt-private-key-windows.ps1 -install-windows.ps1 {{- end }} # unix files {{ if eq .chezmoi.os "windows" -}} .bashrc .config/atuin -.config/bpytop .config/mise -.config/tmuxinator .config/zsh .tmux.conf .zshrc diff --git a/dot_config/bpytop/bpytop.conf b/dot_config/bpytop/bpytop.conf deleted file mode 100644 index e129626..0000000 --- a/dot_config/bpytop/bpytop.conf +++ /dev/null @@ -1,153 +0,0 @@ -#? Config file for bpytop v. 1.0.68 - -#* Color theme, looks for a .theme file in "/usr/[local/]share/bpytop/themes" and "~/.config/bpytop/themes", "Default" for builtin default theme. -#* Prefix name by a plus sign (+) for a theme located in user themes folder, i.e. color_theme="+monokai" -color_theme="Default" - -#* If the theme set background should be shown, set to False if you want terminal background transparency -theme_background=False - -#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. -truecolor=True - -#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace. -shown_boxes="cpu proc net mem" - -#* Update time in milliseconds, increases automatically if set below internal loops processing time, recommended 2000 ms or above for better sample times for graphs. -update_ms=2000 - -#* Processes update multiplier, sets how often the process list is updated as a multiplier of "update_ms". -#* Set to 2 or higher to greatly decrease bpytop cpu usage. (Only integers) -proc_update_mult=2 - -#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive", -#* "cpu lazy" updates top process over time, "cpu responsive" updates top process directly. -proc_sorting="memory" - -#* Reverse sorting order, True or False. -proc_reversed=False - -#* Show processes as a tree -proc_tree=False - -#* Which depth the tree view should auto collapse processes at -tree_depth=3 - -#* Use the cpu graph colors in the process list. -proc_colors=True - -#* Use a darkening gradient in the process list. -proc_gradient=True - -#* If process cpu usage should be of the core it's running on or usage of the total available cpu power. -proc_per_core=False - -#* Show process memory as bytes instead of percent -proc_mem_bytes=True - -#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available, see: -#* https://psutil.readthedocs.io/en/latest/#psutil.cpu_times for attributes available on specific platforms. -#* Select from a list of detected attributes from the options menu -cpu_graph_upper="total" - -#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available, see: -#* https://psutil.readthedocs.io/en/latest/#psutil.cpu_times for attributes available on specific platforms. -#* Select from a list of detected attributes from the options menu -cpu_graph_lower="total" - -#* Toggles if the lower CPU graph should be inverted. -cpu_invert_lower=True - -#* Set to True to completely disable the lower CPU graph. -cpu_single_graph=False - -#* Shows the system uptime in the CPU box. -show_uptime=True - -#* Check cpu temperature, needs "osx-cpu-temp" on MacOS X. -check_temp=True - -#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors. -cpu_sensor=Auto - -#* Show temperatures for cpu cores also if check_temp is True and sensors has been found -show_coretemp=True - -#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine" -temp_scale="celsius" - -#* Show CPU frequency, can cause slowdowns on certain systems with some versions of psutil -show_cpu_freq=True - -#* Draw a clock at top of screen, formatting according to strftime, empty string to disable. -draw_clock="" - -#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort. -background_update=True - -#* Custom cpu model name, empty string to disable. -custom_cpu_name="" - -#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with a comma ",". -#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot, /home/user" -disks_filter="" - -#* Show graphs instead of meters for memory values. -mem_graphs=False - -#* If swap memory should be shown in memory box. -show_swap=True - -#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. -swap_disk=True - -#* If mem box should be split to also show disks info. -show_disks=True - -#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. -only_physical=True - -#* Read disks list from /etc/fstab. This also disables only_physical. -use_fstab=False - -#* Toggles if io stats should be shown in regular disk usage view -show_io_stat=True - -#* Toggles io mode for disks, showing only big graphs for disk read/write speeds. -io_mode=True - -#* Set to True to show combined read/write io graphs in io mode. -io_graph_combined=False - -#* Set the top speed for the io graphs in MiB/s (10 by default), use format "device:speed" separate disks with a comma ",". -#* Example: "/dev/sda:100, /dev/sdb:20" -io_graph_speeds="" - -#* Set fixed values for network graphs, default "10M" = 10 Mibibytes, possible units "K", "M", "G", append with "bit" for bits instead of bytes, i.e "100mbit" -net_download="10M" -net_upload="10M" - -#* Start in network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. -net_auto=True - -#* Sync the scaling for download and upload to whichever currently has the highest scale -net_sync=False - -#* If the network graphs color gradient should scale to bandwidth usage or auto scale, bandwidth usage is based on "net_download" and "net_upload" values -net_color_fixed=False - -#* Starts with the Network Interface specified here. -net_iface="" - -#* Show battery stats in top right if battery is present -show_battery=False - -#* Show init screen at startup, the init screen is purely cosmetical -show_init=False - -#* Enable check for new version from github.com/aristocratos/bpytop at start. -update_check=False - -#* Set loglevel for "~/.config/bpytop/error.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". -#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. -log_level=WARNING diff --git a/dot_config/tmuxinator/champsim2.yml b/dot_config/tmuxinator/champsim2.yml deleted file mode 100644 index 29d760a..0000000 --- a/dot_config/tmuxinator/champsim2.yml +++ /dev/null @@ -1,61 +0,0 @@ -# /home/pcrei/.config/tmuxinator/champsim2.yml - -name: champsim2 -root: ~/school/cpen411/assignment2/ChampSim-Intel - -# Optional tmux socket -# socket_name: foo - -# Note that the pre and post options have been deprecated and will be replaced by -# project hooks. - -# Project hooks - -# Runs on project start, always -# on_project_start: command - -# Run on project start, the first time -# on_project_first_start: command - -# Run on project start, after the first time -# on_project_restart: command - -# Run on project exit ( detaching from tmux session ) -# on_project_exit: command - -# Run on project stop -# on_project_stop: command - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: editor - -# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. -# startup_pane: 1 - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -windows: - - nvim: - layout: main-vertical - panes: - - nvim - - buildnrun: - layout: even-horizontal - panes: - - - - cd simscript-testing && cls - - results: - root: ~/courses/cpen411/assignment2/ChampSim-Intel/results - layout: main-vertical - panes: - - nvim diff --git a/dot_config/tmuxinator/champsim3.yml b/dot_config/tmuxinator/champsim3.yml deleted file mode 100644 index 6e99373..0000000 --- a/dot_config/tmuxinator/champsim3.yml +++ /dev/null @@ -1,72 +0,0 @@ -# /home/pcrei/.config/tmuxinator/champsim3.yml - -name: champsim3 -root: ~/school/cpen411/assignment3/ChampSim - -# Optional tmux socket -# socket_name: foo - -# Note that the pre and post options have been deprecated and will be replaced by -# project hooks. - -# Project hooks - -# Runs on project start, always -# on_project_start: command - -# Run on project start, the first time -# on_project_first_start: command - -# Run on project start, after the first time -# on_project_restart: command - -# Run on project exit ( detaching from tmux session ) -# on_project_exit: command - -# Run on project stop -# on_project_stop: command - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: editor - -# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. -# startup_pane: 1 - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -windows: - - nvim: - layout: main-vertical - panes: - - nvim - - build: - layout: even-vertical - panes: - - bash compile_champsim.sh - - algorithms: - - cd algorithms - - clear - - make && bash runall.sh; bat ../output/* - - trace: - layout: even-vertical - panes: - - tracer: - - cd tracer - - clear - - ls -l gen*.sh - - ls -l run*.sh - - results: - root: ~/school/cpen411/assignment3/ChampSim/results - layout: main-vertical - panes: - - nvim diff --git a/dot_config/tmuxinator/champsim4.yml b/dot_config/tmuxinator/champsim4.yml deleted file mode 100644 index b940885..0000000 --- a/dot_config/tmuxinator/champsim4.yml +++ /dev/null @@ -1,63 +0,0 @@ -# /home/pcrei/.config/tmuxinator/champsim4.yml - -name: champsim4 -root: ~/school/cpen411/assignment4/ChampSim-Intel - -# Optional tmux socket -# socket_name: foo - -# Note that the pre and post options have been deprecated and will be replaced by -# project hooks. - -# Project hooks - -# Runs on project start, always -# on_project_start: command - -# Run on project start, the first time -# on_project_first_start: command - -# Run on project start, after the first time -# on_project_restart: command - -# Run on project exit ( detaching from tmux session ) -# on_project_exit: command - -# Run on project stop -# on_project_stop: command - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: editor - -# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. -# startup_pane: 1 - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -windows: - - nvim: - layout: main-vertical - panes: - - nvim - - buildnrun: - layout: even-horizontal - panes: - - ls -l build*.sh - - run: - - cd simscript - - ls -l runall*.sh - - results: - root: ~/school/cpen411/assignment4/ChampSim-Intel/results - layout: main-vertical - panes: - - nvim diff --git a/dot_config/tmuxinator/config.yml b/dot_config/tmuxinator/config.yml deleted file mode 100644 index 7ce86d5..0000000 --- a/dot_config/tmuxinator/config.yml +++ /dev/null @@ -1,64 +0,0 @@ -# /home/pcrei/.config/tmuxinator/config.yml - -name: config -root: ~/ - -# Optional tmux socket -# socket_name: foo - -# Note that the pre and post options have been deprecated and will be replaced by -# project hooks. - -# Project hooks - -# Runs on project start, always -# on_project_start: command - -# Run on project start, the first time -# on_project_first_start: command - -# Run on project start, after the first time -# on_project_restart: command - -# Run on project exit ( detaching from tmux session ) -# on_project_exit: command - -# Run on project stop -# on_project_stop: command - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: editor - -# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. -# startup_pane: 1 - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -windows: - - chezmoi: - root: ~/.local/share/chezmoi - layout: main-vertical - panes: - - nvim - - git status - - nvim: - root: ~/.config/nvim - layout: main-vertical - panes: - - nvim - - ls -la - - home: - layout: main-vertical - panes: - - nvim - - ls -la diff --git a/dot_config/tmuxinator/hdlbits.yml b/dot_config/tmuxinator/hdlbits.yml deleted file mode 100644 index a4d5d7e..0000000 --- a/dot_config/tmuxinator/hdlbits.yml +++ /dev/null @@ -1,55 +0,0 @@ -# /home/pcrei/.config/tmuxinator/hdlbits.yml - -name: hdlbits -root: ~/git/patrick-5546/hdlbits - -# Optional tmux socket -# socket_name: foo - -# Note that the pre and post options have been deprecated and will be replaced by -# project hooks. - -# Project hooks - -# Runs on project start, always -# on_project_start: command - -# Run on project start, the first time -# on_project_first_start: command - -# Run on project start, after the first time -# on_project_restart: command - -# Run on project exit ( detaching from tmux session ) -# on_project_exit: command - -# Run on project stop -# on_project_stop: command - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: editor - -# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. -# startup_pane: 1 - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -windows: - - hdlbits: - layout: main-horizontal - # Synchronize all panes of this window, can be enabled before or after the pane commands run. - # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' - # synchronize: after - panes: - - nvim - - git status diff --git a/dot_config/tmuxinator/rustlings.yml b/dot_config/tmuxinator/rustlings.yml deleted file mode 100644 index 2e34c5d..0000000 --- a/dot_config/tmuxinator/rustlings.yml +++ /dev/null @@ -1,62 +0,0 @@ -# /home/pcrei/.config/tmuxinator/rustlings.yml - -name: rustlings -root: ~/git/forks/rustlings - -# Optional tmux socket -# socket_name: foo - -# Note that the pre and post options have been deprecated and will be replaced by -# project hooks. - -# Project hooks - -# Runs on project start, always -# on_project_start: command - -# Run on project start, the first time -# on_project_first_start: command - -# Run on project start, after the first time -# on_project_restart: command - -# Run on project exit ( detaching from tmux session ) -# on_project_exit: command - -# Run on project stop -# on_project_stop: command - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: editor - -# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. -# startup_pane: 1 - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -windows: - - rustlings: - layout: main-vertical - # Synchronize all panes of this window, can be enabled before or after the pane commands run. - # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after' - # synchronize: after - panes: - - nvim - - rustlings watch - - sandbox: - root: ~/git/forks/rustlings/sandbox - layout: main-vertical - panes: - - nvim sandbox.rs - - ./sandbox - - git: diff --git a/dot_config/zsh/aliases.zsh b/dot_config/zsh/aliases.zsh index 44ea3e8..684401c 100644 --- a/dot_config/zsh/aliases.zsh +++ b/dot_config/zsh/aliases.zsh @@ -1,7 +1,6 @@ # general alias ..='cd ..' alias ...='cd ../..' -#alias btop='bpytop' alias c='chezmoi' alias cad='chezmoi add' alias cap='chezmoi apply' From 27de067ac7a419d81a8b29b49837c2479f1c94fc Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 09:51:35 +0000 Subject: [PATCH 08/76] docs: update the README for mise and the init prompts Describe the mise config and the two install scripts, the work and encryption prompts, and how to keep everything up to date. curl is now the only prerequisite on Linux, since the packages script installs git and zsh and chezmoi decrypts with its built-in age. Install chezmoi with an explicit -b so the command works from any directory. Remove the no-encryption branch, tmuxinator, the neovim PPA and the OS version numbers, and link to UniGetUI, the new name of WingetUI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 75 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 12ae03a..a96f270 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,9 @@ My cross-platform, cross-shell configuration files and installation scripts managed with [chezmoi](https://www.chezmoi.io/): -- Zsh on Windows 11 WSL 2 Ubuntu 22.04 -- Zsh on MacOS -- Zsh on Ubuntu 22.04 -- Zsh on Fedora 36 -- Powershell 7 on Windows 11 +- Zsh on Linux: Ubuntu, Fedora, and WSL 2 +- Zsh on macOS +- PowerShell 7 on Windows 11 ## Highlights @@ -15,52 +13,57 @@ Documentation for my setup can be found on my notes website: [Setup](https://pat The files I think are most notable are listed below: - Neovim configuration, based off [LazyVim](https://www.lazyvim.org): [`dot_config/nvim`](./dot_config/nvim) -- Tmux configuration: [`dot_tmux.conf`](./dot_tmux.conf) +- Tmux configuration: [`dot_tmux.conf.tmpl`](./dot_tmux.conf.tmpl) - Integrated with neovim: uses same theme, seamless navigation between tmux and neovim splits - - Complex tmux sessions are managed easily using [tmuxinator](https://github.com/tmuxinator/tmuxinator): - [`dot_config/tmuxinator`](./dot_config/tmuxinator) - Installation scripts: improve and standardize the CLI across operating systems - - [`.chezmoiexternal.toml`](./.chezmoiexternal.toml) - - To see what software is installed, search for `url` - - Unix-specific: [`run_install-unix.sh.tmpl`](./run_install-unix.sh.tmpl) - - To see what software is installed, search for `dependencies` - - Does not require Sudo privileges + - CLI tools are installed and updated with [mise](https://mise.jdx.dev): + [`dot_config/mise/config.toml.tmpl`](./dot_config/mise/config.toml.tmpl) + - Unix-specific, rerun by chezmoi only when they change: + - [`run_onchange_before_install-packages-unix.sh.tmpl`](./run_onchange_before_install-packages-unix.sh.tmpl): + installs the missing system packages, installs the FiraCode Nerd Font on Linux (not WSL), and makes zsh the + login shell. Only uses sudo when something is missing + - [`run_onchange_after_install-tools-unix.sh.tmpl`](./run_onchange_after_install-tools-unix.sh.tmpl): + installs mise and the tools in its config, and generates their zsh completions. + Also reruns when the mise config changes + - Plugins cloned from git: [`.chezmoiexternal.toml`](./.chezmoiexternal.toml) - Windows-specific: [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1) - To see what software is installed, search for `wingetInstallIfNotInstalled`, `choco install`, and `Install-Module` - - I don't use this script anymore, in favor of [WingetUI](https://github.com/marticliment/WingetUI): [`wingetui/`](./reference_dotfiles/wingetui/) + - I don't use this script anymore, in favor of [UniGetUI](https://github.com/Devolutions/UniGetUI) + (formerly WingetUI): [`wingetui/`](./reference_dotfiles/wingetui/) - Encryption scripts: files with sensitive information are - [encrypted](https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/) + [encrypted](https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/) with age. + On the first apply, these scripts decrypt the age key with its passphrase using chezmoi's built-in age - Unix-specific: [`run_before_decrypt-private-key-unix.sh.tmpl`](./run_before_decrypt-private-key-unix.sh.tmpl) - Windows-specific: [`run_before_decrypt-private-key-windows.ps1.tmpl`](./run_before_decrypt-private-key-windows.ps1.tmpl) - Configuration files for software that is not managed with chezmoi: [`reference_dotfiles`](./reference_dotfiles) ## Installation -### Zsh on Linux or MacOS +`chezmoi init` asks two questions and saves the answers in `~/.config/chezmoi/chezmoi.yaml`. +Run `chezmoi init --prompt` to answer them again. -1. Install prerequisites - 1. [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - 2. [age](https://github.com/FiloSottile/age#installation) - 3. On Linux, [xz-utils](https://repology.org/project/xz/versions) - 4. On a fresh Ubuntu install, this is how I install the above prerequisites and other packages I uses +- Is this a work machine: work machines use my work email, and skip my personal files and the encrypted files +- Decrypt the encrypted files with the key passphrase: answer no if you don't have the passphrase. + Only asked on personal machines + +### Zsh on Linux or macOS - ``` - sudo add-apt-repository ppa:neovim-ppa/unstable -y && sudo apt install git age xz-utils curl neovim tmux zsh -y - ``` +1. Install prerequisites + - [curl](https://curl.se/download.html), to install chezmoi + - On macOS, git from the Xcode Command Line Tools: `xcode-select --install` + - On Linux, chezmoi installs git, zsh, and the other packages it needs with apt or dnf 2. Install chezmoi in `~/.local/bin`, pulling and applying the latest changes ``` - pushd ~ - sh -c "$(curl -fsLS get.chezmoi.io/lb)" -- init --apply patrick-5546 - popd + sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin" init --apply patrick-5546 ``` - - To install without encrypted files, add `--branch no-encryption` to the init command + - On a work machine, install chezmoi in `~/bin` instead by replacing `$HOME/.local/bin` with `$HOME/bin` + - Open a new terminal, or log out and back in, to start using zsh 3. If desired, manually install software with unique installation instructions - [Alacritty](https://github.com/alacritty/alacritty/blob/master/INSTALL.md) - - [Neovim](https://github.com/neovim/neovim/wiki/Installing-Neovim) 4. Additional setup for Fedora 1. [Enable RPM Fusion repositories](https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/) 2. [Install multimedia plugins](https://docs.fedoraproject.org/en-US/quick-docs/assembly_installing-plugins-for-playing-movies-and-music/) @@ -72,13 +75,21 @@ The files I think are most notable are listed below: keepcache=True ``` +5. Keep everything up to date + + ``` + chezmoi update # pull and apply the latest changes + mise upgrade # upgrade the tools + mise self-update # upgrade mise + chezmoi upgrade # upgrade chezmoi + ``` + ### PowerShell 7 on Windows 1. Install PowerShell 7 from the Microsoft Store -2. Install git and gsudo using winget in PowerShell +2. Install chezmoi and git using winget in PowerShell ``` - winget install --exact --id FiloSottile.age --interactive winget install --exact --id twpayne.chezmoi --interactive winget install --exact --id Git.Git --interactive ``` @@ -92,4 +103,4 @@ The files I think are most notable are listed below: 4. Optional: run [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1) to match my unix developer experience - Prerequisite: `winget install --exact --id gerardog.gsudo --interactive` - Note: I do not run this automatically anymore because I do most of my development through WSL or VS Code. - Instead, I now manage the software I want through [WingetUI](https://github.com/marticliment/WingetUI) whenever possible + Instead, I now manage the software I want through [UniGetUI](https://github.com/Devolutions/UniGetUI) whenever possible From c4e693f545fdd3a890ee4f420a968904817d75a3 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 10:09:49 +0000 Subject: [PATCH 09/76] ci: lint the rendered templates and test chezmoi apply Add a CI workflow with two jobs: - lint renders every template for Ubuntu, Fedora, WSL, macOS and Windows, each as a personal machine with and without encryption and as a work machine. It then checks the results with shellcheck, zsh -n, the PowerShell parser, and TOML, YAML and git config parsers. - apply installs the dotfiles from the checkout the way the README does, on fresh Ubuntu (personal and work), Fedora and macOS machines. It checks that applying again changes nothing and that zsh is the login shell. It also checks that zsh, and bash on work machines, start without output and have the tools from mise, their completions, and the fzf and atuin key bindings. Both scripts live in .github so they can run outside CI. test.sh refuses to run unless CI=true, because it replaces the dotfiles in $HOME. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/lint.sh | 66 ++++++++++++++++++ .github/test.sh | 141 +++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 68 +++++++++++++++++++ README.md | 5 ++ 4 files changed, 280 insertions(+) create mode 100755 .github/lint.sh create mode 100755 .github/test.sh create mode 100644 .github/workflows/ci.yml diff --git a/.github/lint.sh b/.github/lint.sh new file mode 100755 index 0000000..07e07be --- /dev/null +++ b/.github/lint.sh @@ -0,0 +1,66 @@ +#!/bin/bash +# Renders the chezmoi templates for each OS and machine type, then checks the +# results: shellcheck for shell scripts, zsh -n, the PowerShell parser, and TOML, +# YAML and git config syntax. Needs chezmoi, zsh, shellcheck, pwsh, python3 and yq. +set -euo pipefail +cd "$(dirname "$0")/.." + +declare -A os_data=( + [ubuntu]='{"os":"linux","osRelease":{"id":"ubuntu"},"kernel":{"osrelease":"6.8.0-45-generic"}}' + [fedora]='{"os":"linux","osRelease":{"id":"fedora"},"kernel":{"osrelease":"6.11.4-301.fc41.x86_64"}}' + [wsl]='{"os":"linux","osRelease":{"id":"ubuntu"},"kernel":{"osrelease":"5.15.167.4-microsoft-standard-WSL2"}}' + [darwin]='{"os":"darwin"}' + [windows]='{"os":"windows"}' +) +out=$(mktemp -d) +trap 'rm -rf "$out"' EXIT + +check() { # check OS TEMPLATE RENDERED + case $2 in + *.sh.tmpl) [ "$1" = windows ] || shellcheck "$3" ;; + *.ps1.tmpl) + # shellcheck disable=SC2016 # PowerShell expands these + [ "$1" != windows ] || SCRIPT="$3" pwsh -NoProfile -Command ' + $errors = $null + [void][System.Management.Automation.Language.Parser]::ParseFile($env:SCRIPT, [ref]$null, [ref]$errors) + $errors | ForEach-Object { Write-Error $_.ToString() } + exit $errors.Count' + ;; + dot_zshrc.tmpl) [ "$1" = windows ] || zsh -n "$3" ;; + *.toml.tmpl | .chezmoiexternal.toml) + python3 -c 'import sys, tomllib; tomllib.load(open(sys.argv[1], "rb"))' "$3" ;; + *.yaml.tmpl | *.yml.tmpl) yq . "$3" >/dev/null ;; + dot_gitconfig.tmpl) git config --file "$3" --list >/dev/null ;; + esac +} + +for os in "${!os_data[@]}"; do + for machine in personal personal-without-encryption work; do + case $machine in + personal) work=false encryption=true ;; + personal-without-encryption) work=false encryption=false ;; + work) work=true encryption=false ;; + esac + echo "# $os $machine" + chezmoi=(chezmoi --source . --override-data "{\"chezmoi\":${os_data[$os]},\"work\":$work,\"encryption\":$encryption}") + for template in $(git ls-files '*.tmpl' .chezmoiexternal.toml .chezmoiignore); do + rendered="$out/$os-$machine/${template%.tmpl}" + mkdir -p "$(dirname "$rendered")" + if [ "$template" = .chezmoi.yaml.tmpl ]; then + "${chezmoi[@]}" execute-template --init \ + --promptBool "Is this a work machine=$work,Decrypt the encrypted files with the key passphrase=$encryption" \ + <"$template" >"$rendered" + else + "${chezmoi[@]}" execute-template <"$template" >"$rendered" + fi + check "$os" "$template" "$rendered" + done + done +done + +echo "# files that aren't templates" +shellcheck .github/*.sh +shellcheck --shell bash --exclude SC1090,SC1091 dot_bashrc # sources files that only exist after apply +for file in dot_config/zsh/*.zsh; do + zsh -n "$file" +done diff --git a/.github/test.sh b/.github/test.sh new file mode 100755 index 0000000..63fac78 --- /dev/null +++ b/.github/test.sh @@ -0,0 +1,141 @@ +#!/bin/bash +# Installs the dotfiles from this checkout the way the README does, then checks +# that applying again changes nothing and that the shells start cleanly with the +# tools from mise. It replaces your dotfiles, so it only runs in CI. +# Usage: .github/test.sh WORK, where WORK is true for a work machine, else false +set -euo pipefail + +if [ "${CI:-}" != true ]; then + echo "This replaces your dotfiles, so it only runs in CI (CI=true)" >&2 + exit 1 +fi +work=$1 +checkout=$(cd "$(dirname "$0")/.." && pwd) +if [ "$work" = true ]; then + bin=$HOME/bin +else + bin=$HOME/.local/bin +fi +export PATH="$bin:$PATH" + +failed=false +fail() { + echo "::error::$*" + failed=true +} + +# Runs a command in a pseudo-terminal, as a terminal emulator would, and prints +# its output without escape sequences +in_pty() { + python3 -c ' +import os, pty, re, signal, sys +signal.alarm(120) # fail instead of hanging if something waits for input +pid, fd = pty.fork() +if pid == 0: + os.execvp(sys.argv[1], sys.argv[1:]) +output = b"" +while True: + try: + data = os.read(fd, 4096) + except OSError: # Linux reports EIO once the command exits + break + if not data: + break + output += data +status = os.waitpid(pid, 0)[1] +sys.stdout.buffer.write(re.sub(rb"\x1b(\[[0-?]*[ -/]*[@-~]|\][^\x07\x1b]*(\x07|\x1b\\)|[=>])|\r", b"", output)) +sys.exit(os.waitstatus_to_exitcode(status)) +' "$@" &1) || [ -n "$output" ]; then + fail "Applying again should do nothing, but printed: $output" +fi +output=$(chezmoi status) +[ -z "$output" ] || fail "chezmoi status should be empty, but printed: $output" +chezmoi verify || fail "chezmoi verify found differences" +mise ls +echo "::endgroup::" + +echo "::group::Check the login shell" +if [ "$(uname)" = Darwin ]; then + login_shell=$(dscl . -read "/Users/$(id -un)" UserShell | awk '{print $2}') +else + login_shell=$(getent passwd "$(id -un)" | cut -d: -f7) +fi +case $login_shell in + */zsh) echo "$login_shell" ;; + *) fail "The login shell is $login_shell, not zsh" ;; +esac +echo "::endgroup::" + +echo "::group::Check zsh" +output=$(in_pty zsh -i -c exit) || fail "zsh -i -c exit failed with $?" +[ -z "$output" ] || fail "zsh printed on startup: $output" +# Prints the problems it finds. It expands in zsh, not here: +# shellcheck disable=SC2016 +zsh_checks=' +mise_installs=${MISE_DATA_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/mise}/installs +tool_version() { + case $1 in + go) go version ;; + tmux) tmux -V ;; + *) $1 --version ;; + esac +} +for tool in "$@"; do + if [[ $commands[$tool] != $mise_installs/* ]]; then + print "$tool should come from mise, but is ${commands[$tool]:-missing}" + elif ! tool_version $tool >/dev/null 2>&1; then + print "$tool doesn'\''t run: $(tool_version $tool 2>&1)" + fi +done +for tool in atuin bat chezmoi delta dust fd gh lsd mise rg starship uv uvx ya yazi zoxide; do + [[ -s ~/.config/zsh/completions/_$tool ]] || print "~/.config/zsh/completions/_$tool is missing" + [[ $_comps[$tool] == _$tool ]] || print "$tool completes with ${_comps[$tool]:-nothing}, not _$tool" +done +[[ $(bindkey -M viins "^F") == *" fzf-file-widget" ]] || print "Ctrl-F: $(bindkey -M viins "^F")" +[[ $(bindkey -M viins "^T") == *" self-insert" ]] || print "Ctrl-T: $(bindkey -M viins "^T")" +[[ $(bindkey -M viins "^R") == *" atuin-"* ]] || print "Ctrl-R: $(bindkey -M viins "^R")" +(( $+functions[__zoxide_z] )) || print "zoxide isn'\''t initialized" +' +tools=(atuin bat copilot delta dust fd fzf gh lazygit lsd node npm nvim rg starship tmux uv uvx ya yazi zoxide) +if [ "$work" != true ]; then + tools+=(go) +fi +output=$(in_pty zsh -i -c "$zsh_checks" zsh "${tools[@]}") || fail "The zsh checks failed with $?" +[ -z "$output" ] || fail "$output" +echo "::endgroup::" + +if [ "$work" = true ]; then + echo "::group::Check bash" + output=$(in_pty bash -i -c true) || fail "bash -i -c true failed with $?" + [ -z "$output" ] || fail "bash printed on startup: $output" + # shellcheck disable=SC2016 # it expands in bash -i, not here + bash_checks=' +for tool in fd fzf node rg zoxide; do + [[ $(type -P $tool) == "$HOME"/.local/share/mise/installs/* ]] || + echo "$tool should come from mise, but is $(type -P $tool)" +done +[[ $(type -t __zoxide_z) == function ]] || echo "zoxide isn'\''t initialized" +bind -X | grep -q __fzf_history__ || echo "Ctrl-R isn'\''t bound to the fzf history widget" +! bind -X | grep -q fzf-file-widget || echo "Ctrl-T shouldn'\''t be bound to the fzf file widget" +' + output=$(in_pty bash -i -c "$bash_checks") || fail "The bash checks failed with $?" + [ -z "$output" ] || fail "$output" + echo "::endgroup::" +fi + +if [ "$failed" = true ]; then + exit 1 +fi +echo "All checks passed" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2b8dc6d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,68 @@ +# Lints the rendered templates and installs the dotfiles on fresh machines +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + persist-credentials: false + # shellcheck, pwsh, python3 and yq come with the runner + - name: Install zsh and chezmoi + run: | + sudo apt-get update + sudo apt-get install -y zsh + sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin" + echo "$HOME/.local/bin" >>"$GITHUB_PATH" + - run: .github/lint.sh + + apply: + name: apply (${{ matrix.name }}) + runs-on: ${{ matrix.os }} + container: ${{ matrix.container }} + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + include: + - name: ubuntu + os: ubuntu-latest + work: false + - name: ubuntu, work + os: ubuntu-latest + work: true + - name: fedora + os: ubuntu-latest + container: fedora:latest + work: false + - name: macos + os: macos-latest + work: false + env: + GITHUB_TOKEN: ${{ github.token }} # raises mise's GitHub API rate limit + steps: + - name: Install Python for the terminal checks + if: matrix.container + run: dnf install -y python3 + - uses: actions/checkout@v7 + with: + persist-credentials: false + - run: .github/test.sh ${{ matrix.work }} diff --git a/README.md b/README.md index a96f270..ff189bd 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,11 @@ The files I think are most notable are listed below: On the first apply, these scripts decrypt the age key with its passphrase using chezmoi's built-in age - Unix-specific: [`run_before_decrypt-private-key-unix.sh.tmpl`](./run_before_decrypt-private-key-unix.sh.tmpl) - Windows-specific: [`run_before_decrypt-private-key-windows.ps1.tmpl`](./run_before_decrypt-private-key-windows.ps1.tmpl) +- CI: [`.github/workflows/ci.yml`](./.github/workflows/ci.yml) + - [`.github/lint.sh`](./.github/lint.sh): renders the templates for each OS and machine type, then checks them with + shellcheck, `zsh -n`, the PowerShell parser, and TOML, YAML and git config parsers. Also runs locally + - [`.github/test.sh`](./.github/test.sh): installs the dotfiles on fresh Ubuntu, Fedora and macOS machines, then + checks that applying again changes nothing and that the shells start cleanly with the tools from mise - Configuration files for software that is not managed with chezmoi: [`reference_dotfiles`](./reference_dotfiles) ## Installation From cbc06e2c50e0bc8e0942d7dd2e0351f5635c1254 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 18:43:05 +0000 Subject: [PATCH 10/76] chezmoi: keep the work setup on the work branch Drop the work machine prompt and everything that depended on it, so main only has my personal setup. lazygit, starship and tmux go back to the plain files main had, along with main's gitconfig. The encryption prompt stays and is now always asked. mise and the tools it installs, including go, are the same on every machine, and mise lives in ~/.local/bin like chezmoi. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoi.yaml.tmpl | 8 +---- .chezmoiignore | 10 ------ .github/lint.sh | 23 +++++-------- .github/test.sh | 34 ++----------------- .github/workflows/ci.yml | 8 +---- README.md | 17 ++++------ dot_bashrc | 33 ------------------ .../lazygit/{config.yml.tmpl => config.yml} | 2 +- dot_config/mise/config.toml.tmpl | 2 -- .../{starship.toml.tmpl => starship.toml} | 4 --- dot_gitconfig.tmpl | 2 +- dot_tmux.conf.tmpl => dot_tmux.conf | 4 +-- dot_zshrc.tmpl | 9 ++--- run_onchange_after_install-tools-unix.sh.tmpl | 2 +- 14 files changed, 28 insertions(+), 130 deletions(-) delete mode 100644 dot_bashrc rename dot_config/lazygit/{config.yml.tmpl => config.yml} (65%) rename dot_config/{starship.toml.tmpl => starship.toml} (94%) rename dot_tmux.conf.tmpl => dot_tmux.conf (96%) diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl index 3b24298..388da44 100644 --- a/.chezmoi.yaml.tmpl +++ b/.chezmoi.yaml.tmpl @@ -1,9 +1,4 @@ -{{- $work := promptBoolOnce . "work" "Is this a work machine" false -}} -{{- /* Work machines don't use the encrypted files */ -}} -{{- $encryption := false -}} -{{- if not $work -}} -{{- $encryption = promptBoolOnce . "encryption" "Decrypt the encrypted files with the key passphrase" true -}} -{{- end -}} +{{- $encryption := promptBoolOnce . "encryption" "Decrypt the encrypted files with the key passphrase" true -}} {{ if eq .chezmoi.os "windows" -}} cd: command: "pwsh" @@ -15,7 +10,6 @@ interpreters: {{ end -}} data: - work: {{ $work }} encryption: {{ $encryption }} diff: pager: "delta" diff --git a/.chezmoiignore b/.chezmoiignore index c8b1b38..79c983d 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -12,7 +12,6 @@ decrypt-private-key-windows.ps1 # unix files {{ if eq .chezmoi.os "windows" -}} -.bashrc .config/atuin .config/mise .config/zsh @@ -36,12 +35,3 @@ install-tools-unix.sh decrypt-private-key-unix.sh decrypt-private-key-windows.ps1 {{- end }} - -# personal or work files -{{ if .work -}} -.alacritty.toml -.config/hatch -.ideavimrc -{{- else -}} -.bashrc -{{- end }} diff --git a/.github/lint.sh b/.github/lint.sh index 07e07be..5716a91 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -1,7 +1,8 @@ #!/bin/bash -# Renders the chezmoi templates for each OS and machine type, then checks the -# results: shellcheck for shell scripts, zsh -n, the PowerShell parser, and TOML, -# YAML and git config syntax. Needs chezmoi, zsh, shellcheck, pwsh, python3 and yq. +# Renders the chezmoi templates for each OS, with and without the encrypted +# files, then checks the results: shellcheck for shell scripts, zsh -n, the +# PowerShell parser, and TOML, YAML and git config syntax. Needs chezmoi, +# zsh, shellcheck, pwsh, python3 and yq. set -euo pipefail cd "$(dirname "$0")/.." @@ -35,20 +36,15 @@ check() { # check OS TEMPLATE RENDERED } for os in "${!os_data[@]}"; do - for machine in personal personal-without-encryption work; do - case $machine in - personal) work=false encryption=true ;; - personal-without-encryption) work=false encryption=false ;; - work) work=true encryption=false ;; - esac - echo "# $os $machine" - chezmoi=(chezmoi --source . --override-data "{\"chezmoi\":${os_data[$os]},\"work\":$work,\"encryption\":$encryption}") + for encryption in true false; do + echo "# $os, encryption: $encryption" + chezmoi=(chezmoi --source . --override-data "{\"chezmoi\":${os_data[$os]},\"encryption\":$encryption}") for template in $(git ls-files '*.tmpl' .chezmoiexternal.toml .chezmoiignore); do - rendered="$out/$os-$machine/${template%.tmpl}" + rendered="$out/$os-$encryption/${template%.tmpl}" mkdir -p "$(dirname "$rendered")" if [ "$template" = .chezmoi.yaml.tmpl ]; then "${chezmoi[@]}" execute-template --init \ - --promptBool "Is this a work machine=$work,Decrypt the encrypted files with the key passphrase=$encryption" \ + --promptBool "Decrypt the encrypted files with the key passphrase=$encryption" \ <"$template" >"$rendered" else "${chezmoi[@]}" execute-template <"$template" >"$rendered" @@ -60,7 +56,6 @@ done echo "# files that aren't templates" shellcheck .github/*.sh -shellcheck --shell bash --exclude SC1090,SC1091 dot_bashrc # sources files that only exist after apply for file in dot_config/zsh/*.zsh; do zsh -n "$file" done diff --git a/.github/test.sh b/.github/test.sh index 63fac78..b1728ab 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -2,20 +2,14 @@ # Installs the dotfiles from this checkout the way the README does, then checks # that applying again changes nothing and that the shells start cleanly with the # tools from mise. It replaces your dotfiles, so it only runs in CI. -# Usage: .github/test.sh WORK, where WORK is true for a work machine, else false set -euo pipefail if [ "${CI:-}" != true ]; then echo "This replaces your dotfiles, so it only runs in CI (CI=true)" >&2 exit 1 fi -work=$1 checkout=$(cd "$(dirname "$0")/.." && pwd) -if [ "$work" = true ]; then - bin=$HOME/bin -else - bin=$HOME/.local/bin -fi +bin=$HOME/.local/bin export PATH="$bin:$PATH" failed=false @@ -53,7 +47,7 @@ mkdir -p "$HOME/.local/share" cp -a "$checkout" "$HOME/.local/share/chezmoi" installer=$(curl -fsLS get.chezmoi.io) # separate so that set -e catches download errors sh -c "$installer" -- -b "$bin" init --apply \ - --promptBool "Is this a work machine=$work,Decrypt the encrypted files with the key passphrase=false" /dev/null && eval "$(pixi completion --shell bash)" - -# Zoxide: https://github.com/ajeetdsouza/zoxide -eval "$(zoxide init bash)" - -# fzf configuration -export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --info=inline' -export FZF_DEFAULT_COMMAND="fd --hidden --follow --exclude '.git'" -export FZF_ALT_C_COMMAND="$FZF_DEFAULT_COMMAND --type d" - -# Use fd for fzf path/dir completion -_fzf_compgen_path() { - fd --hidden --follow --exclude ".git" . "$1" -} -_fzf_compgen_dir() { - fd --type d --hidden --follow --exclude ".git" . "$1" -} - -# Key bindings and ** completion. The empty FZF_CTRL_T_COMMAND skips the file -# widget, which conflicts with the Copilot CLI file picker. -FZF_CTRL_T_COMMAND='' eval "$(fzf --bash)" - -[[ "$TERM_PROGRAM" == "vscode" ]] && source "$(code --locate-shell-integration-path bash)" diff --git a/dot_config/lazygit/config.yml.tmpl b/dot_config/lazygit/config.yml similarity index 65% rename from dot_config/lazygit/config.yml.tmpl rename to dot_config/lazygit/config.yml index 4a39b5f..ba3ded1 100644 --- a/dot_config/lazygit/config.yml.tmpl +++ b/dot_config/lazygit/config.yml @@ -1,4 +1,4 @@ git: - branchPrefix: "{{ if .work }}users/pcreighton/{{ else }}patrick-5546/{{ end }}" + branchPrefix: "patrick-5546/" diffRenderers: - command: delta --dark --paging=never --line-numbers --hyperlinks --hyperlinks-file-link-format="lazygit-edit://{path}:{line}" diff --git a/dot_config/mise/config.toml.tmpl b/dot_config/mise/config.toml.tmpl index a2b3273..e355528 100644 --- a/dot_config/mise/config.toml.tmpl +++ b/dot_config/mise/config.toml.tmpl @@ -12,9 +12,7 @@ dust = "latest" fd = "latest" fzf = "latest" gh = "latest" -{{ if not .work -}} go = "latest" -{{ end -}} lazygit = "latest" lsd = "latest" neovim = "latest" diff --git a/dot_config/starship.toml.tmpl b/dot_config/starship.toml similarity index 94% rename from dot_config/starship.toml.tmpl rename to dot_config/starship.toml index 2b9b17c..8c2cf8a 100644 --- a/dot_config/starship.toml.tmpl +++ b/dot_config/starship.toml @@ -1,7 +1,3 @@ -{{ if .work -}} -command_timeout = 3000 - -{{ end -}} [shell] unknown_indicator = "unknownsh" style = "cyan bold" diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index f4f858c..c48c554 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -1,5 +1,5 @@ [user] - email = {{ if .work }}pcreighton@microsoft.com{{ else }}pcreighton429@gmail.com{{ end }} + email = pcreighton429@gmail.com name = Patrick Creighton [push] autoSetupRemote = true diff --git a/dot_tmux.conf.tmpl b/dot_tmux.conf similarity index 96% rename from dot_tmux.conf.tmpl rename to dot_tmux.conf index 0bf5001..15ac926 100644 --- a/dot_tmux.conf.tmpl +++ b/dot_tmux.conf @@ -67,8 +67,8 @@ set-option -g allow-rename off # enable and configure vi-copy-mode setw -g mode-keys vi bind -T copy-mode-vi v send -X begin-selection -bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel{{ if .work }} "xclip -in -selection clipboard"{{ end }} -bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel{{ if .work }} "xclip -in -selection clipboard"{{ end }} +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel +bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel # TokyoNight colors for Tmux # https://github.com/folke/tokyonight.nvim/blob/main/extras/tmux/tokyonight_moon.tmux diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 5343941..53579cf 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -66,9 +66,7 @@ source $HOME/.config/zsh/aliases.zsh # Environment Variables export PATH=$HOME/.cargo/bin:$PATH -{{- if not .work }} export PATH=$HOME/.local/bin:$PATH -{{- end }} {{- if and (eq .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} export PATH="/mnt/c/Windows/System32:$PATH" {{- end }} @@ -77,7 +75,7 @@ export EDITOR="$VISUAL" export DOCKER_BUILDKIT=1 # Tools installed by mise: https://mise.jdx.dev -eval "$({{ if .work }}$HOME/bin{{ else }}$HOME/.local/bin{{ end }}/mise activate zsh)" +eval "$($HOME/.local/bin/mise activate zsh)" # fzf configuration # Use fd (https://github.com/sharkdp/fd) instead of the default find command for listing path candidates. @@ -113,9 +111,6 @@ source $HOME/.local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh {{- if and .encryption (eq .chezmoi.os "linux") (not (.chezmoi.kernel.osrelease | lower | contains "microsoft")) }} source $HOME/.config/zsh/openvpn3.zsh {{- end }} -{{- if .work }} -[[ -f $HOME/.zshrc.$USER ]] && source $HOME/.zshrc.$USER -{{- end }} # Atuin: https://github.com/atuinsh/atuin eval "$(atuin init zsh --disable-up-arrow --disable-ai)" @@ -124,4 +119,4 @@ eval "$(atuin init zsh --disable-up-arrow --disable-ai)" eval "$(zoxide init zsh)" # Prompt -[[ "$STARSHIP_DISABLE" != "true" ]] && eval "$(starship init zsh)" +eval "$(starship init zsh)" diff --git a/run_onchange_after_install-tools-unix.sh.tmpl b/run_onchange_after_install-tools-unix.sh.tmpl index 174dbcd..0b310b8 100644 --- a/run_onchange_after_install-tools-unix.sh.tmpl +++ b/run_onchange_after_install-tools-unix.sh.tmpl @@ -5,7 +5,7 @@ # mise config hash: {{ includeTemplate "dot_config/mise/config.toml.tmpl" . | sha256sum }} set -euo pipefail -mise="{{ if .work }}$HOME/bin{{ else }}$HOME/.local/bin{{ end }}/mise" +mise="$HOME/.local/bin/mise" if [ ! -x "$mise" ]; then printf "\n# Install mise\n" curl -fsSL https://mise.run | MISE_INSTALL_PATH="$mise" sh From 00139d03210ab844288536cb20c5e0a65d17417f Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 18:44:33 +0000 Subject: [PATCH 11/76] unix: drop Fedora support I don't use Fedora anymore. The packages script only uses apt now, and CI tests Ubuntu 22.04 in a container instead of Fedora, which covers an older glibc and a machine without the runner's preinstalled packages. No template reads the OS release anymore, so lint.sh only sets the kernel release, which is how the templates tell WSL apart from other Linux. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/lint.sh | 6 +++--- .github/workflows/ci.yml | 11 ++++++---- README.md | 21 +++++-------------- ...hange_before_install-packages-unix.sh.tmpl | 7 ------- 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/.github/lint.sh b/.github/lint.sh index 5716a91..c531521 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -7,9 +7,9 @@ set -euo pipefail cd "$(dirname "$0")/.." declare -A os_data=( - [ubuntu]='{"os":"linux","osRelease":{"id":"ubuntu"},"kernel":{"osrelease":"6.8.0-45-generic"}}' - [fedora]='{"os":"linux","osRelease":{"id":"fedora"},"kernel":{"osrelease":"6.11.4-301.fc41.x86_64"}}' - [wsl]='{"os":"linux","osRelease":{"id":"ubuntu"},"kernel":{"osrelease":"5.15.167.4-microsoft-standard-WSL2"}}' + # Templates only read the kernel release to tell WSL apart from other Linux + [linux]='{"os":"linux","kernel":{"osrelease":"6.8.0-generic"}}' + [wsl]='{"os":"linux","kernel":{"osrelease":"5.15.167.4-microsoft-standard-WSL2"}}' [darwin]='{"os":"darwin"}' [windows]='{"os":"windows"}' ) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c753e8..e0566a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,17 +45,20 @@ jobs: include: - name: ubuntu os: ubuntu-latest - - name: fedora + # Ubuntu 22.04 has an older glibc, and the container starts without + # the packages that GitHub's runners come with + - name: ubuntu 22.04 os: ubuntu-latest - container: fedora:latest + container: ubuntu:22.04 - name: macos os: macos-latest env: + DEBIAN_FRONTEND: noninteractive GITHUB_TOKEN: ${{ github.token }} # raises mise's GitHub API rate limit steps: - - name: Install Python for the terminal checks + - name: Install curl and Python for the test if: matrix.container - run: dnf install -y python3 + run: apt-get update && apt-get install -y ca-certificates curl python3 - uses: actions/checkout@v7 with: persist-credentials: false diff --git a/README.md b/README.md index 8fe7d1e..68c78af 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ My cross-platform, cross-shell configuration files and installation scripts managed with [chezmoi](https://www.chezmoi.io/): -- Zsh on Linux: Ubuntu, Fedora, and WSL 2 +- Zsh on Linux: Ubuntu and WSL 2 - Zsh on macOS - PowerShell 7 on Windows 11 @@ -39,8 +39,8 @@ The files I think are most notable are listed below: - [`.github/lint.sh`](./.github/lint.sh): renders the templates for each OS, with and without the encrypted files, then checks them with shellcheck, `zsh -n`, the PowerShell parser, and TOML, YAML and git config parsers. Also runs locally - - [`.github/test.sh`](./.github/test.sh): installs the dotfiles on fresh Ubuntu, Fedora and macOS machines, then - checks that applying again changes nothing and that the shells start cleanly with the tools from mise + - [`.github/test.sh`](./.github/test.sh): installs the dotfiles on fresh Ubuntu (latest and 22.04) and macOS + machines, then checks that applying again changes nothing and that the shells start cleanly with the tools from mise - Configuration files for software that is not managed with chezmoi: [`reference_dotfiles`](./reference_dotfiles) ## Installation @@ -54,7 +54,7 @@ again. 1. Install prerequisites - [curl](https://curl.se/download.html), to install chezmoi - On macOS, git from the Xcode Command Line Tools: `xcode-select --install` - - On Linux, chezmoi installs git, zsh, and the other packages it needs with apt or dnf + - On Linux, chezmoi installs git, zsh, and the other packages it needs with apt 2. Install chezmoi in `~/.local/bin`, pulling and applying the latest changes @@ -66,18 +66,7 @@ again. 3. If desired, manually install software with unique installation instructions - [Alacritty](https://github.com/alacritty/alacritty/blob/master/INSTALL.md) -4. Additional setup for Fedora - 1. [Enable RPM Fusion repositories](https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/) - 2. [Install multimedia plugins](https://docs.fedoraproject.org/en-US/quick-docs/assembly_installing-plugins-for-playing-movies-and-music/) - 3. Configure dnf (run `man dnf.conf` to see options and defaults): append the following lines to `/etc/dnf/dnf.conf` - - ``` - max_parallel_downloads=10 - defaultyes=True - keepcache=True - ``` - -5. Keep everything up to date +4. Keep everything up to date ``` chezmoi update # pull and apply the latest changes diff --git a/run_onchange_before_install-packages-unix.sh.tmpl b/run_onchange_before_install-packages-unix.sh.tmpl index 9cb0431..1bd886f 100644 --- a/run_onchange_before_install-packages-unix.sh.tmpl +++ b/run_onchange_before_install-packages-unix.sh.tmpl @@ -23,12 +23,7 @@ need_lib() { # need_lib LIBRARY PACKAGE need curl need git need zsh -{{- if eq .chezmoi.osRelease.id "fedora" }} -need chsh /usr/bin/chsh # dnf resolves the path; newer Fedora moved chsh to util-linux -need_lib libatomic.so.1 libatomic # Node.js from mise links against it -{{- else }} need_lib libatomic.so.1 libatomic1 # Node.js from mise links against it -{{- end }} {{- if not (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} need fc-cache fontconfig need unzip @@ -39,8 +34,6 @@ if [ ${#missing[@]} -gt 0 ]; then if command -v apt-get >/dev/null 2>&1; then as_root apt-get update as_root apt-get install -y "${missing[@]}" - elif command -v dnf >/dev/null 2>&1; then - as_root dnf install -y "${missing[@]}" else echo "Install ${missing[*]}, then run chezmoi apply again" >&2 exit 1 From dff8e36a06751bbb5ba3ccc3d06f338c6a970224 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 18:45:34 +0000 Subject: [PATCH 12/76] unix: stop installing fonts The dotfiles no longer install the FiraCode Nerd Font, so the packages script no longer needs fontconfig and unzip either. Terminal configs still choose the font; install it separately where it's wanted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 3 +-- ...hange_before_install-packages-unix.sh.tmpl | 22 ++----------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 68c78af..21480d3 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,7 @@ The files I think are most notable are listed below: [`dot_config/mise/config.toml.tmpl`](./dot_config/mise/config.toml.tmpl) - Unix-specific, rerun by chezmoi only when they change: - [`run_onchange_before_install-packages-unix.sh.tmpl`](./run_onchange_before_install-packages-unix.sh.tmpl): - installs the missing system packages, installs the FiraCode Nerd Font on Linux (not WSL), and makes zsh the - login shell. Only uses sudo when something is missing + installs the missing system packages and makes zsh the login shell. Only uses sudo when something is missing - [`run_onchange_after_install-tools-unix.sh.tmpl`](./run_onchange_after_install-tools-unix.sh.tmpl): installs mise and the tools in its config, and generates their zsh completions. Also reruns when the mise config changes diff --git a/run_onchange_before_install-packages-unix.sh.tmpl b/run_onchange_before_install-packages-unix.sh.tmpl index 1bd886f..63dfb1e 100644 --- a/run_onchange_before_install-packages-unix.sh.tmpl +++ b/run_onchange_before_install-packages-unix.sh.tmpl @@ -1,6 +1,6 @@ #!/bin/bash -# Installs the system packages the dotfiles need, adds fonts and makes zsh the -# login shell. chezmoi runs this before applying files and again only when the +# Installs the system packages the dotfiles need and makes zsh the login +# shell. chezmoi runs this before applying files and again only when the # rendered script changes. sudo is only used when something is missing. set -euo pipefail @@ -24,10 +24,6 @@ need curl need git need zsh need_lib libatomic.so.1 libatomic1 # Node.js from mise links against it -{{- if not (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} -need fc-cache fontconfig -need unzip -{{- end }} if [ ${#missing[@]} -gt 0 ]; then printf "\n# Install %s\n" "${missing[*]}" @@ -39,20 +35,6 @@ if [ ${#missing[@]} -gt 0 ]; then exit 1 fi fi -{{- if not (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} - -font_dir="$HOME/.local/share/fonts/FiraCode" -if [ ! -d "$font_dir" ]; then - printf "\n# Install FiraCode Nerd Font\n" - tmp=$(mktemp -d) - trap 'rm -rf "$tmp"' EXIT - curl -fsSL -o "$tmp/FiraCode.zip" https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.zip - unzip -q "$tmp/FiraCode.zip" 'Fira*Mono*.ttf' -d "$tmp/FiraCode" - mkdir -p "$(dirname "$font_dir")" - mv "$tmp/FiraCode" "$font_dir" - fc-cache -f -fi -{{- end }} {{ end -}} change_login_shell() { From b65e39947d0018ce89108fa514f55854000cd2a4 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 18:46:02 +0000 Subject: [PATCH 13/76] Remove the openvpn3 and hatch configs I don't use either anymore. With openvpn3 gone, the SSH config is the only encrypted file the dotfiles apply. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 2 -- dot_config/hatch/config.toml | 9 --------- dot_config/zsh/encrypted_openvpn3.zsh.age | 12 ------------ dot_zshrc.tmpl | 3 --- 4 files changed, 26 deletions(-) delete mode 100644 dot_config/hatch/config.toml delete mode 100644 dot_config/zsh/encrypted_openvpn3.zsh.age diff --git a/.chezmoiignore b/.chezmoiignore index 79c983d..c920769 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -25,12 +25,10 @@ install-tools-unix.sh # linux without WSL files {{ if or (ne .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}} .alacritty.toml -.config/zsh/openvpn3.zsh {{- end }} # encrypted files {{ if not .encryption -}} -.config/zsh/openvpn3.zsh .ssh decrypt-private-key-unix.sh decrypt-private-key-windows.ps1 diff --git a/dot_config/hatch/config.toml b/dot_config/hatch/config.toml deleted file mode 100644 index d41da07..0000000 --- a/dot_config/hatch/config.toml +++ /dev/null @@ -1,9 +0,0 @@ -[template] -name = "Patrick Creighton" -email = "pcreighton429@gmail.com" - -[template.plugins.default] -ci = true - -[dirs.env] -virtual = ".venv" diff --git a/dot_config/zsh/encrypted_openvpn3.zsh.age b/dot_config/zsh/encrypted_openvpn3.zsh.age deleted file mode 100644 index 04ecd05..0000000 --- a/dot_config/zsh/encrypted_openvpn3.zsh.age +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWMVlNSnN2SUUvcVBtL1Jh -enJCZDJIWkJGUFQ3NmxLdjVielAzUFVRaG5vClBSWW9ZRWJLWHF2Y2xsNGNneUdl -RzZ3SkY4MUo0K0RnL2JmS0hQRTE4OG8KLS0tIC8xNXJlVnJUSEplWWFkVW9XczFu -d2lhYUVJN1dwc1g3bS9wUWNnS2Z3NzQKlb80YXvrRHWAtFpSKvF2E3+JKca9Qrx3 -wCkAAFhTp3OuFN3hSfElb+8QKLbN7pUA/O5+2cuKl7CGtUnt/Ob93/RLglpGacyl -wtCLr9uuamwpJQHW2MyyyD8wQj65MrIu7MMMUc04gXEPl5ZZBLn59Db11FfI9qti -c18ynv0AthxOS+s3glTgi6r6C60vamWlS9W/Ycm276P73W4lhsrcEQLdhAyWTLTm -zmvg1ha/bWhPltlQ4609+nX29dClnpjZH50SI7pmmvLCVhb2WPU5c8VIjWrdhlsC -abYQKNhu/NxX6jXs1XkK6f+fuU6cw0Gm38qBfiRFo5oN2DY2Rx9sQUjLG/EC0ljU -lC29p6/moS8KGkTD2/cOq2xdldGDUWGQlSqkSdXG8CENt1CA1iCHkQi3ag== ------END AGE ENCRYPTED FILE----- diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 53579cf..1a9e445 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -108,9 +108,6 @@ bindkey -M viins '^T' self-insert # Other Zsh scripts source $HOME/.local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -{{- if and .encryption (eq .chezmoi.os "linux") (not (.chezmoi.kernel.osrelease | lower | contains "microsoft")) }} -source $HOME/.config/zsh/openvpn3.zsh -{{- end }} # Atuin: https://github.com/atuinsh/atuin eval "$(atuin init zsh --disable-up-arrow --disable-ai)" From 1c32499e9eec1960074029a5693aab4831a751c3 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 18:47:51 +0000 Subject: [PATCH 14/76] mise: make the config a plain file The config had no template logic left, and chezmoi re-add skips templates. As a plain file, a tool added or changed with `mise use -g` (which keeps comments and inline options like libc) can be saved back to the source with `chezmoi re-add ~/.config/mise`. The header now explains where mise installs tools, how they get on PATH, and how to add, update and run tools and update mise itself. lint.sh now checks the syntax of TOML files that aren't templates too. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/lint.sh | 17 ++++++--- README.md | 6 ++-- dot_config/mise/config.toml | 35 +++++++++++++++++++ dot_config/mise/config.toml.tmpl | 25 ------------- run_onchange_after_install-tools-unix.sh.tmpl | 4 +-- 5 files changed, 52 insertions(+), 35 deletions(-) create mode 100644 dot_config/mise/config.toml delete mode 100644 dot_config/mise/config.toml.tmpl diff --git a/.github/lint.sh b/.github/lint.sh index c531521..ccce210 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -1,8 +1,9 @@ #!/bin/bash # Renders the chezmoi templates for each OS, with and without the encrypted -# files, then checks the results: shellcheck for shell scripts, zsh -n, the -# PowerShell parser, and TOML, YAML and git config syntax. Needs chezmoi, -# zsh, shellcheck, pwsh, python3 and yq. +# files, and checks them along with the files that aren't templates: shell +# scripts with shellcheck, zsh files with zsh -n, PowerShell with its parser, +# and TOML, YAML and git config syntax. Needs chezmoi, zsh, shellcheck, pwsh, +# python3 and yq. set -euo pipefail cd "$(dirname "$0")/.." @@ -16,6 +17,10 @@ declare -A os_data=( out=$(mktemp -d) trap 'rm -rf "$out"' EXIT +toml() { # toml FILE + python3 -c 'import sys, tomllib; tomllib.load(open(sys.argv[1], "rb"))' "$1" +} + check() { # check OS TEMPLATE RENDERED case $2 in *.sh.tmpl) [ "$1" = windows ] || shellcheck "$3" ;; @@ -28,8 +33,7 @@ check() { # check OS TEMPLATE RENDERED exit $errors.Count' ;; dot_zshrc.tmpl) [ "$1" = windows ] || zsh -n "$3" ;; - *.toml.tmpl | .chezmoiexternal.toml) - python3 -c 'import sys, tomllib; tomllib.load(open(sys.argv[1], "rb"))' "$3" ;; + *.toml.tmpl | .chezmoiexternal.toml) toml "$3" ;; *.yaml.tmpl | *.yml.tmpl) yq . "$3" >/dev/null ;; dot_gitconfig.tmpl) git config --file "$3" --list >/dev/null ;; esac @@ -59,3 +63,6 @@ shellcheck .github/*.sh for file in dot_config/zsh/*.zsh; do zsh -n "$file" done +for file in $(git ls-files '*.toml' ':!:.chezmoiexternal.toml'); do + toml "$file" +done diff --git a/README.md b/README.md index 21480d3..c66380f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The files I think are most notable are listed below: - Integrated with neovim: uses same theme, seamless navigation between tmux and neovim splits - Installation scripts: improve and standardize the CLI across operating systems - CLI tools are installed and updated with [mise](https://mise.jdx.dev): - [`dot_config/mise/config.toml.tmpl`](./dot_config/mise/config.toml.tmpl) + [`dot_config/mise/config.toml`](./dot_config/mise/config.toml) - Unix-specific, rerun by chezmoi only when they change: - [`run_onchange_before_install-packages-unix.sh.tmpl`](./run_onchange_before_install-packages-unix.sh.tmpl): installs the missing system packages and makes zsh the login shell. Only uses sudo when something is missing @@ -36,8 +36,8 @@ The files I think are most notable are listed below: - Windows-specific: [`run_before_decrypt-private-key-windows.ps1.tmpl`](./run_before_decrypt-private-key-windows.ps1.tmpl) - CI: [`.github/workflows/ci.yml`](./.github/workflows/ci.yml) - [`.github/lint.sh`](./.github/lint.sh): renders the templates for each OS, with and without the encrypted files, - then checks them with shellcheck, `zsh -n`, the PowerShell parser, and TOML, YAML and git config parsers. - Also runs locally + then checks them and the files that aren't templates with shellcheck, `zsh -n`, the PowerShell parser, and + TOML, YAML and git config parsers. Also runs locally - [`.github/test.sh`](./.github/test.sh): installs the dotfiles on fresh Ubuntu (latest and 22.04) and macOS machines, then checks that applying again changes nothing and that the shells start cleanly with the tools from mise - Configuration files for software that is not managed with chezmoi: [`reference_dotfiles`](./reference_dotfiles) diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml new file mode 100644 index 0000000..bb6ce97 --- /dev/null +++ b/dot_config/mise/config.toml @@ -0,0 +1,35 @@ +# Tools that mise (https://mise.jdx.dev) installs. chezmoi applies this file to +# ~/.config/mise/config.toml, and run_onchange_after_install-tools-unix.sh +# installs the tools whenever it changes. +# +# - mise installs the tools in ~/.local/share/mise/installs, and +# `mise activate zsh` in .zshrc puts the versions listed here on PATH. +# - Add or change a tool with `mise use -g TOOL[@VERSION]`, which keeps these +# comments, then save the change with `chezmoi re-add ~/.config/mise`. +# Run a tool once without adding it with `mise exec TOOL@VERSION -- COMMAND`. +# - Update the tools with `mise upgrade` and mise itself with `mise self-update`. +# +# See https://mise.jdx.dev/configuration.html +[tools] +# On Linux, the glibc builds of atuin and yazi need glibc 2.39 (Ubuntu 24.04), +# so use their static musl builds. mise uses glibc builds for the other tools, +# which matters for lsd: its musl build shows uid/gid instead of user names. +atuin = { version = "latest", libc = "musl" } +bat = "latest" +copilot = "latest" +delta = "latest" +dust = "latest" +fd = "latest" +fzf = "latest" +gh = "latest" +go = "latest" +lazygit = "latest" +lsd = "latest" +neovim = "latest" +node = "lts" +ripgrep = "latest" +starship = "latest" +tmux = "latest" +uv = "latest" +yazi = { version = "latest", libc = "musl" } +zoxide = "latest" diff --git a/dot_config/mise/config.toml.tmpl b/dot_config/mise/config.toml.tmpl deleted file mode 100644 index e355528..0000000 --- a/dot_config/mise/config.toml.tmpl +++ /dev/null @@ -1,25 +0,0 @@ -# Tools installed by run_onchange_after_install-tools-unix.sh. -# Update them with `mise upgrade`. See https://mise.jdx.dev/configuration.html -[tools] -# On Linux, the glibc builds of atuin and yazi need glibc 2.39 (Ubuntu 24.04), -# so use their static musl builds. mise uses glibc builds for the other tools, -# which matters for lsd: its musl build shows uid/gid instead of user names. -atuin = { version = "latest", libc = "musl" } -bat = "latest" -copilot = "latest" -delta = "latest" -dust = "latest" -fd = "latest" -fzf = "latest" -gh = "latest" -go = "latest" -lazygit = "latest" -lsd = "latest" -neovim = "latest" -node = "lts" -ripgrep = "latest" -starship = "latest" -tmux = "latest" -uv = "latest" -yazi = { version = "latest", libc = "musl" } -zoxide = "latest" diff --git a/run_onchange_after_install-tools-unix.sh.tmpl b/run_onchange_after_install-tools-unix.sh.tmpl index 0b310b8..0a46aa6 100644 --- a/run_onchange_after_install-tools-unix.sh.tmpl +++ b/run_onchange_after_install-tools-unix.sh.tmpl @@ -1,8 +1,8 @@ #!/bin/bash # Installs mise (https://mise.jdx.dev) and the tools in ~/.config/mise/config.toml, # then generates zsh completions for them. chezmoi runs this after applying -# files and again whenever this script or the rendered mise config changes. -# mise config hash: {{ includeTemplate "dot_config/mise/config.toml.tmpl" . | sha256sum }} +# files and again whenever this script or the mise config changes. +# mise config hash: {{ include "dot_config/mise/config.toml" | sha256sum }} set -euo pipefail mise="$HOME/.local/bin/mise" From 87aa3268d4902e17029d08cf9d52e8631ee82d97 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 18:55:24 +0000 Subject: [PATCH 15/76] zsh: cache compinit and skip Ubuntu's global compinit Ubuntu's /etc/zsh/zshrc runs compinit before ~/.zshrc runs it again with the dotfiles' completions in fpath. The two runs kept replacing each other's ~/.zcompdump, so both rebuilt it in every new shell, which is why caching never worked. ~/.zshenv now sets skip_global_compinit=1, which Ubuntu documents for this. ~/.zshrc now runs the full compinit, with its search for new completions and its security check, only when the dump is missing or a day old, and loads the dump as is with compinit -C otherwise. The tools script deletes the dump after it updates the completions so the next shell picks them up. In a clean Ubuntu 24.04 container this cuts the time to start zsh with the completion setup from about 650 ms to 14 ms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 1 + .github/lint.sh | 2 +- dot_zshenv | 5 +++++ dot_zshrc.tmpl | 22 +++++++++++-------- run_onchange_after_install-tools-unix.sh.tmpl | 1 + 5 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 dot_zshenv diff --git a/.chezmoiignore b/.chezmoiignore index c920769..48be05d 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -16,6 +16,7 @@ decrypt-private-key-windows.ps1 .config/mise .config/zsh .tmux.conf +.zshenv .zshrc decrypt-private-key-unix.sh install-packages-unix.sh diff --git a/.github/lint.sh b/.github/lint.sh index ccce210..78b106e 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -60,7 +60,7 @@ done echo "# files that aren't templates" shellcheck .github/*.sh -for file in dot_config/zsh/*.zsh; do +for file in dot_zshenv dot_config/zsh/*.zsh; do zsh -n "$file" done for file in $(git ls-files '*.toml' ':!:.chezmoiexternal.toml'); do diff --git a/dot_zshenv b/dot_zshenv new file mode 100644 index 0000000..eb43314 --- /dev/null +++ b/dot_zshenv @@ -0,0 +1,5 @@ +# Ubuntu's /etc/zsh/zshrc runs compinit before ~/.zshrc runs it again with the +# dotfiles' completions. The two runs keep replacing each other's dump, so both +# rebuild it in every new shell, and the dump that ~/.zshrc caches would be +# missing the dotfiles' completions. +skip_global_compinit=1 diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 1a9e445..2f496d5 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -5,17 +5,21 @@ autoload -U colors && colors fpath=($HOME/.config/zsh/completions $fpath) autoload -Uz compinit zmodload zsh/complist -compinit +# A full compinit looks for new completions and runs a security check, which is +# slow, so only run it when the dump is missing or a day old. Otherwise load the +# dump as is. install-tools-unix.sh deletes the dump when it updates completions. +() { + setopt local_options extended_glob + if [[ -n $HOME/.zcompdump(#qN.mh-24) ]]; then + compinit -C + else + compinit + # Start a new day even if compinit kept the dump because it was valid + touch -c $HOME/.zcompdump + fi +} # zsh's SCCS completion also claims delta compdef _delta delta -# can't get caching to work -#typeset -i USE_CACHE -#(( $+commands[compaudit] && $+commands[compinit] )) && compaudit | read -ra USE_CACHE -#if (( USE_CACHE )); then -# compinit -#else -# compinit -C -#fi # Set completion style zstyle ':completion:*' menu select diff --git a/run_onchange_after_install-tools-unix.sh.tmpl b/run_onchange_after_install-tools-unix.sh.tmpl index 0a46aa6..fc93d80 100644 --- a/run_onchange_after_install-tools-unix.sh.tmpl +++ b/run_onchange_after_install-tools-unix.sh.tmpl @@ -44,6 +44,7 @@ copy_completion yazi _yazi copy_completion zoxide _zoxide curl -fsSL -o _dust "https://raw.githubusercontent.com/bootandy/dust/v$("$mise" current dust)/completions/_dust" \ || echo "Couldn't download the dust completions" >&2 +rm -f "$HOME/.zcompdump" # so that the next zsh loads the new completions if [ -t 0 ] && ! gh auth status >/dev/null 2>&1; then printf "\n# Log in to GitHub\n" From beabb0029d3cef36e3599edfff79da6b7f0358a2 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 19:11:28 +0000 Subject: [PATCH 16/76] Windows: install the tools with mise Windows and Unix now share dot_config/mise/config.toml: - run_onchange_after_install-tools-windows.ps1 installs mise in ~\.local\bin with its PowerShell installer, then the tools. Like the Unix script, it reruns when the mise config changes. - The PowerShell profile activates mise before starship and zoxide, which mise now installs. - Windows skips atuin, since only zsh uses it. mise already skips tmux there. - chezmoi runs scripts without the profile, so the first apply doesn't print errors for tools that aren't installed yet. - The reference install script and the UniGetUI bundle no longer install the tools that mise manages. - CI applies the dotfiles on Windows too, and lint parses the PowerShell files that aren't templates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoi.yaml.tmpl | 3 +- .chezmoiignore | 2 +- .github/lint.sh | 21 ++- .github/test.ps1 | 72 +++++++ .github/workflows/ci.yml | 8 +- .../Microsoft.PowerShell_profile.ps1 | 5 + README.md | 31 ++- dot_config/mise/config.toml | 12 +- reference_dotfiles/run_install-windows.ps1 | 6 +- reference_dotfiles/wingetui/dev.json | 178 ------------------ ...hange_after_install-tools-windows.ps1.tmpl | 17 ++ 11 files changed, 149 insertions(+), 206 deletions(-) create mode 100644 .github/test.ps1 create mode 100644 run_onchange_after_install-tools-windows.ps1.tmpl diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl index 388da44..d654454 100644 --- a/.chezmoi.yaml.tmpl +++ b/.chezmoi.yaml.tmpl @@ -5,8 +5,9 @@ cd: args: ["-NoLogo", "-NoExit", "-Command", "& {Set-Location $env:HOMEPATH/.local/share/chezmoi}"] interpreters: ps1: + # Skip the profile, which needs the tools that the scripts install command: "pwsh" - args: ["-NoLogo"] + args: ["-NoLogo", "-NoProfile"] {{ end -}} data: diff --git a/.chezmoiignore b/.chezmoiignore index 48be05d..81b37c3 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -8,12 +8,12 @@ reference_dotfiles .config/whkdrc Documents decrypt-private-key-windows.ps1 +install-tools-windows.ps1 {{- end }} # unix files {{ if eq .chezmoi.os "windows" -}} .config/atuin -.config/mise .config/zsh .tmux.conf .zshenv diff --git a/.github/lint.sh b/.github/lint.sh index 78b106e..f922447 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -21,17 +21,19 @@ toml() { # toml FILE python3 -c 'import sys, tomllib; tomllib.load(open(sys.argv[1], "rb"))' "$1" } +ps1() { # ps1 FILE + # shellcheck disable=SC2016 # PowerShell expands these + SCRIPT="$1" pwsh -NoProfile -Command ' + $errors = $null + [void][System.Management.Automation.Language.Parser]::ParseFile($env:SCRIPT, [ref]$null, [ref]$errors) + $errors | ForEach-Object { Write-Error $_.ToString() } + exit $errors.Count' +} + check() { # check OS TEMPLATE RENDERED case $2 in *.sh.tmpl) [ "$1" = windows ] || shellcheck "$3" ;; - *.ps1.tmpl) - # shellcheck disable=SC2016 # PowerShell expands these - [ "$1" != windows ] || SCRIPT="$3" pwsh -NoProfile -Command ' - $errors = $null - [void][System.Management.Automation.Language.Parser]::ParseFile($env:SCRIPT, [ref]$null, [ref]$errors) - $errors | ForEach-Object { Write-Error $_.ToString() } - exit $errors.Count' - ;; + *.ps1.tmpl) [ "$1" != windows ] || ps1 "$3" ;; dot_zshrc.tmpl) [ "$1" = windows ] || zsh -n "$3" ;; *.toml.tmpl | .chezmoiexternal.toml) toml "$3" ;; *.yaml.tmpl | *.yml.tmpl) yq . "$3" >/dev/null ;; @@ -63,6 +65,9 @@ shellcheck .github/*.sh for file in dot_zshenv dot_config/zsh/*.zsh; do zsh -n "$file" done +for file in $(git ls-files '*.ps1'); do + ps1 "$file" +done for file in $(git ls-files '*.toml' ':!:.chezmoiexternal.toml'); do toml "$file" done diff --git a/.github/test.ps1 b/.github/test.ps1 new file mode 100644 index 0000000..7d5324e --- /dev/null +++ b/.github/test.ps1 @@ -0,0 +1,72 @@ +# Installs the dotfiles from this checkout like the README does, then checks that +# applying again changes nothing and that PowerShell starts cleanly with the +# tools from mise. It replaces your dotfiles, so it only runs in CI. +$ErrorActionPreference = 'Stop' + +if ($env:CI -ne 'true') { + throw 'This replaces your dotfiles, so it only runs in CI (CI=true)' +} +$checkout = Split-Path -Parent $PSScriptRoot +$bin = "$HOME\.local\bin" +$env:Path = "$bin;$env:Path" + +$failed = $false +function Fail([string] $Message) { + Write-Host "::error::$Message" + $script:failed = $true +} + +# Runs code in a new PowerShell, which loads the profile like a new terminal +# does, and returns everything it printed +function Invoke-NewPowerShell([string] $Code) { + $encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($Code)) + pwsh -NoLogo -EncodedCommand $encoded 2>&1 | Out-String +} + +Write-Host '::group::Install the dotfiles' +New-Item -ItemType Directory -Force "$HOME\.local\share" | Out-Null +Copy-Item -Recurse -Force $checkout "$HOME\.local\share\chezmoi" +Invoke-Expression "&{$(Invoke-RestMethod https://get.chezmoi.io/ps1)} -b '$bin'" +chezmoi init --apply --promptBool 'Decrypt the encrypted files with the key passphrase=false' +if ($LASTEXITCODE -ne 0) { throw "chezmoi init --apply failed with exit code $LASTEXITCODE" } +Write-Host '::endgroup::' + +Write-Host '::group::Check chezmoi' +$output = chezmoi apply 2>&1 | Out-String +if ($LASTEXITCODE -ne 0 -or $output.Trim()) { + Fail "Applying again should do nothing, but printed: $output" +} +$output = chezmoi status 2>&1 | Out-String +if ($output.Trim()) { Fail "chezmoi status should be empty, but printed: $output" } +chezmoi verify +if ($LASTEXITCODE -ne 0) { Fail 'chezmoi verify found differences' } +mise ls +Write-Host '::endgroup::' + +Write-Host '::group::Check PowerShell' +$output = Invoke-NewPowerShell 'exit' +if ($LASTEXITCODE -ne 0 -or $output.Trim()) { Fail "PowerShell printed on startup: $output" } +# Prints the problems it finds +$checks = @' +$installs = Join-Path $env:LOCALAPPDATA 'mise\installs' +$tools = 'bat', 'copilot', 'delta', 'dust', 'fd', 'fzf', 'gh', 'go', 'lazygit', 'lsd', + 'node', 'npm', 'nvim', 'rg', 'starship', 'uv', 'uvx', 'ya', 'yazi', 'zoxide' +foreach ($tool in $tools) { + $source = (Get-Command $tool -ErrorAction Ignore | Select-Object -First 1).Source + if ($source -notlike "$installs\*") { + "$tool should come from mise, but is $(if ($source) { $source } else { 'missing' })" + continue + } + $version = if ($tool -eq 'go') { & $tool version 2>&1 } else { & $tool --version 2>&1 } + if ($LASTEXITCODE -ne 0) { "$tool doesn't run: $version" } +} +if (-not (Get-Command __zoxide_z -ErrorAction Ignore)) { "zoxide isn't initialized" } +'@ +$output = Invoke-NewPowerShell $checks +if ($LASTEXITCODE -ne 0 -or $output.Trim()) { Fail "The PowerShell checks failed: $output" } +Write-Host '::endgroup::' + +if ($failed) { + exit 1 +} +Write-Host 'All checks passed' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0566a6..ec60123 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,8 @@ jobs: container: ubuntu:22.04 - name: macos os: macos-latest + - name: windows + os: windows-latest env: DEBIAN_FRONTEND: noninteractive GITHUB_TOKEN: ${{ github.token }} # raises mise's GitHub API rate limit @@ -62,4 +64,8 @@ jobs: - uses: actions/checkout@v7 with: persist-credentials: false - - run: .github/test.sh + - if: runner.os != 'Windows' + run: .github/test.sh + - if: runner.os == 'Windows' + shell: pwsh + run: .github/test.ps1 diff --git a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 index d14eb44..fb81976 100644 --- a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 +++ b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 @@ -41,6 +41,11 @@ $env:YAZI_FILE_ONE = "C:\Program Files\Git\usr\bin\file.exe" $env:YAZI_CONFIG_HOME = Join-Path $HOME ".config\yazi" $env:XDG_CONFIG_HOME = Join-Path $HOME ".config" +# Tools installed by mise: https://mise.jdx.dev +# Before starship and zoxide, which it puts on PATH. Starship replaces mise's +# prompt hook, but mise still updates PATH on cd and after mise commands +(& "$HOME\.local\bin\mise.exe" activate pwsh) | Out-String | Invoke-Expression + # Prompt Invoke-Expression (&starship init powershell) diff --git a/README.md b/README.md index c66380f..62982ab 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,14 @@ The files I think are most notable are listed below: installs mise and the tools in its config, and generates their zsh completions. Also reruns when the mise config changes - Plugins cloned from git: [`.chezmoiexternal.toml`](./.chezmoiexternal.toml) - - Windows-specific: [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1) - - To see what software is installed, search for `wingetInstallIfNotInstalled`, `choco install`, and `Install-Module` - - I don't use this script anymore, in favor of [UniGetUI](https://github.com/Devolutions/UniGetUI) - (formerly WingetUI): [`wingetui/`](./reference_dotfiles/wingetui/) + - Windows-specific: + - [`run_onchange_after_install-tools-windows.ps1.tmpl`](./run_onchange_after_install-tools-windows.ps1.tmpl): + installs mise and the tools in its config. Reruns when it or the mise config changes + - [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1): installs the other software I use + - To see what software is installed, search for `wingetInstallIfNotInstalled`, `choco install`, and + `Install-Module` + - I don't use this script anymore, in favor of [UniGetUI](https://github.com/Devolutions/UniGetUI) + (formerly WingetUI): [`wingetui/`](./reference_dotfiles/wingetui/) - Encryption scripts: files with sensitive information are [encrypted](https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/) with age. On the first apply, these scripts decrypt the age key with its passphrase using chezmoi's built-in age @@ -38,8 +42,9 @@ The files I think are most notable are listed below: - [`.github/lint.sh`](./.github/lint.sh): renders the templates for each OS, with and without the encrypted files, then checks them and the files that aren't templates with shellcheck, `zsh -n`, the PowerShell parser, and TOML, YAML and git config parsers. Also runs locally - - [`.github/test.sh`](./.github/test.sh): installs the dotfiles on fresh Ubuntu (latest and 22.04) and macOS - machines, then checks that applying again changes nothing and that the shells start cleanly with the tools from mise + - [`.github/test.sh`](./.github/test.sh) and [`.github/test.ps1`](./.github/test.ps1): install the dotfiles on + fresh Ubuntu (latest and 22.04), macOS and Windows machines, then check that applying again changes nothing and + that the shells start cleanly with the tools from mise - Configuration files for software that is not managed with chezmoi: [`reference_dotfiles`](./reference_dotfiles) ## Installation @@ -90,7 +95,19 @@ again. chezmoi init --apply patrick-5546 ``` -4. Optional: run [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1) to match my unix developer experience + - This also installs mise in `~\.local\bin` and the tools in its config. Open a new terminal to start using them + +4. Keep everything up to date + + ``` + chezmoi update # pull and apply the latest changes + mise upgrade # upgrade the tools + mise self-update # upgrade mise + ``` + + - Upgrade chezmoi and git with winget or UniGetUI + +5. Optional: run [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1) to install the other software I use - Prerequisite: `winget install --exact --id gerardog.gsudo --interactive` - Note: I do not run this automatically anymore because I do most of my development through WSL or VS Code. Instead, I now manage the software I want through [UniGetUI](https://github.com/Devolutions/UniGetUI) whenever possible diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index bb6ce97..7359bc3 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -1,9 +1,10 @@ # Tools that mise (https://mise.jdx.dev) installs. chezmoi applies this file to -# ~/.config/mise/config.toml, and run_onchange_after_install-tools-unix.sh -# installs the tools whenever it changes. +# ~/.config/mise/config.toml, and the run_onchange_after_install-tools scripts +# install the tools whenever it changes. # -# - mise installs the tools in ~/.local/share/mise/installs, and -# `mise activate zsh` in .zshrc puts the versions listed here on PATH. +# - mise installs the tools in ~/.local/share/mise/installs, or +# %LOCALAPPDATA%\mise\installs on Windows. `mise activate` in .zshrc and the +# PowerShell profile puts the versions listed here on PATH. # - Add or change a tool with `mise use -g TOOL[@VERSION]`, which keeps these # comments, then save the change with `chezmoi re-add ~/.config/mise`. # Run a tool once without adding it with `mise exec TOOL@VERSION -- COMMAND`. @@ -14,7 +15,8 @@ # On Linux, the glibc builds of atuin and yazi need glibc 2.39 (Ubuntu 24.04), # so use their static musl builds. mise uses glibc builds for the other tools, # which matters for lsd: its musl build shows uid/gid instead of user names. -atuin = { version = "latest", libc = "musl" } +# Only zsh uses atuin, so Windows skips it. mise already skips tmux there. +atuin = { version = "latest", libc = "musl", os = ["linux", "macos"] } bat = "latest" copilot = "latest" delta = "latest" diff --git a/reference_dotfiles/run_install-windows.ps1 b/reference_dotfiles/run_install-windows.ps1 index b6496a4..0150797 100644 --- a/reference_dotfiles/run_install-windows.ps1 +++ b/reference_dotfiles/run_install-windows.ps1 @@ -5,7 +5,7 @@ gsudo { Update-Module Write-Host "`nInstall choco packages" - choco install bat delta dust fd fzf lf mingw ripgrep starship -y + choco install lf mingw -y Write-Host "`nInstall modules" Install-Module git-aliases -Scope CurrentUser -Allowclobber @@ -26,22 +26,18 @@ function wingetInstallIfNotInstalled($id) { Write-Host("") } wingetInstallIfNotInstalled("7zip.7zip") -wingetInstallIfNotInstalled("ajeetdsouza.zoxide") wingetInstallIfNotInstalled("Bitwarden.Bitwarden") wingetInstallIfNotInstalled("code52.Carnac") wingetInstallIfNotInstalled("Discord.Discord") wingetInstallIfNotInstalled("Docker.DockerDesktop") wingetInstallIfNotInstalled("Git.Git") wingetInstallIfNotInstalled("gerardog.gsudo") -wingetInstallIfNotInstalled("JesseDuffield.lazygit") wingetInstallIfNotInstalled("Logitech.GHUB") wingetInstallIfNotInstalled("Logitech.LogiBolt") wingetInstallIfNotInstalled("Logitech.LogiTune") wingetInstallIfNotInstalled("Logitech.OptionsPlus") wingetInstallIfNotInstalled("Logitech.UnifyingSoftware") -wingetInstallIfNotInstalled("Neovim.Neovim") wingetInstallIfNotInstalled("Nextcloud.NextcloudDesktop") -wingetInstallIfNotInstalled("OpenJS.NodeJS.LTS") wingetInstallIfNotInstalled("OpenVPNTechnologies.OpenVPNConnect") wingetInstallIfNotInstalled("Poly.PlantronicsHub") wingetInstallIfNotInstalled("SlackTechnologies.Slack") diff --git a/reference_dotfiles/wingetui/dev.json b/reference_dotfiles/wingetui/dev.json index f549b79..d36b01b 100644 --- a/reference_dotfiles/wingetui/dev.json +++ b/reference_dotfiles/wingetui/dev.json @@ -45,30 +45,6 @@ "IgnoredVersion": "" } }, - { - "Id": "dandavison.delta", - "Name": "delta", - "Version": "0.17.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [ - "" - ], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, { "Id": "Docker.DockerDesktop", "Name": "Docker Desktop", @@ -91,28 +67,6 @@ "IgnoredVersion": "" } }, - { - "Id": "sharkdp.fd", - "Name": "fd", - "Version": "9.0.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, { "Id": "Git.Git", "Name": "Git", @@ -135,28 +89,6 @@ "IgnoredVersion": "" } }, - { - "Id": "JesseDuffield.lazygit", - "Name": "lazygit", - "Version": "0.41.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, { "Id": "LLVM.LLVM", "Name": "LLVM", @@ -179,72 +111,6 @@ "IgnoredVersion": "" } }, - { - "Id": "Neovim.Neovim", - "Name": "Neovim", - "Version": "0.9.5", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "BurntSushi.ripgrep.MSVC", - "Name": "RipGrep MSVC", - "Version": "14.1.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Starship.Starship", - "Name": "starship", - "Version": "1.18.2", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "1.18.1" - } - }, { "Id": "Microsoft.WindowsTerminal", "Name": "Windows Terminal", @@ -266,50 +132,6 @@ "UpdatesIgnored": false, "IgnoredVersion": "" } - }, - { - "Id": "junegunn.fzf", - "Name": "fzf", - "Version": "0.52.1", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "ajeetdsouza.zoxide", - "Name": "zoxide", - "Version": "0.9.4", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } } ], "incompatible_packages_info": "Incompatible packages cannot be installed from WingetUI, but they have been listed here for logging purposes.", diff --git a/run_onchange_after_install-tools-windows.ps1.tmpl b/run_onchange_after_install-tools-windows.ps1.tmpl new file mode 100644 index 0000000..7ffbca4 --- /dev/null +++ b/run_onchange_after_install-tools-windows.ps1.tmpl @@ -0,0 +1,17 @@ +# Installs mise (https://mise.jdx.dev) and the tools in ~/.config/mise/config.toml. +# chezmoi runs this after applying files and again whenever this script or the +# mise config changes. +# mise config hash: {{ include "dot_config/mise/config.toml" | sha256sum }} +$ErrorActionPreference = 'Stop' + +$mise = "$HOME\.local\bin\mise.exe" +if (-not (Test-Path $mise -PathType Leaf)) { + Write-Host "`n# Install mise" + # The installer also adds ~\.local\bin to the user Path + $env:MISE_INSTALL_PATH = $mise + Invoke-RestMethod https://mise.run/powershell | Invoke-Expression +} + +Write-Host "`n# Install tools with mise" +& $mise install +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } From 22bfdeaf84d085a43e86e813b22ed6d9e50f06af Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 19:29:47 +0000 Subject: [PATCH 17/76] mise: pin the tools with a lockfile mise.lock records the version, URL and checksum of each tool for Linux (x64 and arm64), Apple silicon Macs and Windows, so every machine installs the same builds and `chezmoi update` carries upgrades to the others. The install scripts use `mise install --locked` and rerun when the lock changes. To upgrade, run `mise upgrade`, `chezmoi re-add ~/.config/mise` and commit. To roll back, revert that commit. atuin and uv record GitHub attestations. gh's entry has none because the sandbox that generated the lock couldn't download its attestation bundle; it gets one when gh is next upgraded. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/lint.sh | 2 +- README.md | 27 +- dot_config/mise/config.toml | 27 +- dot_config/mise/mise.lock | 469 ++++++++++++++++++ run_onchange_after_install-tools-unix.sh.tmpl | 6 +- ...hange_after_install-tools-windows.ps1.tmpl | 8 +- 6 files changed, 515 insertions(+), 24 deletions(-) create mode 100644 dot_config/mise/mise.lock diff --git a/.github/lint.sh b/.github/lint.sh index f922447..5f86ec1 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -68,6 +68,6 @@ done for file in $(git ls-files '*.ps1'); do ps1 "$file" done -for file in $(git ls-files '*.toml' ':!:.chezmoiexternal.toml'); do +for file in $(git ls-files '*.toml' '*.lock' ':!:.chezmoiexternal.toml'); do toml "$file" done diff --git a/README.md b/README.md index 62982ab..7082ff9 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,19 @@ The files I think are most notable are listed below: - Integrated with neovim: uses same theme, seamless navigation between tmux and neovim splits - Installation scripts: improve and standardize the CLI across operating systems - CLI tools are installed and updated with [mise](https://mise.jdx.dev): - [`dot_config/mise/config.toml`](./dot_config/mise/config.toml) + [`dot_config/mise/config.toml`](./dot_config/mise/config.toml), with their versions pinned in + [`mise.lock`](./dot_config/mise/mise.lock) - Unix-specific, rerun by chezmoi only when they change: - [`run_onchange_before_install-packages-unix.sh.tmpl`](./run_onchange_before_install-packages-unix.sh.tmpl): installs the missing system packages and makes zsh the login shell. Only uses sudo when something is missing - [`run_onchange_after_install-tools-unix.sh.tmpl`](./run_onchange_after_install-tools-unix.sh.tmpl): installs mise and the tools in its config, and generates their zsh completions. - Also reruns when the mise config changes + Also reruns when the mise config or `mise.lock` changes - Plugins cloned from git: [`.chezmoiexternal.toml`](./.chezmoiexternal.toml) - Windows-specific: - [`run_onchange_after_install-tools-windows.ps1.tmpl`](./run_onchange_after_install-tools-windows.ps1.tmpl): - installs mise and the tools in its config. Reruns when it or the mise config changes + installs mise and the tools in its config. + Reruns when it, the mise config or `mise.lock` changes - [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1): installs the other software I use - To see what software is installed, search for `wingetInstallIfNotInstalled`, `choco install`, and `Install-Module` @@ -73,12 +75,15 @@ again. 4. Keep everything up to date ``` - chezmoi update # pull and apply the latest changes - mise upgrade # upgrade the tools - mise self-update # upgrade mise - chezmoi upgrade # upgrade chezmoi + chezmoi update # pull and apply the latest changes + mise upgrade # upgrade the tools, which updates mise.lock + chezmoi re-add ~/.config/mise # save mise.lock, then commit and push it + mise self-update # upgrade mise + chezmoi upgrade # upgrade chezmoi ``` + - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` + ### PowerShell 7 on Windows 1. Install PowerShell 7 from the Microsoft Store @@ -100,11 +105,13 @@ again. 4. Keep everything up to date ``` - chezmoi update # pull and apply the latest changes - mise upgrade # upgrade the tools - mise self-update # upgrade mise + chezmoi update # pull and apply the latest changes + mise upgrade # upgrade the tools, which updates mise.lock + chezmoi re-add ~/.config/mise # save mise.lock, then commit and push it + mise self-update # upgrade mise ``` + - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - Upgrade chezmoi and git with winget or UniGetUI 5. Optional: run [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1) to install the other software I use diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index 7359bc3..a28f6f8 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -1,16 +1,27 @@ -# Tools that mise (https://mise.jdx.dev) installs. chezmoi applies this file to -# ~/.config/mise/config.toml, and the run_onchange_after_install-tools scripts -# install the tools whenever it changes. +# Tools that mise (https://mise.jdx.dev) installs. chezmoi applies this file and +# mise.lock to ~/.config/mise, and the run_onchange_after_install-tools scripts +# install the tools whenever either changes. # # - mise installs the tools in ~/.local/share/mise/installs, or # %LOCALAPPDATA%\mise\installs on Windows. `mise activate` in .zshrc and the -# PowerShell profile puts the versions listed here on PATH. -# - Add or change a tool with `mise use -g TOOL[@VERSION]`, which keeps these -# comments, then save the change with `chezmoi re-add ~/.config/mise`. -# Run a tool once without adding it with `mise exec TOOL@VERSION -- COMMAND`. -# - Update the tools with `mise upgrade` and mise itself with `mise self-update`. +# PowerShell profile puts the versions in mise.lock on PATH. +# - mise.lock pins the version, URL and checksum of each tool, so that every +# machine installs the same builds. The install scripts only install what it +# lists (`mise install --locked`). +# - Add or change a tool with `mise use -g TOOL[@VERSION]`, and update the tools +# with `mise upgrade`. Both keep these comments and update mise.lock. After +# editing this file by hand, update mise.lock with `mise lock --global`. Then +# save the changes with `chezmoi re-add ~/.config/mise`, and commit them. +# - Roll back an update by reverting its commit and running `chezmoi apply`. +# - Run a tool once without adding it with `mise exec TOOL@VERSION -- COMMAND`, +# and update mise itself with `mise self-update`. # # See https://mise.jdx.dev/configuration.html +[settings] +# Platforms that mise.lock has downloads for. To set up another kind of machine, +# add its platform and run `mise lock --global`. +lockfile_platforms = ["linux-arm64", "linux-x64", "macos-arm64", "windows-x64"] + [tools] # On Linux, the glibc builds of atuin and yazi need glibc 2.39 (Ubuntu 24.04), # so use their static musl builds. mise uses glibc builds for the other tools, diff --git a/dot_config/mise/mise.lock b/dot_config/mise/mise.lock new file mode 100644 index 0000000..7e9e882 --- /dev/null +++ b/dot_config/mise/mise.lock @@ -0,0 +1,469 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html + +lockfile_version = 4 + +[[tools.atuin]] +version = "18.24.5" +backend = "aqua:atuinsh/atuin" +specifiers = ["latest"] + +[tools.atuin.options] +libc = "musl" + +[tools.atuin."platforms.linux-arm64"] +checksum = "sha256:b44b3f264652b847b2e524ec397aa498c13076ed75cf213239ed2b9a0de2f99d" +url = "https://github.com/atuinsh/atuin/releases/download/v18.24.5/atuin-aarch64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/atuinsh/atuin/releases/assets/707958969" +provenance = "github-attestations" + +[tools.atuin."platforms.linux-x64"] +checksum = "sha256:54182762c9d91a4f779748f622749ff6963956db005feb13e62d037196b05618" +url = "https://github.com/atuinsh/atuin/releases/download/v18.24.5/atuin-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/atuinsh/atuin/releases/assets/707959222" +provenance = "github-attestations" + +[tools.atuin."platforms.macos-arm64"] +checksum = "sha256:644e92d5667e2ebbc00758c71d5974bc907d238eaa6cdc32b24eb73dce7f9a5a" +url = "https://github.com/atuinsh/atuin/releases/download/v18.24.5/atuin-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/atuinsh/atuin/releases/assets/707958967" +provenance = "github-attestations" + +[[tools.bat]] +version = "0.26.1" +backend = "aqua:sharkdp/bat" +specifiers = ["latest"] + +[tools.bat."platforms.linux-arm64"] +checksum = "sha256:422eb73e11c854fddd99f5ca8461c2f1d6e6dce0a2a8c3d5daade5ffcb6564aa" +url = "https://github.com/sharkdp/bat/releases/download/v0.26.1/bat-v0.26.1-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/sharkdp/bat/releases/assets/323548647" + +[tools.bat."platforms.linux-x64"] +checksum = "sha256:726f04c8f576a7fd18b7634f1bbf2f915c43494c1c0f013baa3287edb0d5a2a3" +url = "https://github.com/sharkdp/bat/releases/download/v0.26.1/bat-v0.26.1-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/sharkdp/bat/releases/assets/323549181" + +[tools.bat."platforms.macos-arm64"] +checksum = "sha256:e30beff26779c9bf60bb541e1d79046250cb74378f2757f8eb250afddb19e114" +url = "https://github.com/sharkdp/bat/releases/download/v0.26.1/bat-v0.26.1-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/sharkdp/bat/releases/assets/323548442" + +[tools.bat."platforms.windows-x64"] +checksum = "sha256:0f729b4b6f5f28d395c641eacc2e9ff68d0096b85aa0eec344aa62425144b69b" +url = "https://github.com/sharkdp/bat/releases/download/v0.26.1/bat-v0.26.1-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/sharkdp/bat/releases/assets/323549116" + +[[tools.copilot]] +version = "1.0.108" +backend = "aqua:github/copilot-cli" +specifiers = ["latest"] + +[tools.copilot."platforms.linux-arm64"] +checksum = "sha256:b0c78c49543bb8a1163e812dcd0601a5ff1ffc067889add6351b0568d76772e6" +url = "https://github.com/github/copilot-cli/releases/download/v1.0.108/copilot-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/github/copilot-cli/releases/assets/728128470" + +[tools.copilot."platforms.linux-x64"] +checksum = "sha256:4c14e320c5cd10234ad56cba855509206e4518e1c04a780ac05a8e1c124bd97d" +url = "https://github.com/github/copilot-cli/releases/download/v1.0.108/copilot-linux-x64.tar.gz" +url_api = "https://api.github.com/repos/github/copilot-cli/releases/assets/728129070" + +[tools.copilot."platforms.macos-arm64"] +checksum = "sha256:567198e7cd947f5b05bef7f036116e6286ddcd8286ec45830082b28c664dbfb0" +url = "https://github.com/github/copilot-cli/releases/download/v1.0.108/copilot-darwin-arm64.tar.gz" +url_api = "https://api.github.com/repos/github/copilot-cli/releases/assets/728128461" + +[tools.copilot."platforms.windows-x64"] +checksum = "sha256:3b1fc7791c6c0d199d68b3469ee65fb2cedf46f06c13978109796742f2b86229" +url = "https://github.com/github/copilot-cli/releases/download/v1.0.108/copilot-win32-x64.zip" +url_api = "https://api.github.com/repos/github/copilot-cli/releases/assets/728128471" + +[[tools.delta]] +version = "0.20.1" +backend = "aqua:dandavison/delta" +specifiers = ["latest"] + +[tools.delta."platforms.linux-arm64"] +checksum = "sha256:da7f4338f593572ff426ae153e0870e2fdc72729416eff551b40cdeb67940db8" +url = "https://github.com/dandavison/delta/releases/download/0.20.1/delta-0.20.1-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/dandavison/delta/releases/assets/610499593" + +[tools.delta."platforms.linux-x64"] +checksum = "sha256:50f08c879f84c81ceb220e476491a7f492d2c9c671e79918cc44badf961a6240" +url = "https://github.com/dandavison/delta/releases/download/0.20.1/delta-0.20.1-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/dandavison/delta/releases/assets/610498121" + +[tools.delta."platforms.macos-arm64"] +checksum = "sha256:bc1839cea69288d4673a24faffbb825d408ca907e0f7d33b1678c9e6cdd5e58e" +url = "https://github.com/dandavison/delta/releases/download/0.20.1/delta-0.20.1-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/dandavison/delta/releases/assets/610498923" + +[tools.delta."platforms.windows-x64"] +checksum = "sha256:c9af7484b33f1dbc1312a892fc7d5753a6d3365140a4000d49e575a2de742c25" +url = "https://github.com/dandavison/delta/releases/download/0.20.1/delta-0.20.1-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/dandavison/delta/releases/assets/610501426" + +[[tools.dust]] +version = "1.2.7" +backend = "aqua:bootandy/dust" +specifiers = ["latest"] + +[tools.dust."platforms.linux-arm64"] +checksum = "sha256:64496fe9e56dabb379308b3a079816818f6022d0b93638d06206a9144ca795d9" +url = "https://github.com/bootandy/dust/releases/download/v1.2.7/dust-v1.2.7-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/bootandy/dust/releases/assets/699455926" + +[tools.dust."platforms.linux-x64"] +checksum = "sha256:ec3bf712c660dcaa5578b996741f5cca36b30c021c1e4b49352b11137a95a96e" +url = "https://github.com/bootandy/dust/releases/download/v1.2.7/dust-v1.2.7-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/bootandy/dust/releases/assets/699456259" + +[tools.dust."platforms.macos-arm64"] +checksum = "sha256:38e1b3b4e5e6a5cdb044b5fdb32ea45f18dc78276711796214806f20f7705a99" +url = "https://github.com/bootandy/dust/releases/download/v1.2.7/dust-v1.2.7-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/bootandy/dust/releases/assets/699455834" + +[tools.dust."platforms.windows-x64"] +checksum = "sha256:d07a41521958895e701ad55f342302b7362799d6a328c843e8e2208ba0564c30" +url = "https://github.com/bootandy/dust/releases/download/v1.2.7/dust-v1.2.7-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/bootandy/dust/releases/assets/699459326" + +[[tools.fd]] +version = "10.5.2" +backend = "aqua:sharkdp/fd" +specifiers = ["latest"] + +[tools.fd."platforms.linux-arm64"] +checksum = "sha256:4b144f38bd7352cd4c95020b58e8e575476e60edcdf1dc5e0733e3d01efba6dd" +url = "https://github.com/sharkdp/fd/releases/download/v10.5.2/fd-v10.5.2-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/sharkdp/fd/releases/assets/719978299" + +[tools.fd."platforms.linux-x64"] +checksum = "sha256:985e24041e9ef6e9a38e9e088743405dde23d7220aa96740f091862167d9ff28" +url = "https://github.com/sharkdp/fd/releases/download/v10.5.2/fd-v10.5.2-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/sharkdp/fd/releases/assets/719976301" + +[tools.fd."platforms.macos-arm64"] +checksum = "sha256:81bf98a16d3d7230e4a9123fcede243d71ea31a577113476ed43f1cdf4773162" +url = "https://github.com/sharkdp/fd/releases/download/v10.5.2/fd-v10.5.2-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/sharkdp/fd/releases/assets/719971048" + +[tools.fd."platforms.windows-x64"] +checksum = "sha256:7edac75ef96b7e9a01ebb251a21ee86ea365a09adcfb865f1ec3346a906153b6" +url = "https://github.com/sharkdp/fd/releases/download/v10.5.2/fd-v10.5.2-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/sharkdp/fd/releases/assets/719974267" + +[[tools.fzf]] +version = "0.75.0" +backend = "aqua:junegunn/fzf" +specifiers = ["latest"] + +[tools.fzf."platforms.linux-arm64"] +checksum = "sha256:bd0717badb6a5620387e014bb94209aac4d9eab6ab77b5348eabb0833aeb4d59" +url = "https://github.com/junegunn/fzf/releases/download/v0.75.0/fzf-0.75.0-linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/junegunn/fzf/releases/assets/720590838" + +[tools.fzf."platforms.linux-x64"] +checksum = "sha256:0d6640f83582d991cf429754baad64b07e3a4e439a6019670f4b91da1314141c" +url = "https://github.com/junegunn/fzf/releases/download/v0.75.0/fzf-0.75.0-linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/junegunn/fzf/releases/assets/720590794" + +[tools.fzf."platforms.macos-arm64"] +checksum = "sha256:1e76698eb481436e42119bea6aa6e2bd9552ff090789d769c286e3c3a4e0ded6" +url = "https://github.com/junegunn/fzf/releases/download/v0.75.0/fzf-0.75.0-darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/junegunn/fzf/releases/assets/720590797" + +[tools.fzf."platforms.windows-x64"] +checksum = "sha256:e3fb809d48094bea7f9f4df03b2fea33ae6e28a6cd32fdad9970cd79e1103901" +url = "https://github.com/junegunn/fzf/releases/download/v0.75.0/fzf-0.75.0-windows_amd64.zip" +url_api = "https://api.github.com/repos/junegunn/fzf/releases/assets/720590885" + +[[tools.gh]] +version = "2.103.3" +backend = "aqua:cli/cli" +specifiers = ["latest"] + +[tools.gh."platforms.linux-arm64"] +checksum = "sha256:ee32df2323c8847f5fac6cb6b4b69ca75828e9329a8f22f677021f7b3306ce63" +url = "https://github.com/cli/cli/releases/download/v2.103.3/gh_2.103.3_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/cli/cli/releases/assets/679195636" + +[tools.gh."platforms.linux-x64"] +checksum = "sha256:4c806978ffce1cec70853302a56d70ac6da4f19bae7adca4e1a8ab00633dd91d" +url = "https://github.com/cli/cli/releases/download/v2.103.3/gh_2.103.3_linux_amd64.tar.gz" +url_api = "https://api.github.com/repos/cli/cli/releases/assets/679195621" + +[tools.gh."platforms.macos-arm64"] +checksum = "sha256:d700207eae9ae98fe2b89535c2c087c07823d4628c56364695a5a07ef311c062" +url = "https://github.com/cli/cli/releases/download/v2.103.3/gh_2.103.3_macOS_arm64.zip" +url_api = "https://api.github.com/repos/cli/cli/releases/assets/679195704" + +[tools.gh."platforms.windows-x64"] +checksum = "sha256:98d0cfa794721665d7973dd728c78aff7bd836d58f10f6d7a03568eccb0a22e0" +url = "https://github.com/cli/cli/releases/download/v2.103.3/gh_2.103.3_windows_amd64.zip" +url_api = "https://api.github.com/repos/cli/cli/releases/assets/679195750" + +[[tools.go]] +version = "1.27.4" +backend = "core:go" +specifiers = ["latest"] + +[tools.go."platforms.linux-arm64"] +checksum = "sha256:3392582988a273a87ab5043ee1b2c9c17a2c3c00580bf9326c47a2e0aaaeac92" +url = "https://dl.google.com/go/go1.27.4.linux-arm64.tar.gz" + +[tools.go."platforms.linux-x64"] +checksum = "sha256:7226736c2339719cda28fbf3a54d71aa63bcefe376e98cef00034268dab24840" +url = "https://dl.google.com/go/go1.27.4.linux-amd64.tar.gz" + +[tools.go."platforms.macos-arm64"] +checksum = "sha256:91a44a2b8a716600ad94a4f143e156116620db8828086a6e3602291be9bd0bb4" +url = "https://dl.google.com/go/go1.27.4.darwin-arm64.tar.gz" + +[tools.go."platforms.windows-x64"] +checksum = "sha256:178ab98950ac69ab25069307dc6ade79f3816e414cce95b4da166a115cde1e7e" +url = "https://dl.google.com/go/go1.27.4.windows-amd64.zip" + +[[tools.lazygit]] +version = "0.66.3" +backend = "aqua:jesseduffield/lazygit" +specifiers = ["latest"] + +[tools.lazygit."platforms.linux-arm64"] +checksum = "sha256:ac0b48237f3d0283813e7154ec063237e519532feb0470c0881a1793ee78fd42" +url = "https://github.com/jesseduffield/lazygit/releases/download/v0.66.3/lazygit_0.66.3_linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/jesseduffield/lazygit/releases/assets/722269035" + +[tools.lazygit."platforms.linux-x64"] +checksum = "sha256:0a23f429a95f0d09db298b3c291536d818de066aa5a85c255806f0490ff6656b" +url = "https://github.com/jesseduffield/lazygit/releases/download/v0.66.3/lazygit_0.66.3_linux_x86_64.tar.gz" +url_api = "https://api.github.com/repos/jesseduffield/lazygit/releases/assets/722268995" + +[tools.lazygit."platforms.macos-arm64"] +checksum = "sha256:6873e6b7a538b521c4d7ff3f76ec49e6dcafa41e6053a6aae33c12f62663e163" +url = "https://github.com/jesseduffield/lazygit/releases/download/v0.66.3/lazygit_0.66.3_darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/jesseduffield/lazygit/releases/assets/722268996" + +[tools.lazygit."platforms.windows-x64"] +checksum = "sha256:a76fe17339fd387c20addc09060f07c240e4b20a9f55fee4ad7c86a251c0741e" +url = "https://github.com/jesseduffield/lazygit/releases/download/v0.66.3/lazygit_0.66.3_windows_x86_64.zip" +url_api = "https://api.github.com/repos/jesseduffield/lazygit/releases/assets/722269081" + +[[tools.lsd]] +version = "1.2.0" +backend = "aqua:lsd-rs/lsd" +specifiers = ["latest"] + +[tools.lsd."platforms.linux-arm64"] +checksum = "sha256:48c069cf73a8ed0851f366afeac86e3a9b7db416133f45d033d31d123f819f26" +url = "https://github.com/lsd-rs/lsd/releases/download/v1.2.0/lsd-v1.2.0-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/lsd-rs/lsd/releases/assets/303319672" + +[tools.lsd."platforms.linux-x64"] +checksum = "sha256:57d3b5859254adcfb8374ce98159cca97a14959997d2ae1176d2cff59556d829" +url = "https://github.com/lsd-rs/lsd/releases/download/v1.2.0/lsd-v1.2.0-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/lsd-rs/lsd/releases/assets/303319829" + +[tools.lsd."platforms.macos-arm64"] +checksum = "sha256:9e34a5d392ff913302098aad0543dafa1883c531eaf229b82f086c3fca675e3e" +url = "https://github.com/lsd-rs/lsd/releases/download/v1.2.0/lsd-v1.2.0-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/lsd-rs/lsd/releases/assets/303319340" + +[tools.lsd."platforms.windows-x64"] +checksum = "sha256:a65b9f457153934a7ce1f7e0fe1c4922a95bb2822222126e4fbaa6ee9c0d78e5" +url = "https://github.com/lsd-rs/lsd/releases/download/v1.2.0/lsd-v1.2.0-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/lsd-rs/lsd/releases/assets/303320206" + +[[tools.neovim]] +version = "0.12.6" +backend = "vfox:jdx/vfox-neovim" +specifiers = ["latest"] + +[tools.neovim."platforms.linux-arm64"] +checksum = "sha256:8f1f64a0bdb97247034038c3823c6cbad5bdf9ecd5751b85494b71c3ee04c815" +url = "https://github.com/neovim/neovim/releases/download/v0.12.6/nvim-linux-arm64.tar.gz" + +[tools.neovim."platforms.linux-x64"] +checksum = "sha256:474430d53e6264f6d6dd18db42d6dc9df3a1b56ca9e88a325bbf860e1a811d87" +url = "https://github.com/neovim/neovim/releases/download/v0.12.6/nvim-linux-x86_64.tar.gz" + +[tools.neovim."platforms.macos-arm64"] +checksum = "sha256:1dbd148222b051ba6c307c4d17a318ed083df018a4f6a5a0ce46955ffc9ab87b" +url = "https://github.com/neovim/neovim/releases/download/v0.12.6/nvim-macos-arm64.tar.gz" + +[tools.neovim."platforms.windows-x64"] +checksum = "sha256:4e12b7103b601ffc8f25954b4da100f339faa73dccb69a5b135e897fa3d893ed" +url = "https://github.com/neovim/neovim/releases/download/v0.12.6/nvim-win64.zip" + +[[tools.node]] +version = "26.13.0" +backend = "core:node" +specifiers = ["lts"] + +[tools.node."platforms.linux-arm64"] +checksum = "sha256:439e9c438acdf6a6ffe47418da709153d66c4bed812e30a473faacb107dd2791" +url = "https://nodejs.org/dist/v26.13.0/node-v26.13.0-linux-arm64.tar.gz" + +[tools.node."platforms.linux-x64"] +checksum = "sha256:5848553868b402d3fabb5b09270649977780a390f832155721025a08b5104455" +url = "https://nodejs.org/dist/v26.13.0/node-v26.13.0-linux-x64.tar.gz" + +[tools.node."platforms.macos-arm64"] +checksum = "sha256:d38bd5e5a2ddce6bbb5ce45e46e208337da4d51fffe611e567fd32073d6439f6" +url = "https://nodejs.org/dist/v26.13.0/node-v26.13.0-darwin-arm64.tar.gz" + +[tools.node."platforms.windows-x64"] +checksum = "sha256:dcc60d59a0746999f99064a01c020445d54d84228c691cdbf25b49ac3b59150a" +url = "https://nodejs.org/dist/v26.13.0/node-v26.13.0-win-x64.zip" + +[[tools.ripgrep]] +version = "15.2.0" +backend = "aqua:BurntSushi/ripgrep" +specifiers = ["latest"] + +[tools.ripgrep."platforms.linux-arm64"] +checksum = "sha256:a740b91c82eaf9914cfedd353572f2791cbe0162c84101ee0951058f4dcbc90d" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.2.0/ripgrep-15.2.0-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/478119579" + +[tools.ripgrep."platforms.linux-x64"] +checksum = "sha256:33e15bcf1624b25cdd2a55813a47a2f95dbe126268203e76aa6a585d1e7b149c" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.2.0/ripgrep-15.2.0-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/478120097" + +[tools.ripgrep."platforms.macos-arm64"] +checksum = "sha256:3750b2e93f37e0c692657da574d7019a101c0084da05a790c83fd335bad973e4" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.2.0/ripgrep-15.2.0-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/478118851" + +[tools.ripgrep."platforms.windows-x64"] +checksum = "sha256:71b2fef860abe467217a538ff31de02f5258807c0129f771846f87bd029aafc5" +url = "https://github.com/BurntSushi/ripgrep/releases/download/15.2.0/ripgrep-15.2.0-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/BurntSushi/ripgrep/releases/assets/478119643" + +[[tools.starship]] +version = "1.27.0" +backend = "aqua:starship/starship" +specifiers = ["latest"] + +[tools.starship."platforms.linux-arm64"] +checksum = "sha256:341f5cbf24699fa0b27ec88965ad25f862ea09e15d35a543fd6ffdff1d2aa00d" +url = "https://github.com/starship/starship/releases/download/v1.27.0/starship-aarch64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/starship/starship/releases/assets/650074383" + +[tools.starship."platforms.linux-x64"] +checksum = "sha256:3b94758850901717eb36aa1b53f8492c1322506ec6d41273bc6151e79ed8e4a1" +url = "https://github.com/starship/starship/releases/download/v1.27.0/starship-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/starship/starship/releases/assets/650074501" + +[tools.starship."platforms.macos-arm64"] +checksum = "sha256:5362da8cb2928f98f3ce0ffda697cf0f8de70081db000dae316d6d3a404f6cf0" +url = "https://github.com/starship/starship/releases/download/v1.27.0/starship-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/starship/starship/releases/assets/650074353" + +[tools.starship."platforms.windows-x64"] +checksum = "sha256:7764f861805376af2812dd78c84fadc16b714cf3f346baed9b597bfda8484403" +url = "https://github.com/starship/starship/releases/download/v1.27.0/starship-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/starship/starship/releases/assets/650074470" + +[[tools.tmux]] +version = "3.8" +backend = "aqua:tmux/tmux-builds" +specifiers = ["latest"] + +[tools.tmux."platforms.linux-arm64"] +checksum = "sha256:f399311b1159705e69839eaf4f6f68c8b8540dc3a8538b87c30dedb9c3c7fc23" +url = "https://github.com/tmux/tmux-builds/releases/download/v3.8/tmux-3.8-linux-arm64.tar.gz" +url_api = "https://api.github.com/repos/tmux/tmux-builds/releases/assets/721688993" + +[tools.tmux."platforms.linux-x64"] +checksum = "sha256:147849ff18b62a8aa3d5d8f75dd07c3f9fdfad529f932236afdec838fc1d15e1" +url = "https://github.com/tmux/tmux-builds/releases/download/v3.8/tmux-3.8-linux-x86_64.tar.gz" +url_api = "https://api.github.com/repos/tmux/tmux-builds/releases/assets/721688991" + +[tools.tmux."platforms.macos-arm64"] +checksum = "sha256:ec926bbf28ddf55d0dc7c9791d43e03e251ddab392d763f7fbb38d4b8408d051" +url = "https://github.com/tmux/tmux-builds/releases/download/v3.8/tmux-3.8-macos-arm64.tar.gz" +url_api = "https://api.github.com/repos/tmux/tmux-builds/releases/assets/721688988" + +[[tools.uv]] +version = "0.13.7" +backend = "aqua:astral-sh/uv" +specifiers = ["latest"] + +[tools.uv."platforms.linux-arm64"] +checksum = "sha256:71279f8d3c67241e807b9d8db872d1bf541579fb9f08b7d1eb1682196d1e57dc" +url = "https://github.com/astral-sh/uv/releases/download/0.13.7/uv-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/704009469" +provenance = "github-attestations" + +[tools.uv."platforms.linux-x64"] +checksum = "sha256:c5221ff41b7892bfc223543883600125f6a47fe845093e0f5bdff4f359196d83" +url = "https://github.com/astral-sh/uv/releases/download/0.13.7/uv-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/704009823" +provenance = "github-attestations" + +[tools.uv."platforms.macos-arm64"] +checksum = "sha256:81b811b57e4624df7ed3aac148e0359100d9962f3d9dce00aec533dc2e086731" +url = "https://github.com/astral-sh/uv/releases/download/0.13.7/uv-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/704009442" +provenance = "github-attestations" + +[tools.uv."platforms.windows-x64"] +checksum = "sha256:0cdc5b38fe5a8168ed6a25814f5ba43c21d313dd3187314fccb37b7cec46e021" +url = "https://github.com/astral-sh/uv/releases/download/0.13.7/uv-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/astral-sh/uv/releases/assets/704009796" +provenance = "github-attestations" + +[[tools.yazi]] +version = "26.9.1" +backend = "aqua:sxyazi/yazi" +specifiers = ["latest"] + +[tools.yazi.options] +libc = "musl" + +[tools.yazi."platforms.linux-arm64"] +checksum = "sha256:dd569daecaae914185f295634109295ccd25c1b42b02eb89a74f651970024f2e" +url = "https://github.com/sxyazi/yazi/releases/download/v26.9.1/yazi-aarch64-unknown-linux-musl.zip" +url_api = "https://api.github.com/repos/sxyazi/yazi/releases/assets/539261411" + +[tools.yazi."platforms.linux-x64"] +checksum = "sha256:9b9c39decccf8cb0ff53a7d637d38f8a79d93bbd0099f4ea9c619ef6bb392f5d" +url = "https://github.com/sxyazi/yazi/releases/download/v26.9.1/yazi-x86_64-unknown-linux-musl.zip" +url_api = "https://api.github.com/repos/sxyazi/yazi/releases/assets/539261404" + +[tools.yazi."platforms.macos-arm64"] +checksum = "sha256:3921182a21cceb0a505e5dac578e1487d48104caa5f114e9f8adf40b5a7289a9" +url = "https://github.com/sxyazi/yazi/releases/download/v26.9.1/yazi-aarch64-apple-darwin.zip" +url_api = "https://api.github.com/repos/sxyazi/yazi/releases/assets/539261410" + +[tools.yazi."platforms.windows-x64"] +checksum = "sha256:7c033e5f2de6355fd03d865319053fc97db780275974ed17653c057f5d0f8d21" +url = "https://github.com/sxyazi/yazi/releases/download/v26.9.1/yazi-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/sxyazi/yazi/releases/assets/539261401" + +[[tools.zoxide]] +version = "0.10.0" +backend = "aqua:ajeetdsouza/zoxide" +specifiers = ["latest"] + +[tools.zoxide."platforms.linux-arm64"] +checksum = "sha256:f1f16c5d6298d63dee467eedea1cdcd8490e43e493bea43acd416dc9033ef641" +url = "https://github.com/ajeetdsouza/zoxide/releases/download/v0.10.0/zoxide-0.10.0-aarch64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/ajeetdsouza/zoxide/releases/assets/466316402" + +[tools.zoxide."platforms.linux-x64"] +checksum = "sha256:2d93385b99f3e82cf2701609a1bffcad863fbeb75aa3fe7eb6be4d29be68b1ae" +url = "https://github.com/ajeetdsouza/zoxide/releases/download/v0.10.0/zoxide-0.10.0-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/ajeetdsouza/zoxide/releases/assets/466316293" + +[tools.zoxide."platforms.macos-arm64"] +checksum = "sha256:b55ae6f2f5f23d0a6ccb3bd4eeb2af9c7e0a6556e5255c82100e40305129bbb0" +url = "https://github.com/ajeetdsouza/zoxide/releases/download/v0.10.0/zoxide-0.10.0-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/ajeetdsouza/zoxide/releases/assets/466316174" + +[tools.zoxide."platforms.windows-x64"] +checksum = "sha256:f465ae548f8754c8e7edbc60b45fbf58c92bfe123db83d790252d6810fa5daf1" +url = "https://github.com/ajeetdsouza/zoxide/releases/download/v0.10.0/zoxide-0.10.0-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/ajeetdsouza/zoxide/releases/assets/466316769" diff --git a/run_onchange_after_install-tools-unix.sh.tmpl b/run_onchange_after_install-tools-unix.sh.tmpl index fc93d80..3124e84 100644 --- a/run_onchange_after_install-tools-unix.sh.tmpl +++ b/run_onchange_after_install-tools-unix.sh.tmpl @@ -1,8 +1,9 @@ #!/bin/bash # Installs mise (https://mise.jdx.dev) and the tools in ~/.config/mise/config.toml, # then generates zsh completions for them. chezmoi runs this after applying -# files and again whenever this script or the mise config changes. +# files and again whenever this script, the mise config or mise.lock changes. # mise config hash: {{ include "dot_config/mise/config.toml" | sha256sum }} +# mise.lock hash: {{ include "dot_config/mise/mise.lock" | sha256sum }} set -euo pipefail mise="$HOME/.local/bin/mise" @@ -12,7 +13,8 @@ if [ ! -x "$mise" ]; then fi printf "\n# Install tools with mise\n" -"$mise" install +# Only the versions in mise.lock, and fail if it doesn't have them +"$mise" install --locked eval "$("$mise" env --shell bash)" # Remove the standalone installer's receipt so `uv self update` can't replace mise's uv diff --git a/run_onchange_after_install-tools-windows.ps1.tmpl b/run_onchange_after_install-tools-windows.ps1.tmpl index 7ffbca4..5bdb789 100644 --- a/run_onchange_after_install-tools-windows.ps1.tmpl +++ b/run_onchange_after_install-tools-windows.ps1.tmpl @@ -1,7 +1,8 @@ # Installs mise (https://mise.jdx.dev) and the tools in ~/.config/mise/config.toml. -# chezmoi runs this after applying files and again whenever this script or the -# mise config changes. +# chezmoi runs this after applying files and again whenever this script, the +# mise config or mise.lock changes. # mise config hash: {{ include "dot_config/mise/config.toml" | sha256sum }} +# mise.lock hash: {{ include "dot_config/mise/mise.lock" | sha256sum }} $ErrorActionPreference = 'Stop' $mise = "$HOME\.local\bin\mise.exe" @@ -13,5 +14,6 @@ if (-not (Test-Path $mise -PathType Leaf)) { } Write-Host "`n# Install tools with mise" -& $mise install +# Only the versions in mise.lock, and fail if it doesn't have them +& $mise install --locked if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } From e8f317c237e7c587317895cebfffc4963a4cb0ea Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 19:38:30 +0000 Subject: [PATCH 18/76] CI: show what zsh printed when it times out When a command in the pseudo-terminal waited for input, the alarm killed the test with status 142 and lost everything the command had printed, so the log didn't show what it was waiting for. Now the test stops the command after 2 minutes, prints its output with "(timed out)", and fails with status 124. The zsh checks report the status and output together. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/test.sh | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/test.sh b/.github/test.sh index b1728ab..3290b40 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -19,15 +19,26 @@ fail() { } # Runs a command in a pseudo-terminal, as a terminal emulator would, and prints -# its output without escape sequences +# its output without escape sequences. Stops it with exit status 124 if it takes +# over 2 minutes, which usually means it's waiting for input. in_pty() { python3 -c ' import os, pty, re, signal, sys -signal.alarm(120) # fail instead of hanging if something waits for input pid, fd = pty.fork() if pid == 0: os.execvp(sys.argv[1], sys.argv[1:]) -output = b"" +output = [] +def finish(status): + text = re.sub(rb"\x1b(\[[0-?]*[ -/]*[@-~]|\][^\x07\x1b]*(\x07|\x1b\\)|[=>])|\r", b"", b"".join(output)) + sys.stdout.buffer.write(text) + sys.stdout.flush() + os._exit(status) +def timeout(*_): + os.kill(pid, signal.SIGKILL) + output.append(b"\n(timed out)") + finish(124) +signal.signal(signal.SIGALRM, timeout) +signal.alarm(120) while True: try: data = os.read(fd, 4096) @@ -35,10 +46,8 @@ while True: break if not data: break - output += data -status = os.waitpid(pid, 0)[1] -sys.stdout.buffer.write(re.sub(rb"\x1b(\[[0-?]*[ -/]*[@-~]|\][^\x07\x1b]*(\x07|\x1b\\)|[=>])|\r", b"", output)) -sys.exit(os.waitstatus_to_exitcode(status)) + output.append(data) +finish(os.waitstatus_to_exitcode(os.waitpid(pid, 0)[1])) ' "$@" Date: Tue, 10 Nov 2026 19:45:56 +0000 Subject: [PATCH 19/76] CI: make the Ubuntu runner's zsh completion directories secure GitHub's Ubuntu image runs `chmod -R 777 /usr/share`, which leaves /usr/share/zsh and /usr/share/zsh/vendor-completions writable by everyone. When zsh starts, compinit's security check asks whether to use these insecure directories, and the test timed out waiting for an answer. The test now removes that write access from the directories compaudit reports, as you would on your own machine, and leaves the dotfiles' compinit as is. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/test.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/test.sh b/.github/test.sh index 3290b40..7e41e0d 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -82,6 +82,15 @@ esac echo "::endgroup::" echo "::group::Check zsh" +# GitHub's Ubuntu image makes everything in /usr/share writable by everyone, +# including zsh's completion directories, so compinit would ask whether to use +# them and wait for an answer. Remove that access, as you would on your machine. +insecure=$(zsh -c 'autoload -Uz compaudit && compaudit' 2>/dev/null | sort -u) || true +if [ -n "$insecure" ]; then + echo "Removing write access for others from the directories compinit distrusts:" + echo "$insecure" + echo "$insecure" | xargs sudo chmod g-w,o-w +fi output=$(in_pty zsh -i -c exit) && status=0 || status=$? if [ "$status" -ne 0 ] || [ -n "$output" ]; then fail "zsh should start without printing anything, but exited with $status and printed: $output" From d3512febca7e96bb2218e4076794a3e75dc71dcf Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:05:50 +0000 Subject: [PATCH 20/76] mise: stop installing the Copilot CLI I don't use it anymore. After updating, `mise prune` deletes its install. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/test.ps1 | 2 +- .github/test.sh | 2 +- dot_config/mise/config.toml | 1 - dot_config/mise/mise.lock | 25 ------------------------- 4 files changed, 2 insertions(+), 28 deletions(-) diff --git a/.github/test.ps1 b/.github/test.ps1 index 7d5324e..a96dd8d 100644 --- a/.github/test.ps1 +++ b/.github/test.ps1 @@ -49,7 +49,7 @@ if ($LASTEXITCODE -ne 0 -or $output.Trim()) { Fail "PowerShell printed on startu # Prints the problems it finds $checks = @' $installs = Join-Path $env:LOCALAPPDATA 'mise\installs' -$tools = 'bat', 'copilot', 'delta', 'dust', 'fd', 'fzf', 'gh', 'go', 'lazygit', 'lsd', +$tools = 'bat', 'delta', 'dust', 'fd', 'fzf', 'gh', 'go', 'lazygit', 'lsd', 'node', 'npm', 'nvim', 'rg', 'starship', 'uv', 'uvx', 'ya', 'yazi', 'zoxide' foreach ($tool in $tools) { $source = (Get-Command $tool -ErrorAction Ignore | Select-Object -First 1).Source diff --git a/.github/test.sh b/.github/test.sh index 7e41e0d..4537dc5 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -122,7 +122,7 @@ done [[ $(bindkey -M viins "^R") == *" atuin-"* ]] || print "Ctrl-R: $(bindkey -M viins "^R")" (( $+functions[__zoxide_z] )) || print "zoxide isn'\''t initialized" ' -tools=(atuin bat copilot delta dust fd fzf gh go lazygit lsd node npm nvim rg starship tmux uv uvx ya yazi zoxide) +tools=(atuin bat delta dust fd fzf gh go lazygit lsd node npm nvim rg starship tmux uv uvx ya yazi zoxide) output=$(in_pty zsh -i -c "$zsh_checks" zsh "${tools[@]}") && status=0 || status=$? if [ "$status" -ne 0 ] || [ -n "$output" ]; then fail "The zsh checks exited with $status and printed: $output" diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index a28f6f8..cd17a48 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -29,7 +29,6 @@ lockfile_platforms = ["linux-arm64", "linux-x64", "macos-arm64", "windows-x64"] # Only zsh uses atuin, so Windows skips it. mise already skips tmux there. atuin = { version = "latest", libc = "musl", os = ["linux", "macos"] } bat = "latest" -copilot = "latest" delta = "latest" dust = "latest" fd = "latest" diff --git a/dot_config/mise/mise.lock b/dot_config/mise/mise.lock index 7e9e882..d9d694b 100644 --- a/dot_config/mise/mise.lock +++ b/dot_config/mise/mise.lock @@ -53,31 +53,6 @@ checksum = "sha256:0f729b4b6f5f28d395c641eacc2e9ff68d0096b85aa0eec344aa62425144b url = "https://github.com/sharkdp/bat/releases/download/v0.26.1/bat-v0.26.1-x86_64-pc-windows-msvc.zip" url_api = "https://api.github.com/repos/sharkdp/bat/releases/assets/323549116" -[[tools.copilot]] -version = "1.0.108" -backend = "aqua:github/copilot-cli" -specifiers = ["latest"] - -[tools.copilot."platforms.linux-arm64"] -checksum = "sha256:b0c78c49543bb8a1163e812dcd0601a5ff1ffc067889add6351b0568d76772e6" -url = "https://github.com/github/copilot-cli/releases/download/v1.0.108/copilot-linux-arm64.tar.gz" -url_api = "https://api.github.com/repos/github/copilot-cli/releases/assets/728128470" - -[tools.copilot."platforms.linux-x64"] -checksum = "sha256:4c14e320c5cd10234ad56cba855509206e4518e1c04a780ac05a8e1c124bd97d" -url = "https://github.com/github/copilot-cli/releases/download/v1.0.108/copilot-linux-x64.tar.gz" -url_api = "https://api.github.com/repos/github/copilot-cli/releases/assets/728129070" - -[tools.copilot."platforms.macos-arm64"] -checksum = "sha256:567198e7cd947f5b05bef7f036116e6286ddcd8286ec45830082b28c664dbfb0" -url = "https://github.com/github/copilot-cli/releases/download/v1.0.108/copilot-darwin-arm64.tar.gz" -url_api = "https://api.github.com/repos/github/copilot-cli/releases/assets/728128461" - -[tools.copilot."platforms.windows-x64"] -checksum = "sha256:3b1fc7791c6c0d199d68b3469ee65fb2cedf46f06c13978109796742f2b86229" -url = "https://github.com/github/copilot-cli/releases/download/v1.0.108/copilot-win32-x64.zip" -url_api = "https://api.github.com/repos/github/copilot-cli/releases/assets/728128471" - [[tools.delta]] version = "0.20.1" backend = "aqua:dandavison/delta" From c7037eeb7118d705143d4c5dbf8926e8131463a3 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:06:16 +0000 Subject: [PATCH 21/76] Remove the Alacritty config I don't use Alacritty anymore. chezmoi doesn't delete files it stops managing, so delete ~/.alacritty.toml by hand. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 5 ----- README.md | 4 +--- dot_alacritty.toml | 34 ---------------------------------- 3 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 dot_alacritty.toml diff --git a/.chezmoiignore b/.chezmoiignore index 81b37c3..9c262cb 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -23,11 +23,6 @@ install-packages-unix.sh install-tools-unix.sh {{- end }} -# linux without WSL files -{{ if or (ne .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}} -.alacritty.toml -{{- end }} - # encrypted files {{ if not .encryption -}} .ssh diff --git a/README.md b/README.md index 7082ff9..8b602fd 100644 --- a/README.md +++ b/README.md @@ -70,9 +70,7 @@ again. - Open a new terminal, or log out and back in, to start using zsh -3. If desired, manually install software with unique installation instructions - - [Alacritty](https://github.com/alacritty/alacritty/blob/master/INSTALL.md) -4. Keep everything up to date +3. Keep everything up to date ``` chezmoi update # pull and apply the latest changes diff --git a/dot_alacritty.toml b/dot_alacritty.toml deleted file mode 100644 index fe92e42..0000000 --- a/dot_alacritty.toml +++ /dev/null @@ -1,34 +0,0 @@ -[cursor] -vi_mode_style = "Block" - -[font] -size = 11.0 - -[font.bold] -family = "FiraCode Nerd Font Mono" -style = "Bold" - -[font.bold_italic] -family = "FiraCode Nerd Font Mono" -style = "Bold Italic" - -[font.italic] -family = "FiraCode Nerd Font Mono" -style = "Italic" - -[font.normal] -family = "FiraCode Nerd Font Mono" -style = "Regular" - -[font.offset] -x = 1 -y = 1 - -[window] -decorations = "full" -opacity = 0.9 -startup_mode = "Maximized" - -[window.padding] -x = 10 -y = 10 From bf2213248558cac5bcb0af125f775dd422cb97a3 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:06:49 +0000 Subject: [PATCH 22/76] WSL: use the Windows PATH that WSL appends by default The zshrc prepended System32 because the reference wsl.conf turned off appendWindowsPath. Prepending made zsh search a slow Windows folder before the Linux ones, and System32 doesn't have VS Code's `code`. Use WSL's default instead, which appends the whole Windows PATH, including `code`. .zshrc no longer has template code, so make it a plain file, and stop linting WSL separately since no template tells it apart from Linux anymore. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/lint.sh | 7 ++----- dot_zshrc.tmpl => dot_zshrc | 3 --- reference_dotfiles/wsl/wsl.conf | 3 --- 3 files changed, 2 insertions(+), 11 deletions(-) rename dot_zshrc.tmpl => dot_zshrc (96%) diff --git a/.github/lint.sh b/.github/lint.sh index 5f86ec1..52f9ca8 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -8,9 +8,7 @@ set -euo pipefail cd "$(dirname "$0")/.." declare -A os_data=( - # Templates only read the kernel release to tell WSL apart from other Linux - [linux]='{"os":"linux","kernel":{"osrelease":"6.8.0-generic"}}' - [wsl]='{"os":"linux","kernel":{"osrelease":"5.15.167.4-microsoft-standard-WSL2"}}' + [linux]='{"os":"linux"}' [darwin]='{"os":"darwin"}' [windows]='{"os":"windows"}' ) @@ -34,7 +32,6 @@ check() { # check OS TEMPLATE RENDERED case $2 in *.sh.tmpl) [ "$1" = windows ] || shellcheck "$3" ;; *.ps1.tmpl) [ "$1" != windows ] || ps1 "$3" ;; - dot_zshrc.tmpl) [ "$1" = windows ] || zsh -n "$3" ;; *.toml.tmpl | .chezmoiexternal.toml) toml "$3" ;; *.yaml.tmpl | *.yml.tmpl) yq . "$3" >/dev/null ;; dot_gitconfig.tmpl) git config --file "$3" --list >/dev/null ;; @@ -62,7 +59,7 @@ done echo "# files that aren't templates" shellcheck .github/*.sh -for file in dot_zshenv dot_config/zsh/*.zsh; do +for file in dot_zshenv dot_zshrc dot_config/zsh/*.zsh; do zsh -n "$file" done for file in $(git ls-files '*.ps1'); do diff --git a/dot_zshrc.tmpl b/dot_zshrc similarity index 96% rename from dot_zshrc.tmpl rename to dot_zshrc index 2f496d5..9450b58 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc @@ -71,9 +71,6 @@ source $HOME/.config/zsh/aliases.zsh # Environment Variables export PATH=$HOME/.cargo/bin:$PATH export PATH=$HOME/.local/bin:$PATH -{{- if and (eq .chezmoi.os "linux") (.chezmoi.kernel.osrelease | lower | contains "microsoft") }} -export PATH="/mnt/c/Windows/System32:$PATH" -{{- end }} export VISUAL=nvim export EDITOR="$VISUAL" export DOCKER_BUILDKIT=1 diff --git a/reference_dotfiles/wsl/wsl.conf b/reference_dotfiles/wsl/wsl.conf index 4b1f38b..4bdaae8 100644 --- a/reference_dotfiles/wsl/wsl.conf +++ b/reference_dotfiles/wsl/wsl.conf @@ -1,8 +1,5 @@ [boot] systemd=true -[interop] -appendWindowsPath = false - [network] generateResolvConf = false From 41cb4978afaf04be069a6f18412c3c31c0b6f855 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:08:28 +0000 Subject: [PATCH 23/76] Windows: install chezmoi with its one-liner, like on Linux and macOS Install PowerShell 7 and Git with winget first. Microsoft recommends winget for PowerShell, and its installers' defaults are fine because .gitconfig sets the editor and line endings, so --interactive isn't needed. Git has to be on PATH because chezmoi clones the yazi theme with it. Then chezmoi's PowerShell one-liner installs it in ~\.local\bin and applies the dotfiles, so chezmoi doesn't need to be installed first, and `chezmoi upgrade` updates it. Remove chezmoi from the UniGetUI bundle, and age too: chezmoi decrypts with its built-in age. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 23 ++++++++------- reference_dotfiles/wingetui/dev.json | 44 ---------------------------- 2 files changed, 13 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index 8b602fd..987d321 100644 --- a/README.md +++ b/README.md @@ -84,35 +84,38 @@ again. ### PowerShell 7 on Windows -1. Install PowerShell 7 from the Microsoft Store -2. Install chezmoi and git using winget in PowerShell +1. Install PowerShell 7 and Git with winget ``` - winget install --exact --id twpayne.chezmoi --interactive - winget install --exact --id Git.Git --interactive + winget install --exact --id Microsoft.PowerShell --source winget + winget install --exact --id Git.Git --source winget ``` -3. Clone this repository in PowerShell, pulling and applying the latest changes + - The profile and chezmoi's scripts run in PowerShell 7, and chezmoi uses Git to clone the yazi theme + +2. Open a new PowerShell 7 terminal, then install chezmoi in `~\.local\bin`, pulling and applying the latest changes ``` - chezmoi init --apply patrick-5546 + iex "&{$(irm 'https://get.chezmoi.io/ps1')} -b '~/.local/bin' -- init --apply patrick-5546" ``` - - This also installs mise in `~\.local\bin` and the tools in its config. Open a new terminal to start using them + - This also installs mise in `~\.local\bin`, adds that folder to your Path, and installs the tools in mise's + config. Open a new terminal to start using them -4. Keep everything up to date +3. Keep everything up to date ``` chezmoi update # pull and apply the latest changes mise upgrade # upgrade the tools, which updates mise.lock chezmoi re-add ~/.config/mise # save mise.lock, then commit and push it mise self-update # upgrade mise + chezmoi upgrade # upgrade chezmoi ``` - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - - Upgrade chezmoi and git with winget or UniGetUI + - Upgrade PowerShell and Git with winget or UniGetUI -5. Optional: run [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1) to install the other software I use +4. Optional: run [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1) to install the other software I use - Prerequisite: `winget install --exact --id gerardog.gsudo --interactive` - Note: I do not run this automatically anymore because I do most of my development through WSL or VS Code. Instead, I now manage the software I want through [UniGetUI](https://github.com/Devolutions/UniGetUI) whenever possible diff --git a/reference_dotfiles/wingetui/dev.json b/reference_dotfiles/wingetui/dev.json index d36b01b..6d88c79 100644 --- a/reference_dotfiles/wingetui/dev.json +++ b/reference_dotfiles/wingetui/dev.json @@ -1,50 +1,6 @@ { "export_version": 2, "packages": [ - { - "Id": "FiloSottile.age", - "Name": "age", - "Version": "1.1.1", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "twpayne.chezmoi", - "Name": "chezmoi", - "Version": "2.47.4", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, { "Id": "Docker.DockerDesktop", "Name": "Docker Desktop", From 90711541da40fdbf65aa5c882f28aa45b71a48ca Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:09:09 +0000 Subject: [PATCH 24/76] Windows: delete the old install script It was already unused: UniGetUI and its bundles in reference_dotfiles/wingetui replaced it, and it installed Chocolatey packages and PowerShell modules the profile no longer imports. Point the README at the bundles instead, and drop its gsudo prerequisite. Closes #4 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 13 ++---- reference_dotfiles/run_install-windows.ps1 | 48 ---------------------- 2 files changed, 4 insertions(+), 57 deletions(-) delete mode 100644 reference_dotfiles/run_install-windows.ps1 diff --git a/README.md b/README.md index 987d321..2efe089 100644 --- a/README.md +++ b/README.md @@ -30,11 +30,8 @@ The files I think are most notable are listed below: - [`run_onchange_after_install-tools-windows.ps1.tmpl`](./run_onchange_after_install-tools-windows.ps1.tmpl): installs mise and the tools in its config. Reruns when it, the mise config or `mise.lock` changes - - [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1): installs the other software I use - - To see what software is installed, search for `wingetInstallIfNotInstalled`, `choco install`, and - `Install-Module` - - I don't use this script anymore, in favor of [UniGetUI](https://github.com/Devolutions/UniGetUI) - (formerly WingetUI): [`wingetui/`](./reference_dotfiles/wingetui/) + - The other software I use is managed with [UniGetUI](https://github.com/Devolutions/UniGetUI) (formerly + WingetUI), which can install it from the bundles in [`wingetui/`](./reference_dotfiles/wingetui/) - Encryption scripts: files with sensitive information are [encrypted](https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/) with age. On the first apply, these scripts decrypt the age key with its passphrase using chezmoi's built-in age @@ -115,7 +112,5 @@ again. - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - Upgrade PowerShell and Git with winget or UniGetUI -4. Optional: run [`run_install-windows.ps1`](./reference_dotfiles/run_install-windows.ps1) to install the other software I use - - Prerequisite: `winget install --exact --id gerardog.gsudo --interactive` - - Note: I do not run this automatically anymore because I do most of my development through WSL or VS Code. - Instead, I now manage the software I want through [UniGetUI](https://github.com/Devolutions/UniGetUI) whenever possible +4. Optional: install the other software I use with [UniGetUI](https://github.com/Devolutions/UniGetUI), by importing + the bundles in [`reference_dotfiles/wingetui`](./reference_dotfiles/wingetui/) diff --git a/reference_dotfiles/run_install-windows.ps1 b/reference_dotfiles/run_install-windows.ps1 deleted file mode 100644 index 0150797..0000000 --- a/reference_dotfiles/run_install-windows.ps1 +++ /dev/null @@ -1,48 +0,0 @@ -Write-Host "Request administrator access" -gsudo { - Write-Host "Update choco packages and modules" - choco upgrade all -y - Update-Module - - Write-Host "`nInstall choco packages" - choco install lf mingw -y - - Write-Host "`nInstall modules" - Install-Module git-aliases -Scope CurrentUser -Allowclobber - Install-Module posh-git -Scope CurrentUser -AllowClobber - Install-Module -Name Terminal-Icons -Repository PSGallery - - Write-Host "`nSet execution policy" - Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -} - -Write-Host "Update winget packages" -winget upgrade --all -Write-Host("") - -function wingetInstallIfNotInstalled($id) { - Write-Host("Install $id if not installed") - winget list --exact --id $id || winget install --exact --id $id --interactive - Write-Host("") -} -wingetInstallIfNotInstalled("7zip.7zip") -wingetInstallIfNotInstalled("Bitwarden.Bitwarden") -wingetInstallIfNotInstalled("code52.Carnac") -wingetInstallIfNotInstalled("Discord.Discord") -wingetInstallIfNotInstalled("Docker.DockerDesktop") -wingetInstallIfNotInstalled("Git.Git") -wingetInstallIfNotInstalled("gerardog.gsudo") -wingetInstallIfNotInstalled("Logitech.GHUB") -wingetInstallIfNotInstalled("Logitech.LogiBolt") -wingetInstallIfNotInstalled("Logitech.LogiTune") -wingetInstallIfNotInstalled("Logitech.OptionsPlus") -wingetInstallIfNotInstalled("Logitech.UnifyingSoftware") -wingetInstallIfNotInstalled("Nextcloud.NextcloudDesktop") -wingetInstallIfNotInstalled("OpenVPNTechnologies.OpenVPNConnect") -wingetInstallIfNotInstalled("Poly.PlantronicsHub") -wingetInstallIfNotInstalled("SlackTechnologies.Slack") -wingetInstallIfNotInstalled("TeamViewer.TeamViewer") -wingetInstallIfNotInstalled("VPNetwork.TorGuard") -wingetInstallIfNotInstalled("JAMSoftware.TreeSize.Free") -wingetInstallIfNotInstalled("Microsoft.VisualStudioCode") -wingetInstallIfNotInstalled("Zoom.Zoom") From bc9372332afeab6b02d7e58895b19593ae7c53bc Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:09:22 +0000 Subject: [PATCH 25/76] PowerShell: remove the commented-out code from the profile The timing wrapper, the posh-git, git-aliases and Terminal-Icons imports, and the old zoxide setup were all commented out. zoxide is set up at the end. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../PowerShell/Microsoft.PowerShell_profile.ps1 | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 index fb81976..8d6d545 100644 --- a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 +++ b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 @@ -1,12 +1,5 @@ -#$executionTime = Measure-Command ` -#{ - # Imports -# - Slowest imports are posh-git, Terminal-Icons -# Import-Module git-aliases -DisableNameChecking -#Import-Module posh-git Import-Module PSReadLine -#Import-Module Terminal-Icons $ProfilePath=Split-Path -parent $profile @@ -26,12 +19,6 @@ Set-PSReadlineKeyHandler -Chord 'Ctrl+r' -Function SwitchPredictionView Set-PSReadlineKeyHandler -Chord 'Ctrl+j' -Function NextSuggestion Set-PSReadlineKeyHandler -Chord 'Ctrl+k' -Function PreviousSuggestion -## Zoxide: https://github.com/ajeetdsouza/Zoxide -#Invoke-Expression (& { -# $hook = if ($PSVersionTable.PSVersion.Major -lt 6) { 'prompt' } else { 'pwd' } -# (zoxide init --hook $hook powershell | Out-String) -#}) - # Aliases . $ProfilePath/aliases.ps1 @@ -51,6 +38,3 @@ Invoke-Expression (&starship init powershell) # Zoxide Invoke-Expression (& { (zoxide init powershell | Out-String) }) - -#} -#Write-Host "$PSCommandPath execution time: $executionTime" From a8c05d8166c93053dffb04f827192231004ec39c Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:09:34 +0000 Subject: [PATCH 26/76] Windows: remove the komorebi and whkd configs I don't use the komorebi tiling window manager or its whkd hotkeys anymore. Remove their configs and the kstart/kstop aliases. chezmoi doesn't delete files it stops managing, so delete ~/.config/komorebi and ~/.config/whkdrc by hand. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 2 - .../Microsoft.PowerShell_profile.ps1 | 1 - Documents/PowerShell/aliases.ps1 | 8 - dot_config/komorebi/applications.yaml | 1519 ----------------- dot_config/komorebi/komorebi.json | 61 - dot_config/whkdrc | 76 - 6 files changed, 1667 deletions(-) delete mode 100644 dot_config/komorebi/applications.yaml delete mode 100644 dot_config/komorebi/komorebi.json delete mode 100644 dot_config/whkdrc diff --git a/.chezmoiignore b/.chezmoiignore index 9c262cb..38dbb1f 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -4,8 +4,6 @@ reference_dotfiles # windows files {{ if ne .chezmoi.os "windows" -}} -.config/komorebi -.config/whkdrc Documents decrypt-private-key-windows.ps1 install-tools-windows.ps1 diff --git a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 index 8d6d545..1188e36 100644 --- a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 +++ b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 @@ -23,7 +23,6 @@ Set-PSReadlineKeyHandler -Chord 'Ctrl+k' -Function PreviousSuggestion . $ProfilePath/aliases.ps1 # Environment variables -$env:KOMOREBI_CONFIG_HOME = Join-Path $HOME ".config\komorebi" $env:YAZI_FILE_ONE = "C:\Program Files\Git\usr\bin\file.exe" $env:YAZI_CONFIG_HOME = Join-Path $HOME ".config\yazi" $env:XDG_CONFIG_HOME = Join-Path $HOME ".config" diff --git a/Documents/PowerShell/aliases.ps1 b/Documents/PowerShell/aliases.ps1 index 75a1e78..a3b7f73 100644 --- a/Documents/PowerShell/aliases.ps1 +++ b/Documents/PowerShell/aliases.ps1 @@ -61,14 +61,6 @@ function lt { ls -alhrt @args } -function kstart { - komorebic start --whkd -} - -function kstop { - komorebic stop --whkd -} - function ssh-copy-id($remote) { cat ~/.ssh/id_rsa.pub | ssh $remote "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys" } diff --git a/dot_config/komorebi/applications.yaml b/dot_config/komorebi/applications.yaml deleted file mode 100644 index 549d575..0000000 --- a/dot_config/komorebi/applications.yaml +++ /dev/null @@ -1,1519 +0,0 @@ -- name: 1Password - identifier: - kind: Exe - id: 1Password.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: 1Password.exe - matching_strategy: Equals -- name: Ableton Live - identifier: - kind: Class - id: Ableton Live Window Class - matching_strategy: Legacy - float_identifiers: - - kind: Class - id: AbletonVstPlugClass - matching_strategy: Legacy - - kind: Class - id: Vst3PlugWindow - matching_strategy: Legacy -- name: Adobe Creative Cloud - identifier: - kind: Class - id: CreativeCloudDesktopWindowClass - matching_strategy: Legacy - options: - - tray_and_multi_window -- name: Adobe Photoshop - identifier: - kind: Class - id: Photoshop - matching_strategy: Legacy -- name: Adobe Premiere Pro - identifier: - kind: Class - id: Premiere Pro - matching_strategy: Legacy - float_identifiers: - - kind: Class - id: DroverLord - Window Class - matching_strategy: Equals -- name: Affinity Designer 2 - identifier: - kind: Title - id: Affinity Designer 2 - matching_strategy: Equals - options: - - force - float_identifiers: - - kind: Exe - id: Designer.exe - matching_strategy: Equals -- name: Affinity Photo 2 - identifier: - kind: Title - id: Affinity Photo 2 - matching_strategy: Equals - options: - - force - float_identifiers: - - kind: Exe - id: Photo.exe - matching_strategy: Equals -- name: Affinity Publisher 2 - identifier: - kind: Title - id: Affinity Publisher 2 - matching_strategy: Equals - options: - - force - float_identifiers: - - kind: Exe - id: Publisher.exe - matching_strategy: Equals -- name: Akiflow - identifier: - kind: Exe - id: Akiflow.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Amazon Chime - identifier: - kind: Exe - id: Chime.exe - matching_strategy: Equals - float_identifiers: - - kind: Title - id: Meeting Controls - matching_strategy: EndsWith -- name: Android Studio - identifier: - kind: Exe - id: studio64.exe - matching_strategy: Equals - options: - - object_name_change -- name: Anki - identifier: - kind: Exe - id: anki.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: ArmCord - identifier: - kind: Exe - id: ArmCord.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: AutoHotkey - identifier: - kind: Exe - id: AutoHotkeyU64.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Title - id: Window Spy - matching_strategy: StartsWith - - kind: Exe - id: AutoHotkeyUX.exe - matching_strategy: Equals -- name: Beeper - identifier: - kind: Exe - id: Beeper.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Bitwarden - identifier: - kind: Exe - id: Bitwarden.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Blitz - identifier: - kind: Exe - id: Blitz.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Bloxstrap - identifier: - kind: Exe - id: Bloxstrap.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: Bloxstrap.exe - matching_strategy: Equals -- name: Brave Browser - identifier: - kind: Exe - id: brave.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: CLion - identifier: - kind: Exe - id: clion64.exe - matching_strategy: Equals - options: - - object_name_change - - tray_and_multi_window - float_identifiers: - - kind: Class - id: SunAwtDialog - matching_strategy: Equals -- name: Calculator - identifier: - kind: Title - id: Calculator - matching_strategy: Equals - float_identifiers: - - kind: Title - id: Calculator - matching_strategy: Equals -- name: Citrix Receiver - identifier: - kind: Exe - id: SelfService.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Exe - id: SelfService.exe - matching_strategy: Equals -- name: Clash Verge - identifier: - kind: Exe - id: Clash Verge.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Clementine - identifier: - kind: Exe - id: clementine.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: CopyQ - identifier: - kind: Exe - id: copyq.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Core Temp - identifier: - kind: Exe - id: Core Temp.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: Core Temp.exe - matching_strategy: Equals -- name: Credential Manager UI Host - identifier: - kind: Exe - id: CredentialUIBroker.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: CredentialUIBroker.exe - matching_strategy: Equals -- name: Cron - identifier: - kind: Exe - id: Cron.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: DS4Windows - identifier: - kind: Exe - id: DS4Windows.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: DataGrip - identifier: - kind: Exe - id: datagrip64.exe - matching_strategy: Equals - options: - - object_name_change - - tray_and_multi_window -- name: Delphi applications - identifier: - kind: Class - id: TApplication - matching_strategy: Legacy - float_identifiers: - - kind: Class - id: TApplication - matching_strategy: Legacy - - kind: Class - id: TWizardForm - matching_strategy: Legacy -- name: Discord - identifier: - kind: Exe - id: Discord.exe - matching_strategy: Equals - options: - - tray_and_multi_window - - layered -- name: Discord Bot Client - identifier: - kind: Exe - id: DiscordBotClient.exe - matching_strategy: Equals -- name: DiscordCanary - identifier: - kind: Exe - id: DiscordCanary.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: DiscordDevelopment - identifier: - kind: Exe - id: DiscordDevelopment.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: DiscordPTB - identifier: - kind: Exe - id: DiscordPTB.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Docker Desktop - identifier: - kind: Exe - id: Docker Desktop.exe - matching_strategy: Equals -- name: Dropbox - identifier: - kind: Exe - id: Dropbox.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: Dropbox.exe - matching_strategy: Equals -- name: EA Desktop Client - identifier: - kind: Exe - id: EADesktop.exe - matching_strategy: Equals -- name: Eagle - identifier: - kind: Exe - id: Eagle.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: ElectronMail - identifier: - kind: Exe - id: ElectronMail.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Element - identifier: - kind: Exe - id: Element.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Elephicon - identifier: - kind: Exe - id: Elephicon.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: Elephicon.exe - matching_strategy: Equals -- name: ElevenClock - identifier: - kind: Exe - id: ElevenClock.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Elgato Camera Hub - identifier: - kind: Exe - id: Camera Hub.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: Camera Hub.exe - matching_strategy: Equals -- name: Elgato Control Center - identifier: - kind: Exe - id: ControlCenter.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: ControlCenter.exe - matching_strategy: Equals -- name: Elgato Wave Link - identifier: - kind: Exe - id: WaveLink.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: WaveLink.exe - matching_strategy: Equals -- name: Epic Games Launcher - identifier: - kind: Exe - id: EpicGamesLauncher.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Everything - identifier: - kind: Class - id: EVERYTHING - matching_strategy: Legacy - options: - - tray_and_multi_window -- name: Everything1.5a - identifier: - kind: Class - id: EVERYTHING_(1.5a) - matching_strategy: Legacy - options: - - force - - tray_and_multi_window -- name: FFMetrics - identifier: - kind: Exe - id: FFMetrics.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Figma - identifier: - kind: Exe - id: Figma.exe - matching_strategy: Equals -- name: Files - identifier: - kind: Exe - id: Files.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Flow Launcher - identifier: - kind: Exe - id: Flow.Launcher.exe - matching_strategy: Equals -- name: GOG Galaxy - identifier: - kind: Exe - id: GalaxyClient.exe - matching_strategy: Equals - options: - - force - - tray_and_multi_window - float_identifiers: - - kind: Class - id: Chrome_RenderWidgetHostHWND - matching_strategy: Legacy -- name: GitHub Credential Manager - identifier: - kind: Exe - id: git-credential-manager.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: git-credential-manager.exe - matching_strategy: Equals -- name: GitHub Desktop - identifier: - kind: Exe - id: GitHubDesktop.exe - matching_strategy: Equals -- name: GoPro Webcam - identifier: - kind: Class - id: GoPro Webcam - matching_strategy: Legacy - options: - - tray_and_multi_window -- name: Godot Manager - identifier: - kind: Exe - id: GodotManager.exe - matching_strategy: Equals - options: - - force - - object_name_change -- name: Golden Dict - identifier: - kind: Exe - id: GoldenDict.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Google Chrome - identifier: - kind: Exe - id: chrome.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Google Drive - identifier: - kind: Exe - id: GoogleDriveFS.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Exe - id: GoogleDriveFS.exe - matching_strategy: Equals -- name: Guitar Rig 7 - identifier: - kind: Exe - id: Guitar Rig 7.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: Guitar Rig 7.exe - matching_strategy: Equals -- name: Honeyview - identifier: - kind: Class - id: HoneyviewClassX - matching_strategy: Legacy -- name: Houdoku - identifier: - kind: Exe - id: Houdoku.exe - matching_strategy: Equals -- name: IntelliJ IDEA - identifier: - kind: Exe - id: idea64.exe - matching_strategy: Equals - options: - - object_name_change - - tray_and_multi_window - float_identifiers: - - kind: Class - id: SunAwtDialog - matching_strategy: Equals -- name: Itch.io - identifier: - kind: Exe - id: itch.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: KOOK - identifier: - kind: Exe - id: KOOK.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Keyviz - identifier: - kind: Exe - id: keyviz.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: keyviz.exe - matching_strategy: Equals -- name: Kleopatra - identifier: - kind: Exe - id: kleopatra.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Kotatogram - identifier: - kind: Exe - id: Kotatogram.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: LocalSend - identifier: - kind: Exe - id: localsend_app.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Logi Bolt - identifier: - kind: Exe - id: LogiBolt.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: LogiBolt.exe - matching_strategy: Equals -- name: LogiTune - identifier: - kind: Exe - id: LogiTune.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Exe - id: LogiTune.exe - matching_strategy: Equals -- name: Logitech G HUB - identifier: - kind: Exe - id: lghub.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Logitech Options - identifier: - kind: Exe - id: LogiOptionsUI.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: LogiOptionsUI.exe - matching_strategy: Equals -- name: Mailspring - identifier: - kind: Exe - id: mailspring.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: ManicTime - identifier: - kind: Exe - id: ManicTimeClient.exe - matching_strategy: Equals - options: - - force - - object_name_change - - tray_and_multi_window -- name: ManyCam - identifier: - kind: Exe - id: ManyCam.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Mattermost - identifier: - kind: Exe - id: Mattermost.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Mica For Everyone - identifier: - kind: Exe - id: MicaForEveryone.exe - matching_strategy: Equals -- name: Microsoft Active Accessibility - identifier: - kind: Class - id: '' - matching_strategy: Legacy - float_identifiers: - - kind: Class - id: '#32770' - matching_strategy: Legacy -- name: Microsoft Excel - identifier: - kind: Exe - id: EXCEL.EXE - matching_strategy: Equals - options: - - layered - float_identifiers: - - kind: Class - id: _WwB - matching_strategy: Legacy -- name: Microsoft Outlook - identifier: - kind: Exe - id: OUTLOOK.EXE - matching_strategy: Equals - options: - - layered - - tray_and_multi_window - float_identifiers: - - kind: Class - id: _WwB - matching_strategy: Legacy - - kind: Class - id: MsoSplash - matching_strategy: Equals -- name: Microsoft PC Manager - identifier: - kind: Exe - id: MSPCManager.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: MSPCManager.exe - matching_strategy: Equals -- name: Microsoft PowerPoint - identifier: - kind: Exe - id: POWERPNT.EXE - matching_strategy: Equals - options: - - layered - float_identifiers: - - kind: Class - id: _WwB - matching_strategy: Legacy -- name: Microsoft SQL Server Management Studio - identifier: - kind: Exe - id: Ssms.exe - matching_strategy: Equals -- name: Microsoft Teams - identifier: - kind: Class - id: TeamsWebView - matching_strategy: Legacy - options: - - tray_and_multi_window -- name: Microsoft Teams classic - identifier: - kind: Exe - id: Teams.exe - matching_strategy: Equals - float_identifiers: - - kind: Title - id: Microsoft Teams Notification - matching_strategy: Legacy - - kind: Title - id: Microsoft Teams Call - matching_strategy: Legacy -- name: Microsoft Word - identifier: - kind: Exe - id: WINWORD.EXE - matching_strategy: Equals - options: - - layered - float_identifiers: - - kind: Class - id: _WwB - matching_strategy: Legacy -- name: Modern Flyouts - identifier: - kind: Exe - id: ModernFlyoutsHost.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Morgen - identifier: - kind: Exe - id: Morgen.exe - matching_strategy: Equals -- name: Mozilla Firefox - identifier: - kind: Exe - id: firefox.exe - matching_strategy: Equals - options: - - object_name_change - - tray_and_multi_window - float_identifiers: - - kind: Class - id: MozillaTaskbarPreviewClass - matching_strategy: Legacy - - - kind: Title - id: Picture-in-Picture - matching_strategy: Equals - - kind: Exe - id: firefox.exe - matching_strategy: Equals -- name: MuseScore - identifier: - kind: Exe - id: MuseScore.exe - matching_strategy: Equals -- name: NVIDIA GeForce Experience - identifier: - kind: Exe - id: NVIDIA GeForce Experience.exe - matching_strategy: Equals -- name: NZXT CAM - identifier: - kind: Exe - id: NZXT CAM.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: NetEase Cloud Music - identifier: - kind: Exe - id: cloudmusic.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: NiceHash Miner - identifier: - kind: Exe - id: nhm_app.exe - matching_strategy: Equals - options: - - force -- name: NohBoard - identifier: - kind: Exe - id: NohBoard.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: NohBoard.exe - matching_strategy: Equals -- name: Notion Enhanced - identifier: - kind: Exe - id: Notion Enhanced.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: OBS Studio (32-bit) - identifier: - kind: Exe - id: obs32.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: OBS Studio (64-bit) - identifier: - kind: Exe - id: obs64.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: ONLYOFFICE Editors - identifier: - kind: Class - id: DocEditorsWindowClass - matching_strategy: Legacy - options: - - tray_and_multi_window -- name: Obsidian - identifier: - kind: Exe - id: Obsidian.exe - matching_strategy: Equals -- name: OneDrive - identifier: - kind: Exe - id: OneDrive.exe - matching_strategy: Equals - float_identifiers: - - kind: Class - id: OneDriveReactNativeWin32WindowClass - matching_strategy: Legacy -- name: OneQuick - identifier: - kind: Exe - id: OneQuick.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: OpenRGB - identifier: - kind: Exe - id: OpenRGB.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Paradox Launcher - identifier: - kind: Exe - id: Paradox Launcher.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: Paradox Launcher.exe - matching_strategy: Equals -- name: Passware Kit Forensic - identifier: - kind: Exe - id: PasswareKitForensic.exe - matching_strategy: Equals -- name: PhpStorm - identifier: - kind: Exe - id: phpstorm64.exe - matching_strategy: Equals - options: - - object_name_change - - tray_and_multi_window - float_identifiers: - - kind: Class - id: SunAwtDialog - matching_strategy: Equals -- name: Playnite - identifier: - kind: Exe - id: Playnite.DesktopApp.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Exe - id: Playnite.FullscreenApp.exe - matching_strategy: Equals -- name: Plexamp - identifier: - kind: Exe - id: Plexamp.exe - matching_strategy: Equals -- name: Postman - identifier: - kind: Exe - id: Postman.exe - matching_strategy: Equals -- name: PowerToys - identifier: - kind: Exe - id: PowerToys.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: PowerToys.ColorPickerUI.exe - matching_strategy: Equals - - kind: Exe - id: PowerToys.CropAndLock.exe - matching_strategy: Equals - - kind: Exe - id: PowerToys.ImageResizer.exe - matching_strategy: Equals - - kind: Exe - id: PowerToys.Peek.UI.exe - matching_strategy: Equals - - kind: Exe - id: PowerToys.PowerLauncher.exe - matching_strategy: Equals - - kind: Exe - id: PowerToys.PowerAccent.exe - matching_strategy: Equals -- name: Process Hacker - identifier: - kind: Exe - id: ProcessHacker.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Exe - id: ProcessHacker.exe - matching_strategy: Equals -- name: ProtonDrive - identifier: - kind: Exe - id: ProtonDrive.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: ProtonVPN - identifier: - kind: Exe - id: ProtonVPN.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: PyCharm - identifier: - kind: Exe - id: pycharm64.exe - matching_strategy: Equals - options: - - object_name_change - - tray_and_multi_window - float_identifiers: - - kind: Class - id: SunAwtDialog - matching_strategy: Equals -- name: QQ - identifier: - kind: Exe - id: QQ.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Title - id: 图片查看器 - matching_strategy: Legacy - - kind: Title - id: 群聊的聊天记录 - matching_strategy: Legacy - - kind: Title - id: 语音通话 - matching_strategy: Legacy -- name: QtScrcpy - identifier: - kind: Exe - id: QtScrcpy.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: QuickLook - identifier: - kind: Exe - id: QuickLook.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: QuickLook.exe - matching_strategy: Equals -- name: RepoZ - identifier: - kind: Exe - id: RepoZ.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: RepoZ.exe - matching_strategy: Equals -- name: Rider - identifier: - kind: Exe - id: rider64.exe - matching_strategy: Equals - options: - - object_name_change - - tray_and_multi_window - float_identifiers: - - kind: Class - id: SunAwtDialog - matching_strategy: Equals - - kind: Title - id: PopupMessageWindow - matching_strategy: Legacy -- name: Roblox FPS Unlocker - identifier: - kind: Exe - id: rbxfpsunlocker.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: RoundedTB - identifier: - kind: Exe - id: RoundedTB.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: RoundedTB.exe - matching_strategy: Equals -- name: RoundedTB - identifier: - kind: Exe - id: RoundedTB.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: RustRover - identifier: - kind: Exe - id: rustrover64.exe - matching_strategy: Equals - options: - - object_name_change - - tray_and_multi_window - float_identifiers: - - kind: Class - id: SunAwtDialog - matching_strategy: Equals -- name: Sandboxie Plus - identifier: - kind: Exe - id: SandMan.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: ShareX - identifier: - kind: Exe - id: ShareX.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Sideloadly - identifier: - kind: Exe - id: sideloadly.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: sideloadly.exe - matching_strategy: Equals -- name: Signal - identifier: - kind: Exe - id: Signal.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: SiriKali - identifier: - kind: Exe - id: sirikali.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Slack - identifier: - kind: Exe - id: Slack.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Class - id: Chrome_RenderWidgetHostHWND - matching_strategy: Legacy -- name: Slack - identifier: - kind: Exe - id: slack.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Class - id: Chrome_RenderWidgetHostHWND - matching_strategy: Legacy -- name: Smart Install Maker - identifier: - kind: Exe - id: SIM.exe - matching_strategy: Equals - float_identifiers: - - kind: Class - id: obj_App - matching_strategy: Legacy - - kind: Class - id: obj_Form - matching_strategy: Legacy -- name: SnippingTool - identifier: - kind: Exe - id: SnippingTool.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: SnippingTool.exe - matching_strategy: Equals -- name: SoulseekQt - identifier: - kind: Exe - id: SoulseekQt.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: SpaceWalker.Desktop - identifier: - kind: Exe - id: SpaceWalker.Desktop.exe - matching_strategy: Equals -- name: SpaceWalker.Unity.exe - identifier: - kind: Exe - id: SpaceWalker.Unity.exe - matching_strategy: Equals -- name: Spotify - identifier: - kind: Exe - id: Spotify.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Steam - identifier: - kind: Class - id: vguiPopupWindow - matching_strategy: Legacy - float_identifiers: - - - kind: Exe - id: steamwebhelper.exe - matching_strategy: Equals - - kind: Title - id: Steam - matching_strategy: DoesNotEqual -- name: Steam Beta - identifier: - kind: Class - id: SDL_app - matching_strategy: Legacy - options: - - tray_and_multi_window - float_identifiers: - - kind: Title - id: notificationtoasts_ - matching_strategy: Legacy -- name: Stremio - identifier: - kind: Exe - id: stremio.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: System Informer - identifier: - kind: Exe - id: SystemInformer.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Exe - id: SystemInformer.exe - matching_strategy: Equals -- name: SystemSettings - identifier: - kind: Exe - id: SystemSettings.exe - matching_strategy: Equals - float_identifiers: - - kind: Class - id: Shell_Dialog - matching_strategy: Legacy -- name: Task Manager - identifier: - kind: Exe - id: Taskmgr.exe - matching_strategy: Equals - float_identifiers: - - kind: Class - id: TaskManagerWindow - matching_strategy: Legacy -- name: Telegram - identifier: - kind: Exe - id: Telegram.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: TickTick - identifier: - kind: Exe - id: TickTick.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Total Commander - identifier: - kind: Exe - id: TotalCMD64.exe - matching_strategy: Equals - float_identifiers: - - kind: Class - id: TDLG2FILEACTIONMIN - matching_strategy: Equals -- name: TouchCursor - identifier: - kind: Exe - id: tcconfig.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Exe - id: tcconfig.exe - matching_strategy: Equals -- name: TranslucentTB - identifier: - kind: Exe - id: TranslucentTB.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: TranslucentTB.exe - matching_strategy: Equals -- name: TranslucentTB - identifier: - kind: Exe - id: TranslucentTB.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Unity Hub - identifier: - kind: Exe - id: Unity Hub.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Unreal Editor - identifier: - kind: Exe - id: UnrealEditor.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: VMware Horizon Client - identifier: - kind: Exe - id: vmware-view.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: VRCX - identifier: - kind: Exe - id: VRCX.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Visual Studio - identifier: - kind: Exe - id: devenv.exe - matching_strategy: Equals - options: - - object_name_change -- name: Visual Studio Code - identifier: - kind: Exe - id: Code.exe - matching_strategy: Equals -- name: Visual Studio Code - Insiders - identifier: - kind: Exe - id: Code - Insiders.exe - matching_strategy: Equals -- name: Voice.ai - identifier: - kind: Exe - id: VoiceAI.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: WebStorm - identifier: - kind: Exe - id: webstorm64.exe - matching_strategy: Equals - options: - - object_name_change - - tray_and_multi_window - float_identifiers: - - kind: Class - id: SunAwtDialog - matching_strategy: Equals -- name: WebTorrent Desktop - identifier: - kind: Exe - id: WebTorrent.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: WinZip (32-bit) - identifier: - kind: Exe - id: winzip32.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: winzip32.exe - matching_strategy: Equals -- name: WinZip (64-bit) - identifier: - kind: Exe - id: winzip64.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: winzip64.exe - matching_strategy: Equals -- name: Windows Console (conhost.exe) - identifier: - kind: Class - id: ConsoleWindowClass - matching_strategy: Equals - options: - - force -- name: Windows Explorer - identifier: - kind: Exe - id: explorer.exe - matching_strategy: Equals - float_identifiers: - - kind: Class - id: OperationStatusWindow - matching_strategy: Legacy - - kind: Title - id: Control Panel - matching_strategy: Legacy -- name: Windows Installer - identifier: - kind: Exe - id: msiexec.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: msiexec.exe - matching_strategy: Equals -- name: Windows Subsystem for Android - identifier: - kind: Exe - id: WsaClient.exe - matching_strategy: Equals - float_identifiers: - - kind: Class - id: android(splash) - matching_strategy: Legacy -- name: Windows Update Standalone Installer - identifier: - kind: Exe - id: wusa.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: wusa.exe - matching_strategy: Equals -- name: WingetUI - identifier: - kind: Exe - id: WingetUI.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: WingetUI - identifier: - kind: Exe - id: wingetui.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Wox - identifier: - kind: Exe - id: Wox.exe - matching_strategy: Equals - float_identifiers: - - kind: Title - id: Hotkey sink - matching_strategy: Legacy -- name: XAMPP Control Panel - identifier: - kind: Exe - id: xampp-control.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: Zebar - identifier: - kind: Exe - id: Zebar.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: Zebar.exe - matching_strategy: Equals -- name: Zoom - identifier: - kind: Exe - id: Zoom.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: Zoom.exe - matching_strategy: Equals -- name: komorebi-gui - identifier: - kind: Exe - id: komorebi-gui.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: komorebi-gui.exe - matching_strategy: Equals -- name: mpv - identifier: - kind: Class - id: mpv - matching_strategy: Legacy - options: - - object_name_change -- name: mpv.net - identifier: - kind: Exe - id: mpvnet.exe - matching_strategy: Equals - options: - - object_name_change -- name: paint.net - identifier: - kind: Exe - id: paintdotnet.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: paintdotnet.exe - matching_strategy: Equals -- name: pinentry - identifier: - kind: Exe - id: pinentry.exe - matching_strategy: Equals - float_identifiers: - - kind: Exe - id: pinentry.exe - matching_strategy: Equals -- name: qBittorrent - identifier: - kind: Exe - id: qbittorrent.exe - matching_strategy: Equals - options: - - tray_and_multi_window -- name: todoist - identifier: - kind: Exe - id: Todoist.exe - matching_strategy: Equals -- name: ueli - identifier: - kind: Exe - id: ueli.exe - matching_strategy: Equals - options: - - tray_and_multi_window - float_identifiers: - - kind: Exe - id: ueli.exe - matching_strategy: Equals diff --git a/dot_config/komorebi/komorebi.json b/dot_config/komorebi/komorebi.json deleted file mode 100644 index 2111233..0000000 --- a/dot_config/komorebi/komorebi.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.28/schema.json", - "app_specific_configuration_path": "$Env:USERPROFILE/.config/komorebi/applications.yaml", - "window_hiding_behaviour": "Cloak", - "cross_monitor_move_behaviour": "Insert", - "default_workspace_padding": 10, - "default_container_padding": 10, - "border": true, - "border_width": 8, - "border_offset": -1, - "border_colours": { - "single": "#42a5f5", - "stack": "#00a542", - "monocle": "#ff3399", - "unfocused": "#808080" - }, - "stackbar": { - "height": 40, - "mode": "OnStack", - "tabs": { - "width": 300, - "focused_text": "#00a542", - "unfocused_text": "#b3b3b3", - "background": "#141414" - } - }, - "monitors": [ - { - "workspaces": [ - { - "name": "I", - "layout": "BSP" - }, - { - "name": "II", - "layout": "VerticalStack" - }, - { - "name": "III", - "layout": "HorizontalStack" - }, - { - "name": "IV", - "layout": "UltrawideVerticalStack" - }, - { - "name": "V", - "layout": "Rows" - }, - { - "name": "VI", - "layout": "Grid" - }, - { - "name": "VII", - "layout": "RightMainVerticalStack" - } - ] - } - ] -} diff --git a/dot_config/whkdrc b/dot_config/whkdrc deleted file mode 100644 index 7d4682b..0000000 --- a/dot_config/whkdrc +++ /dev/null @@ -1,76 +0,0 @@ -.shell pwsh - -# Reload whkd configuration -# alt + o : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd -alt + o : taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell -alt + shift + o : komorebic reload-configuration - -# App shortcuts - these require shell to be pwsh / powershell -# The apps will be focused if open, or launched if not open -# alt + f : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox } -# alt + b : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome } - -alt + q : komorebic close -alt + m : komorebic minimize - -# Focus windows -alt + h : komorebic focus left -alt + j : komorebic focus down -alt + k : komorebic focus up -alt + l : komorebic focus right -alt + shift + oem_4 : komorebic cycle-focus previous # oem_4 is [ -alt + shift + oem_6 : komorebic cycle-focus next # oem_6 is ] - -# Move windows -alt + shift + h : komorebic move left -alt + shift + j : komorebic move down -alt + shift + k : komorebic move up -alt + shift + l : komorebic move right -alt + shift + return : komorebic promote - -# Stack windows -alt + left : komorebic stack left -alt + down : komorebic stack down -alt + up : komorebic stack up -alt + right : komorebic stack right -alt + oem_1 : komorebic unstack # oem_1 is ; -alt + oem_4 : komorebic cycle-stack previous # oem_4 is [ -alt + oem_6 : komorebic cycle-stack next # oem_6 is ] - -# Resize -alt + oem_plus : komorebic resize-axis horizontal increase -alt + oem_minus : komorebic resize-axis horizontal decrease -alt + shift + oem_plus : komorebic resize-axis vertical increase -alt + shift + oem_minus : komorebic resize-axis vertical decrease - -# Manipulate windows -alt + t : komorebic toggle-float -alt + shift + f : komorebic toggle-monocle - -# Window manager options -alt + shift + r : komorebic retile -alt + p : komorebic toggle-pause - -# Layouts -alt + x : komorebic flip-layout horizontal -alt + y : komorebic flip-layout vertical - -# Workspaces -alt + 1 : komorebic focus-workspace 0 -alt + 2 : komorebic focus-workspace 1 -alt + 3 : komorebic focus-workspace 2 -alt + 4 : komorebic focus-workspace 3 -alt + 5 : komorebic focus-workspace 4 -alt + 6 : komorebic focus-workspace 5 -alt + 7 : komorebic focus-workspace 6 -alt + 8 : komorebic focus-workspace 7 - -# Move windows across workspaces -alt + shift + 1 : komorebic move-to-workspace 0 -alt + shift + 2 : komorebic move-to-workspace 1 -alt + shift + 3 : komorebic move-to-workspace 2 -alt + shift + 4 : komorebic move-to-workspace 3 -alt + shift + 5 : komorebic move-to-workspace 4 -alt + shift + 6 : komorebic move-to-workspace 5 -alt + shift + 7 : komorebic move-to-workspace 6 -alt + shift + 8 : komorebic move-to-workspace 7 From b680dfa42ee7921bec8ce3a7a03b6ded0fcf9680 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 22:15:14 +0000 Subject: [PATCH 27/76] PowerShell: search history with atuin, like zsh mise now installs atuin on Windows too, and chezmoi applies its config there. The profile binds atuin to Ctrl+r and keeps the Up arrow's prefix search, like zsh. PSReadLine's prediction view, which Ctrl+r used to switch, stays on its default key, F2. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 1 - .github/test.ps1 | 7 ++++++- Documents/PowerShell/Microsoft.PowerShell_profile.ps1 | 9 ++++++--- dot_config/mise/config.toml | 4 ++-- dot_config/mise/mise.lock | 6 ++++++ 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.chezmoiignore b/.chezmoiignore index 38dbb1f..30f95ab 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -11,7 +11,6 @@ install-tools-windows.ps1 # unix files {{ if eq .chezmoi.os "windows" -}} -.config/atuin .config/zsh .tmux.conf .zshenv diff --git a/.github/test.ps1 b/.github/test.ps1 index a96dd8d..bef5f02 100644 --- a/.github/test.ps1 +++ b/.github/test.ps1 @@ -49,7 +49,7 @@ if ($LASTEXITCODE -ne 0 -or $output.Trim()) { Fail "PowerShell printed on startu # Prints the problems it finds $checks = @' $installs = Join-Path $env:LOCALAPPDATA 'mise\installs' -$tools = 'bat', 'delta', 'dust', 'fd', 'fzf', 'gh', 'go', 'lazygit', 'lsd', +$tools = 'atuin', 'bat', 'delta', 'dust', 'fd', 'fzf', 'gh', 'go', 'lazygit', 'lsd', 'node', 'npm', 'nvim', 'rg', 'starship', 'uv', 'uvx', 'ya', 'yazi', 'zoxide' foreach ($tool in $tools) { $source = (Get-Command $tool -ErrorAction Ignore | Select-Object -First 1).Source @@ -60,6 +60,11 @@ foreach ($tool in $tools) { $version = if ($tool -eq 'go') { & $tool version 2>&1 } else { & $tool --version 2>&1 } if ($LASTEXITCODE -ne 0) { "$tool doesn't run: $version" } } +# Vi insert mode's keys. Command mode's are listed as and +$ctrlR = (Get-PSReadLineKeyHandler -Chord 'Ctrl+r' | Where-Object Key -eq 'Ctrl+r').Function +if ($ctrlR -ne 'Runs Atuin search') { "Ctrl+r runs '$ctrlR', not Atuin" } +$upArrow = (Get-PSReadLineKeyHandler -Chord 'UpArrow' | Where-Object Key -eq 'UpArrow').Function +if ($upArrow -ne 'HistorySearchBackward') { "UpArrow runs '$upArrow', not HistorySearchBackward" } if (-not (Get-Command __zoxide_z -ErrorAction Ignore)) { "zoxide isn't initialized" } '@ $output = Invoke-NewPowerShell $checks diff --git a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 index 1188e36..136b609 100644 --- a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 +++ b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 @@ -15,7 +15,6 @@ Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward Set-PSReadLineOption -HistorySearchCursorMovesToEnd -Set-PSReadlineKeyHandler -Chord 'Ctrl+r' -Function SwitchPredictionView Set-PSReadlineKeyHandler -Chord 'Ctrl+j' -Function NextSuggestion Set-PSReadlineKeyHandler -Chord 'Ctrl+k' -Function PreviousSuggestion @@ -28,10 +27,14 @@ $env:YAZI_CONFIG_HOME = Join-Path $HOME ".config\yazi" $env:XDG_CONFIG_HOME = Join-Path $HOME ".config" # Tools installed by mise: https://mise.jdx.dev -# Before starship and zoxide, which it puts on PATH. Starship replaces mise's -# prompt hook, but mise still updates PATH on cd and after mise commands +# Before atuin, starship and zoxide, which it puts on PATH. Starship replaces +# mise's prompt hook, but mise still updates PATH on cd and after mise commands (& "$HOME\.local\bin\mise.exe" activate pwsh) | Out-String | Invoke-Expression +# Atuin: https://github.com/atuinsh/atuin +# Replaces Ctrl+r. The Up arrow keeps the prefix search above +atuin init powershell --disable-up-arrow --disable-ai | Out-String | Invoke-Expression + # Prompt Invoke-Expression (&starship init powershell) diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index cd17a48..5959581 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -26,8 +26,8 @@ lockfile_platforms = ["linux-arm64", "linux-x64", "macos-arm64", "windows-x64"] # On Linux, the glibc builds of atuin and yazi need glibc 2.39 (Ubuntu 24.04), # so use their static musl builds. mise uses glibc builds for the other tools, # which matters for lsd: its musl build shows uid/gid instead of user names. -# Only zsh uses atuin, so Windows skips it. mise already skips tmux there. -atuin = { version = "latest", libc = "musl", os = ["linux", "macos"] } +# mise skips tmux on Windows, which it has no builds for. +atuin = { version = "latest", libc = "musl" } bat = "latest" delta = "latest" dust = "latest" diff --git a/dot_config/mise/mise.lock b/dot_config/mise/mise.lock index d9d694b..0497f49 100644 --- a/dot_config/mise/mise.lock +++ b/dot_config/mise/mise.lock @@ -28,6 +28,12 @@ url = "https://github.com/atuinsh/atuin/releases/download/v18.24.5/atuin-aarch64 url_api = "https://api.github.com/repos/atuinsh/atuin/releases/assets/707958967" provenance = "github-attestations" +[tools.atuin."platforms.windows-x64"] +checksum = "sha256:8ec5f2519d8019c129d3fb83a6c97eca29aa23391d8802af306d0c6de8cde30e" +url = "https://github.com/atuinsh/atuin/releases/download/v18.24.5/atuin-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/atuinsh/atuin/releases/assets/707959190" +provenance = "github-attestations" + [[tools.bat]] version = "0.26.1" backend = "aqua:sharkdp/bat" From 4bb04619c3b766032e70a8643965e836b2a42d61 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 23:26:59 +0000 Subject: [PATCH 28/76] Add gcc to the Windows dev bundle for nvim-treesitter The deleted run_install-windows.ps1 installed gcc with `choco install mingw`, which nvim-treesitter uses to compile its parsers. The LLVM in dev.json doesn't replace it: on Windows, LazyVim only looks for MSVC's cl, gcc or $CC. Add WinLibs, the gcc build that LazyVim recommends. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 1 + reference_dotfiles/wingetui/dev.json | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/README.md b/README.md index 2efe089..486479e 100644 --- a/README.md +++ b/README.md @@ -114,3 +114,4 @@ again. 4. Optional: install the other software I use with [UniGetUI](https://github.com/Devolutions/UniGetUI), by importing the bundles in [`reference_dotfiles/wingetui`](./reference_dotfiles/wingetui/) + - `dev.json` includes gcc ([WinLibs](https://winlibs.com)), which LazyVim needs to compile treesitter parsers diff --git a/reference_dotfiles/wingetui/dev.json b/reference_dotfiles/wingetui/dev.json index 6d88c79..7ae5367 100644 --- a/reference_dotfiles/wingetui/dev.json +++ b/reference_dotfiles/wingetui/dev.json @@ -1,6 +1,28 @@ { "export_version": 2, "packages": [ + { + "Id": "BrechtSanders.WinLibs.POSIX.UCRT", + "Name": "WinLibs (POSIX threads, UCRT runtime)", + "Version": "16.2.0-14.0.0-r3", + "Source": "winget", + "ManagerName": "Winget", + "InstallationOptions": { + "SkipHashCheck": false, + "InteractiveInstallation": false, + "RunAsAdministrator": false, + "Architecture": "", + "InstallationScope": "", + "CustomParameters": [], + "PreRelease": false, + "CustomInstallLocation": "", + "Version": "" + }, + "Updates": { + "UpdatesIgnored": false, + "IgnoredVersion": "" + } + }, { "Id": "Docker.DockerDesktop", "Name": "Docker Desktop", From c121737de8ed41141ae4179540baa10690a7486e Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 23:27:10 +0000 Subject: [PATCH 29/76] Make VS Code installable from the Windows dev bundle The deleted run_install-windows.ps1 installed VS Code with winget, but dev.json only listed it as an incompatible "Local PC" package, which UniGetUI logs but can't install. Replace that entry with the winget one. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- reference_dotfiles/wingetui/dev.json | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/reference_dotfiles/wingetui/dev.json b/reference_dotfiles/wingetui/dev.json index 7ae5367..1361e6b 100644 --- a/reference_dotfiles/wingetui/dev.json +++ b/reference_dotfiles/wingetui/dev.json @@ -89,6 +89,28 @@ "IgnoredVersion": "" } }, + { + "Id": "Microsoft.VisualStudioCode", + "Name": "Microsoft Visual Studio Code", + "Version": "1.144.0", + "Source": "winget", + "ManagerName": "Winget", + "InstallationOptions": { + "SkipHashCheck": false, + "InteractiveInstallation": false, + "RunAsAdministrator": false, + "Architecture": "", + "InstallationScope": "", + "CustomParameters": [], + "PreRelease": false, + "CustomInstallLocation": "", + "Version": "" + }, + "Updates": { + "UpdatesIgnored": false, + "IgnoredVersion": "" + } + }, { "Id": "Microsoft.WindowsTerminal", "Name": "Windows Terminal", @@ -120,12 +142,6 @@ "Version": "7.4.2.0", "Source": "Local PC" }, - { - "Id": "Microsoft.VSCode_8te5zrwvmdcsm", - "Name": "Visual Studio Code", - "Version": "1.0.0.0", - "Source": "Local PC" - }, { "Id": "MicrosoftCorporationII.WindowsSubsyste\u2026", "Name": "Windows Subsystem for Linux", From 91da897048ba77652ec00e319504e544765f6a6f Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 23:27:48 +0000 Subject: [PATCH 30/76] Install gcc on Linux when there's no C compiler nvim-treesitter compiles its parsers with cc, which minimal Ubuntu installs like the Docker image don't have. CI's Ubuntu 22.04 container now installs it, and the test checks that cc compiles a C program. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/test.sh | 6 ++++++ run_onchange_before_install-packages-unix.sh.tmpl | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/test.sh b/.github/test.sh index 4537dc5..5602525 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -81,6 +81,12 @@ case $login_shell in esac echo "::endgroup::" +echo "::group::Check the C compiler" +# nvim-treesitter compiles its parsers with it +printf '#include \nint main(void) { return EXIT_SUCCESS; }\n' | cc -x c -o /dev/null - || + fail "cc can't compile a C program" +echo "::endgroup::" + echo "::group::Check zsh" # GitHub's Ubuntu image makes everything in /usr/share writable by everyone, # including zsh's completion directories, so compinit would ask whether to use diff --git a/run_onchange_before_install-packages-unix.sh.tmpl b/run_onchange_before_install-packages-unix.sh.tmpl index 63dfb1e..a36a067 100644 --- a/run_onchange_before_install-packages-unix.sh.tmpl +++ b/run_onchange_before_install-packages-unix.sh.tmpl @@ -23,6 +23,7 @@ need_lib() { # need_lib LIBRARY PACKAGE need curl need git need zsh +need cc gcc # nvim-treesitter compiles its parsers with it need_lib libatomic.so.1 libatomic1 # Node.js from mise links against it if [ ${#missing[@]} -gt 0 ]; then From ef0a0f77026391d39ac8698ae1252a88908d2479 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Tue, 10 Nov 2026 23:52:26 +0000 Subject: [PATCH 31/76] Add the device and remote access apps to the Windows apps bundle The deleted run_install-windows.ps1 was the only record of Logitech G HUB, Logi Bolt, Logi Tune, Logi Options+, Logitech Unifying Software, Plantronics Hub and TeamViewer. Add them to apps.json from winget's default source, with the default options, in the bundle's name order. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- reference_dotfiles/wingetui/apps.json | 154 ++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) diff --git a/reference_dotfiles/wingetui/apps.json b/reference_dotfiles/wingetui/apps.json index 350cae3..7309449 100644 --- a/reference_dotfiles/wingetui/apps.json +++ b/reference_dotfiles/wingetui/apps.json @@ -89,6 +89,116 @@ "IgnoredVersion": "*" } }, + { + "Id": "Logitech.LogiBolt", + "Name": "Logi Bolt", + "Version": "1.2.6024.0", + "Source": "winget", + "ManagerName": "Winget", + "InstallationOptions": { + "SkipHashCheck": false, + "InteractiveInstallation": false, + "RunAsAdministrator": false, + "Architecture": "", + "InstallationScope": "", + "CustomParameters": [], + "PreRelease": false, + "CustomInstallLocation": "", + "Version": "" + }, + "Updates": { + "UpdatesIgnored": false, + "IgnoredVersion": "" + } + }, + { + "Id": "Logitech.OptionsPlus", + "Name": "Logi Options+", + "Version": "2.9.994631", + "Source": "winget", + "ManagerName": "Winget", + "InstallationOptions": { + "SkipHashCheck": false, + "InteractiveInstallation": false, + "RunAsAdministrator": false, + "Architecture": "", + "InstallationScope": "", + "CustomParameters": [], + "PreRelease": false, + "CustomInstallLocation": "", + "Version": "" + }, + "Updates": { + "UpdatesIgnored": false, + "IgnoredVersion": "" + } + }, + { + "Id": "Logitech.LogiTune", + "Name": "Logi Tune", + "Version": "3.15.96.0", + "Source": "winget", + "ManagerName": "Winget", + "InstallationOptions": { + "SkipHashCheck": false, + "InteractiveInstallation": false, + "RunAsAdministrator": false, + "Architecture": "", + "InstallationScope": "", + "CustomParameters": [], + "PreRelease": false, + "CustomInstallLocation": "", + "Version": "" + }, + "Updates": { + "UpdatesIgnored": false, + "IgnoredVersion": "" + } + }, + { + "Id": "Logitech.GHUB", + "Name": "Logitech G HUB", + "Version": "2026.7.992920", + "Source": "winget", + "ManagerName": "Winget", + "InstallationOptions": { + "SkipHashCheck": false, + "InteractiveInstallation": false, + "RunAsAdministrator": false, + "Architecture": "", + "InstallationScope": "", + "CustomParameters": [], + "PreRelease": false, + "CustomInstallLocation": "", + "Version": "" + }, + "Updates": { + "UpdatesIgnored": false, + "IgnoredVersion": "" + } + }, + { + "Id": "Logitech.UnifyingSoftware", + "Name": "Logitech Unifying Software", + "Version": "2.52.33", + "Source": "winget", + "ManagerName": "Winget", + "InstallationOptions": { + "SkipHashCheck": false, + "InteractiveInstallation": false, + "RunAsAdministrator": false, + "Architecture": "", + "InstallationScope": "", + "CustomParameters": [], + "PreRelease": false, + "CustomInstallLocation": "", + "Version": "" + }, + "Updates": { + "UpdatesIgnored": false, + "IgnoredVersion": "" + } + }, { "Id": "Mozilla.Thunderbird", "Name": "Mozilla Thunderbird (x64 en-CA)", @@ -155,6 +265,28 @@ "IgnoredVersion": "" } }, + { + "Id": "Poly.PlantronicsHub", + "Name": "Plantronics Hub Software", + "Version": "3.25.54307.37251", + "Source": "winget", + "ManagerName": "Winget", + "InstallationOptions": { + "SkipHashCheck": false, + "InteractiveInstallation": false, + "RunAsAdministrator": false, + "Architecture": "", + "InstallationScope": "", + "CustomParameters": [], + "PreRelease": false, + "CustomInstallLocation": "", + "Version": "" + }, + "Updates": { + "UpdatesIgnored": false, + "IgnoredVersion": "" + } + }, { "Id": "Plex.Plex", "Name": "Plex", @@ -265,6 +397,28 @@ "IgnoredVersion": "" } }, + { + "Id": "TeamViewer.TeamViewer", + "Name": "TeamViewer", + "Version": "15.83.5", + "Source": "winget", + "ManagerName": "Winget", + "InstallationOptions": { + "SkipHashCheck": false, + "InteractiveInstallation": false, + "RunAsAdministrator": false, + "Architecture": "", + "InstallationScope": "", + "CustomParameters": [], + "PreRelease": false, + "CustomInstallLocation": "", + "Version": "" + }, + "Updates": { + "UpdatesIgnored": false, + "IgnoredVersion": "" + } + }, { "Id": "VPNetwork.TorGuard", "Name": "VPNetwork LLC - TorGuard - Online Priv\u2026", From 47c0460bee737a9cb21c1871492fbc386f9b3a17 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:50:44 +0000 Subject: [PATCH 32/76] Rename the tools scripts to install-cli-tools chezmoi runs the after scripts in alphabetical order of their names. The desktop apps scripts that come next are named install-desktop-apps-*, so with this rename they run after the CLI tools, and an app that fails to install can't stop the tools from installing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 4 ++-- README.md | 4 ++-- dot_config/mise/config.toml | 4 ++-- dot_zshrc | 2 +- ....tmpl => run_onchange_after_install-cli-tools-unix.sh.tmpl | 0 ...l => run_onchange_after_install-cli-tools-windows.ps1.tmpl | 0 6 files changed, 7 insertions(+), 7 deletions(-) rename run_onchange_after_install-tools-unix.sh.tmpl => run_onchange_after_install-cli-tools-unix.sh.tmpl (100%) rename run_onchange_after_install-tools-windows.ps1.tmpl => run_onchange_after_install-cli-tools-windows.ps1.tmpl (100%) diff --git a/.chezmoiignore b/.chezmoiignore index 30f95ab..a3aa4b6 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -6,7 +6,7 @@ reference_dotfiles {{ if ne .chezmoi.os "windows" -}} Documents decrypt-private-key-windows.ps1 -install-tools-windows.ps1 +install-cli-tools-windows.ps1 {{- end }} # unix files @@ -17,7 +17,7 @@ install-tools-windows.ps1 .zshrc decrypt-private-key-unix.sh install-packages-unix.sh -install-tools-unix.sh +install-cli-tools-unix.sh {{- end }} # encrypted files diff --git a/README.md b/README.md index 486479e..bb782a4 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,12 @@ The files I think are most notable are listed below: - Unix-specific, rerun by chezmoi only when they change: - [`run_onchange_before_install-packages-unix.sh.tmpl`](./run_onchange_before_install-packages-unix.sh.tmpl): installs the missing system packages and makes zsh the login shell. Only uses sudo when something is missing - - [`run_onchange_after_install-tools-unix.sh.tmpl`](./run_onchange_after_install-tools-unix.sh.tmpl): + - [`run_onchange_after_install-cli-tools-unix.sh.tmpl`](./run_onchange_after_install-cli-tools-unix.sh.tmpl): installs mise and the tools in its config, and generates their zsh completions. Also reruns when the mise config or `mise.lock` changes - Plugins cloned from git: [`.chezmoiexternal.toml`](./.chezmoiexternal.toml) - Windows-specific: - - [`run_onchange_after_install-tools-windows.ps1.tmpl`](./run_onchange_after_install-tools-windows.ps1.tmpl): + - [`run_onchange_after_install-cli-tools-windows.ps1.tmpl`](./run_onchange_after_install-cli-tools-windows.ps1.tmpl): installs mise and the tools in its config. Reruns when it, the mise config or `mise.lock` changes - The other software I use is managed with [UniGetUI](https://github.com/Devolutions/UniGetUI) (formerly diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index 5959581..cdda5c6 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -1,6 +1,6 @@ # Tools that mise (https://mise.jdx.dev) installs. chezmoi applies this file and -# mise.lock to ~/.config/mise, and the run_onchange_after_install-tools scripts -# install the tools whenever either changes. +# mise.lock to ~/.config/mise, and the run_onchange_after_install-cli-tools +# scripts install the tools whenever either changes. # # - mise installs the tools in ~/.local/share/mise/installs, or # %LOCALAPPDATA%\mise\installs on Windows. `mise activate` in .zshrc and the diff --git a/dot_zshrc b/dot_zshrc index 9450b58..67157d9 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -7,7 +7,7 @@ autoload -Uz compinit zmodload zsh/complist # A full compinit looks for new completions and runs a security check, which is # slow, so only run it when the dump is missing or a day old. Otherwise load the -# dump as is. install-tools-unix.sh deletes the dump when it updates completions. +# dump as is. install-cli-tools-unix.sh deletes it when it updates completions. () { setopt local_options extended_glob if [[ -n $HOME/.zcompdump(#qN.mh-24) ]]; then diff --git a/run_onchange_after_install-tools-unix.sh.tmpl b/run_onchange_after_install-cli-tools-unix.sh.tmpl similarity index 100% rename from run_onchange_after_install-tools-unix.sh.tmpl rename to run_onchange_after_install-cli-tools-unix.sh.tmpl diff --git a/run_onchange_after_install-tools-windows.ps1.tmpl b/run_onchange_after_install-cli-tools-windows.ps1.tmpl similarity index 100% rename from run_onchange_after_install-tools-windows.ps1.tmpl rename to run_onchange_after_install-cli-tools-windows.ps1.tmpl From 44e3f2190cb251eab4c2d657b2a0c6283afd1765 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:53:29 +0000 Subject: [PATCH 33/76] Install python3-venv and unzip on Linux for Mason LazyVim's Mason installs pyrefly from PyPI into a virtual environment, which Ubuntu's Python can only create once python3-venv is installed, and it unpacks stylua with unzip. Neither comes with a minimal Ubuntu, so Mason failed to install them on a fresh machine. python3-venv has no command to look for, so the script checks for the ensurepip module it provides, which is what creating a venv needs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- run_onchange_before_install-packages-unix.sh.tmpl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/run_onchange_before_install-packages-unix.sh.tmpl b/run_onchange_before_install-packages-unix.sh.tmpl index a36a067..f58c78a 100644 --- a/run_onchange_before_install-packages-unix.sh.tmpl +++ b/run_onchange_before_install-packages-unix.sh.tmpl @@ -24,6 +24,11 @@ need curl need git need zsh need cc gcc # nvim-treesitter compiles its parsers with it +need unzip # Mason unpacks some tools with it, such as stylua +# Mason installs Python tools, such as pyrefly, in virtual environments, which +# Ubuntu's Python can only create with python3-venv +need python3 +python3 -c 'import ensurepip' 2>/dev/null || missing+=(python3-venv) need_lib libatomic.so.1 libatomic1 # Node.js from mise links against it if [ ${#missing[@]} -gt 0 ]; then From f9718383bdf25b34ca2c139ef456771d017842ff Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:54:41 +0000 Subject: [PATCH 34/76] Install the tree-sitter CLI with mise nvim-treesitter's main branch, which LazyVim uses, builds its parsers with the tree-sitter CLI, so without it Neovim couldn't highlight anything on a fresh machine. The official builds of the CLI need glibc 2.39, which Ubuntu 22.04 doesn't have, so mise installs conda-forge's build of it, which runs on all of the platforms in mise.lock. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/test.ps1 | 2 +- .github/test.sh | 2 +- dot_config/mise/config.toml | 3 ++ dot_config/mise/mise.lock | 81 +++++++++++++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 2 deletions(-) diff --git a/.github/test.ps1 b/.github/test.ps1 index bef5f02..c3b978a 100644 --- a/.github/test.ps1 +++ b/.github/test.ps1 @@ -50,7 +50,7 @@ if ($LASTEXITCODE -ne 0 -or $output.Trim()) { Fail "PowerShell printed on startu $checks = @' $installs = Join-Path $env:LOCALAPPDATA 'mise\installs' $tools = 'atuin', 'bat', 'delta', 'dust', 'fd', 'fzf', 'gh', 'go', 'lazygit', 'lsd', - 'node', 'npm', 'nvim', 'rg', 'starship', 'uv', 'uvx', 'ya', 'yazi', 'zoxide' + 'node', 'npm', 'nvim', 'rg', 'starship', 'tree-sitter', 'uv', 'uvx', 'ya', 'yazi', 'zoxide' foreach ($tool in $tools) { $source = (Get-Command $tool -ErrorAction Ignore | Select-Object -First 1).Source if ($source -notlike "$installs\*") { diff --git a/.github/test.sh b/.github/test.sh index 5602525..868092f 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -128,7 +128,7 @@ done [[ $(bindkey -M viins "^R") == *" atuin-"* ]] || print "Ctrl-R: $(bindkey -M viins "^R")" (( $+functions[__zoxide_z] )) || print "zoxide isn'\''t initialized" ' -tools=(atuin bat delta dust fd fzf gh go lazygit lsd node npm nvim rg starship tmux uv uvx ya yazi zoxide) +tools=(atuin bat delta dust fd fzf gh go lazygit lsd node npm nvim rg starship tmux tree-sitter uv uvx ya yazi zoxide) output=$(in_pty zsh -i -c "$zsh_checks" zsh "${tools[@]}") && status=0 || status=$? if [ "$status" -ne 0 ] || [ -n "$output" ]; then fail "The zsh checks exited with $status and printed: $output" diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index cdda5c6..593189f 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -29,6 +29,9 @@ lockfile_platforms = ["linux-arm64", "linux-x64", "macos-arm64", "windows-x64"] # mise skips tmux on Windows, which it has no builds for. atuin = { version = "latest", libc = "musl" } bat = "latest" +# The tree-sitter CLI, which nvim-treesitter uses to build parsers. Its +# official builds need glibc 2.39, so install conda-forge's from conda instead. +"conda:tree-sitter-cli" = "latest" delta = "latest" dust = "latest" fd = "latest" diff --git a/dot_config/mise/mise.lock b/dot_config/mise/mise.lock index 0497f49..a336b11 100644 --- a/dot_config/mise/mise.lock +++ b/dot_config/mise/mise.lock @@ -2,6 +2,46 @@ lockfile_version = 4 +[conda-packages.linux-arm64."_openmp_mutex-4.5-20_gnu"] +url = "https://conda.anaconda.org/conda-forge/linux-aarch64/_openmp_mutex-4.5-20_gnu.conda" +checksum = "sha256:a2527b1d81792a0ccd2c05850960df119c2b6d8f5fdec97f2db7d25dc23b1068" + +[conda-packages.linux-arm64."libgcc-16.2.0-h205dda4_7"] +url = "https://conda.anaconda.org/conda-forge/linux-aarch64/libgcc-16.2.0-h205dda4_7.conda" +checksum = "sha256:eae7a3449d5a3b5351c5427137c076cc3fc826645c7bfc42dc10772b783826f1" + +[conda-packages.linux-arm64."libgomp-16.2.0-h8acb6b2_7"] +url = "https://conda.anaconda.org/conda-forge/linux-aarch64/libgomp-16.2.0-h8acb6b2_7.conda" +checksum = "sha256:4406fd67c5beeb99b9372f9bf07aa3e40ca141e337eceebac3ff64aa72799494" + +[conda-packages.linux-x64."_openmp_mutex-4.5-20_gnu"] +url = "https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-20_gnu.conda" +checksum = "sha256:1dd3fffd892081df9726d7eb7e0dea6198962ba775bd88842135a4ddb4deb3c9" + +[conda-packages.linux-x64."libgcc-16.2.0-ha9f2e26_7"] +url = "https://conda.anaconda.org/conda-forge/linux-64/libgcc-16.2.0-ha9f2e26_7.conda" +checksum = "sha256:e031634c3a928f9594eba868bc46ef5230d6571a364a0c63215b06c4563bfcea" + +[conda-packages.linux-x64."libgomp-16.2.0-he0feb66_7"] +url = "https://conda.anaconda.org/conda-forge/linux-64/libgomp-16.2.0-he0feb66_7.conda" +checksum = "sha256:92a0bb350c7be6a4eedcb4e111c60aefd176018e6b1c009a6e025dbe9bbcd758" + +[conda-packages.windows-x64."ucrt-10.0.26100.0-h57928b3_0"] +url = "https://conda.anaconda.org/conda-forge/win-64/ucrt-10.0.26100.0-h57928b3_0.conda" +checksum = "sha256:3005729dce6f3d3f5ec91dfc49fc75a0095f9cd23bab49efb899657297ac91a5" + +[conda-packages.windows-x64."vc-14.5-hda273ae_43"] +url = "https://conda.anaconda.org/conda-forge/win-64/vc-14.5-hda273ae_43.conda" +checksum = "sha256:b021e65bf2240a3256639913aef12f14e63c396170a103285adecfbff9bb01ac" + +[conda-packages.windows-x64."vc14_runtime-14.51.36247-h072b54c_43"] +url = "https://conda.anaconda.org/conda-forge/win-64/vc14_runtime-14.51.36247-h072b54c_43.conda" +checksum = "sha256:02e21ff2ff06c7e45e10b72953cb2b1739e8dad7a4a8a49c814897cfabefaada" + +[conda-packages.windows-x64."vcomp14-14.51.36247-h1c3f1cb_43"] +url = "https://conda.anaconda.org/conda-forge/win-64/vcomp14-14.51.36247-h1c3f1cb_43.conda" +checksum = "sha256:159fe1bb304d6a8e82a0e4b71762c05325cff3d472e4a1d49465c9def61a785e" + [[tools.atuin]] version = "18.24.5" backend = "aqua:atuinsh/atuin" @@ -59,6 +99,47 @@ checksum = "sha256:0f729b4b6f5f28d395c641eacc2e9ff68d0096b85aa0eec344aa62425144b url = "https://github.com/sharkdp/bat/releases/download/v0.26.1/bat-v0.26.1-x86_64-pc-windows-msvc.zip" url_api = "https://api.github.com/repos/sharkdp/bat/releases/assets/323549116" +[[tools."conda:tree-sitter-cli"]] +version = "0.27.2" +backend = "conda:tree-sitter-cli" +specifiers = ["latest"] + +[tools."conda:tree-sitter-cli".options] +channel = "conda-forge" + +[tools."conda:tree-sitter-cli"."platforms.linux-arm64"] +checksum = "sha256:1a88951d519eb3d755de0224d38b85a6bed4689f51e5f55e8cb58a613b20aab1" +url = "https://conda.anaconda.org/conda-forge/linux-aarch64/tree-sitter-cli-0.27.2-h4f14f73_0.conda" +conda_deps = [ + "libgcc-16.2.0-h205dda4_7", + "_openmp_mutex-4.5-20_gnu", + "libgomp-16.2.0-h8acb6b2_7", +] + +[tools."conda:tree-sitter-cli"."platforms.linux-x64"] +checksum = "sha256:86ef467d84625d866710e056471df1f3007e958bc16abd898400b25b7afd9867" +url = "https://conda.anaconda.org/conda-forge/linux-64/tree-sitter-cli-0.27.2-hc7555a6_0.conda" +conda_deps = [ + "libgcc-16.2.0-ha9f2e26_7", + "_openmp_mutex-4.5-20_gnu", + "libgomp-16.2.0-he0feb66_7", +] + +[tools."conda:tree-sitter-cli"."platforms.macos-arm64"] +checksum = "sha256:bb012eb0bbaf3fc315be06168906a62d12c856e1ea1cf903754165e0bd6645cc" +url = "https://conda.anaconda.org/conda-forge/osx-arm64/tree-sitter-cli-0.27.2-h9f3b986_0.conda" +conda_deps = [] + +[tools."conda:tree-sitter-cli"."platforms.windows-x64"] +checksum = "sha256:f1553e6aca03a74b5469fe397c468ad2e4083e6932369dab04274df778bef082" +url = "https://conda.anaconda.org/conda-forge/win-64/tree-sitter-cli-0.27.2-h18a1a76_0.conda" +conda_deps = [ + "vc-14.5-hda273ae_43", + "vc14_runtime-14.51.36247-h072b54c_43", + "vcomp14-14.51.36247-h1c3f1cb_43", + "ucrt-10.0.26100.0-h57928b3_0", +] + [[tools.delta]] version = "0.20.1" backend = "aqua:dandavison/delta" From dc458e6c80916d5851f4ac9b470005565830556a Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:58:24 +0000 Subject: [PATCH 35/76] Install gcc and Python on Windows when they're missing nvim-treesitter compiles its parsers with a C compiler, and Mason installs pyrefly with Python, so Neovim couldn't do either on a fresh Windows machine, which has neither. The new script installs them with winget before chezmoi applies the dotfiles, like the Unix packages script does with apt, rather than leaving gcc in the optional UniGetUI bundle. Windows comes with a python command that only opens the Microsoft Store, so the script checks that python runs Python 3, the same way Mason does. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 1 + README.md | 14 ++++++----- reference_dotfiles/wingetui/dev.json | 22 ------------------ ...e_before_install-packages-windows.ps1.tmpl | 23 +++++++++++++++++++ 4 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 run_onchange_before_install-packages-windows.ps1.tmpl diff --git a/.chezmoiignore b/.chezmoiignore index a3aa4b6..e77663a 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -7,6 +7,7 @@ reference_dotfiles Documents decrypt-private-key-windows.ps1 install-cli-tools-windows.ps1 +install-packages-windows.ps1 {{- end }} # unix files diff --git a/README.md b/README.md index bb782a4..10ec1ef 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,12 @@ The files I think are most notable are listed below: installs mise and the tools in its config, and generates their zsh completions. Also reruns when the mise config or `mise.lock` changes - Plugins cloned from git: [`.chezmoiexternal.toml`](./.chezmoiexternal.toml) - - Windows-specific: + - Windows-specific, rerun by chezmoi only when they change: + - [`run_onchange_before_install-packages-windows.ps1.tmpl`](./run_onchange_before_install-packages-windows.ps1.tmpl): + installs gcc and Python with winget if they're missing, which Neovim needs to build its parsers and install + its language servers - [`run_onchange_after_install-cli-tools-windows.ps1.tmpl`](./run_onchange_after_install-cli-tools-windows.ps1.tmpl): - installs mise and the tools in its config. - Reruns when it, the mise config or `mise.lock` changes + installs mise and the tools in its config. Also reruns when the mise config or `mise.lock` changes - The other software I use is managed with [UniGetUI](https://github.com/Devolutions/UniGetUI) (formerly WingetUI), which can install it from the bundles in [`wingetui/`](./reference_dotfiles/wingetui/) - Encryption scripts: files with sensitive information are @@ -96,7 +98,8 @@ again. iex "&{$(irm 'https://get.chezmoi.io/ps1')} -b '~/.local/bin' -- init --apply patrick-5546" ``` - - This also installs mise in `~\.local\bin`, adds that folder to your Path, and installs the tools in mise's + - This also installs gcc ([WinLibs](https://winlibs.com)) and Python with winget if they're missing, which Neovim + needs, then installs mise in `~\.local\bin`, adds that folder to your Path, and installs the tools in mise's config. Open a new terminal to start using them 3. Keep everything up to date @@ -110,8 +113,7 @@ again. ``` - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - - Upgrade PowerShell and Git with winget or UniGetUI + - Upgrade PowerShell, Git, gcc and Python with winget or UniGetUI 4. Optional: install the other software I use with [UniGetUI](https://github.com/Devolutions/UniGetUI), by importing the bundles in [`reference_dotfiles/wingetui`](./reference_dotfiles/wingetui/) - - `dev.json` includes gcc ([WinLibs](https://winlibs.com)), which LazyVim needs to compile treesitter parsers diff --git a/reference_dotfiles/wingetui/dev.json b/reference_dotfiles/wingetui/dev.json index 1361e6b..32e194d 100644 --- a/reference_dotfiles/wingetui/dev.json +++ b/reference_dotfiles/wingetui/dev.json @@ -1,28 +1,6 @@ { "export_version": 2, "packages": [ - { - "Id": "BrechtSanders.WinLibs.POSIX.UCRT", - "Name": "WinLibs (POSIX threads, UCRT runtime)", - "Version": "16.2.0-14.0.0-r3", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, { "Id": "Docker.DockerDesktop", "Name": "Docker Desktop", diff --git a/run_onchange_before_install-packages-windows.ps1.tmpl b/run_onchange_before_install-packages-windows.ps1.tmpl new file mode 100644 index 0000000..ff40c69 --- /dev/null +++ b/run_onchange_before_install-packages-windows.ps1.tmpl @@ -0,0 +1,23 @@ +# Installs the programs that Neovim needs and mise doesn't install, if they're +# missing: gcc, which nvim-treesitter compiles its parsers with, and Python, +# which Mason installs pyrefly with. chezmoi runs this before applying files, +# and again whenever this script changes. +$ErrorActionPreference = 'Stop' + +function Install-Package([string]$id) { + Write-Host "`n# Install $id with winget" + winget install --exact --id $id --source winget --no-upgrade --accept-package-agreements --accept-source-agreements + # -1978335135 means it's already installed, but isn't on this terminal's Path + if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne -1978335135) { + throw "winget couldn't install $id, and exited with $LASTEXITCODE" + } +} + +if (-not (Get-Command gcc -ErrorAction Ignore)) { + Install-Package 'BrechtSanders.WinLibs.POSIX.UCRT' +} +# Windows comes with a python command that only opens the Microsoft Store +$python = Get-Command python -ErrorAction Ignore +if (-not $python -or "$(& $python --version 2>&1)" -notmatch '^Python 3') { + Install-Package 'Python.Python.3.14' +} From 6a003c2131e0b572c3543b83369d26a10d004a8a Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:03:49 +0000 Subject: [PATCH 36/76] Install the desktop apps on macOS and Windows chezmoi init now asks on macOS and Windows whether to install the desktop apps: Bitwarden, Docker Desktop, Microsoft To Do, Nextcloud, Speedtest, TorGuard, WireGuard and WizTree. They move out of the UniGetUI bundles. - On Windows, winget installs them, skipping the ones that are already installed. Microsoft To Do comes from the Microsoft Store source. - On macOS, the script installs Homebrew if it's missing, then the apps with brew bundle: casks, and App Store apps through mas. WizTree has no macOS version. .zshrc now loads Homebrew's environment, which the Homebrew installer would otherwise ask you to add yourself. Both scripts try every app before failing, so that chezmoi runs them again on the next apply until they all install. They run after the CLI tools, so a failed app doesn't stop the tools from installing. The tests answer no, since the apps need sign-ins and administrator rights. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoi.yaml.tmpl | 5 + .chezmoiignore | 14 ++- .github/lint.sh | 17 +-- .github/test.ps1 | 3 +- .github/test.sh | 3 +- README.md | 21 +++- dot_zshrc | 6 + reference_dotfiles/wingetui/apps.json | 116 ------------------ reference_dotfiles/wingetui/dev.json | 22 ---- ...e_after_install-desktop-apps-macos.sh.tmpl | 29 +++++ ...fter_install-desktop-apps-windows.ps1.tmpl | 27 ++++ 11 files changed, 111 insertions(+), 152 deletions(-) create mode 100644 run_onchange_after_install-desktop-apps-macos.sh.tmpl create mode 100644 run_onchange_after_install-desktop-apps-windows.ps1.tmpl diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl index d654454..1668a93 100644 --- a/.chezmoi.yaml.tmpl +++ b/.chezmoi.yaml.tmpl @@ -1,4 +1,8 @@ {{- $encryption := promptBoolOnce . "encryption" "Decrypt the encrypted files with the key passphrase" true -}} +{{- $apps := false -}} +{{- if ne .chezmoi.os "linux" -}} +{{- $apps = promptBoolOnce . "apps" "Install the desktop apps" true -}} +{{- end -}} {{ if eq .chezmoi.os "windows" -}} cd: command: "pwsh" @@ -11,6 +15,7 @@ interpreters: {{ end -}} data: + apps: {{ $apps }} encryption: {{ $encryption }} diff: pager: "delta" diff --git a/.chezmoiignore b/.chezmoiignore index e77663a..3ad4c32 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -7,9 +7,15 @@ reference_dotfiles Documents decrypt-private-key-windows.ps1 install-cli-tools-windows.ps1 +install-desktop-apps-windows.ps1 install-packages-windows.ps1 {{- end }} +# macOS files +{{ if ne .chezmoi.os "darwin" -}} +install-desktop-apps-macos.sh +{{- end }} + # unix files {{ if eq .chezmoi.os "windows" -}} .config/zsh @@ -17,8 +23,8 @@ install-packages-windows.ps1 .zshenv .zshrc decrypt-private-key-unix.sh -install-packages-unix.sh install-cli-tools-unix.sh +install-packages-unix.sh {{- end }} # encrypted files @@ -27,3 +33,9 @@ install-cli-tools-unix.sh decrypt-private-key-unix.sh decrypt-private-key-windows.ps1 {{- end }} + +# desktop apps +{{ if not .apps -}} +install-desktop-apps-macos.sh +install-desktop-apps-windows.ps1 +{{- end }} diff --git a/.github/lint.sh b/.github/lint.sh index 52f9ca8..d3de332 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Renders the chezmoi templates for each OS, with and without the encrypted -# files, and checks them along with the files that aren't templates: shell +# Renders the chezmoi templates for each OS, answering yes and then no to the +# prompts, and checks them along with the files that aren't templates: shell # scripts with shellcheck, zsh files with zsh -n, PowerShell with its parser, # and TOML, YAML and git config syntax. Needs chezmoi, zsh, shellcheck, pwsh, # python3 and yq. @@ -38,16 +38,19 @@ check() { # check OS TEMPLATE RENDERED esac } +# The prompts change unrelated files, so answering all of them yes and then all +# of them no renders every branch for os in "${!os_data[@]}"; do - for encryption in true false; do - echo "# $os, encryption: $encryption" - chezmoi=(chezmoi --source . --override-data "{\"chezmoi\":${os_data[$os]},\"encryption\":$encryption}") + for answer in true false; do + echo "# $os, answers: $answer" + chezmoi=(chezmoi --source . --override-data "{\"chezmoi\":${os_data[$os]},\"apps\":$answer,\"encryption\":$answer}") for template in $(git ls-files '*.tmpl' .chezmoiexternal.toml .chezmoiignore); do - rendered="$out/$os-$encryption/${template%.tmpl}" + rendered="$out/$os-$answer/${template%.tmpl}" mkdir -p "$(dirname "$rendered")" if [ "$template" = .chezmoi.yaml.tmpl ]; then "${chezmoi[@]}" execute-template --init \ - --promptBool "Decrypt the encrypted files with the key passphrase=$encryption" \ + --promptBool "Decrypt the encrypted files with the key passphrase=$answer" \ + --promptBool "Install the desktop apps=$answer" \ <"$template" >"$rendered" else "${chezmoi[@]}" execute-template <"$template" >"$rendered" diff --git a/.github/test.ps1 b/.github/test.ps1 index c3b978a..c3636a7 100644 --- a/.github/test.ps1 +++ b/.github/test.ps1 @@ -27,7 +27,8 @@ Write-Host '::group::Install the dotfiles' New-Item -ItemType Directory -Force "$HOME\.local\share" | Out-Null Copy-Item -Recurse -Force $checkout "$HOME\.local\share\chezmoi" Invoke-Expression "&{$(Invoke-RestMethod https://get.chezmoi.io/ps1)} -b '$bin'" -chezmoi init --apply --promptBool 'Decrypt the encrypted files with the key passphrase=false' +chezmoi init --apply --promptBool 'Decrypt the encrypted files with the key passphrase=false' ` + --promptBool 'Install the desktop apps=false' if ($LASTEXITCODE -ne 0) { throw "chezmoi init --apply failed with exit code $LASTEXITCODE" } Write-Host '::endgroup::' diff --git a/.github/test.sh b/.github/test.sh index 868092f..52f90eb 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -56,7 +56,8 @@ mkdir -p "$HOME/.local/share" cp -a "$checkout" "$HOME/.local/share/chezmoi" installer=$(curl -fsLS get.chezmoi.io) # separate so that set -e catches download errors sh -c "$installer" -- -b "$bin" init --apply \ - --promptBool "Decrypt the encrypted files with the key passphrase=false" "$brewfile" <<'EOF' +cask "bitwarden" +cask "docker-desktop" +mas "Microsoft To Do", id: 1274495053 +cask "nextcloud" +mas "Speedtest by Ookla", id: 1153157709 +cask "torguard" +mas "WireGuard", id: 1451685025 +EOF +"$brew" bundle --no-upgrade --file="$brewfile" diff --git a/run_onchange_after_install-desktop-apps-windows.ps1.tmpl b/run_onchange_after_install-desktop-apps-windows.ps1.tmpl new file mode 100644 index 0000000..d835702 --- /dev/null +++ b/run_onchange_after_install-desktop-apps-windows.ps1.tmpl @@ -0,0 +1,27 @@ +# Installs the desktop apps with winget, skipping the ones that are already +# installed. chezmoi runs this after applying files, and again whenever this +# script changes, or until every app installs. Some of the installers ask for +# administrator rights. +$ErrorActionPreference = 'Stop' + +# winget IDs and the sources they're from. Find more with `winget search` +$apps = [ordered]@{ + 'Bitwarden.Bitwarden' = 'winget' + 'Docker.DockerDesktop' = 'winget' + '9NBLGGH5R558' = 'msstore' # Microsoft To Do + 'Nextcloud.NextcloudDesktop' = 'winget' + 'Ookla.Speedtest.Desktop' = 'winget' + 'VPNetwork.TorGuard' = 'winget' + 'WireGuard.WireGuard' = 'winget' + 'AntibodySoftware.WizTree' = 'winget' +} +$failed = @() +foreach ($id in $apps.Keys) { + Write-Host "`n# Install $id with winget" + winget install --exact --id $id --source $apps[$id] --no-upgrade --accept-package-agreements --accept-source-agreements + # -1978335135 means it's already installed + if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne -1978335135) { $failed += $id } +} +if ($failed) { + throw "winget couldn't install $($failed -join ', '). Run chezmoi apply to try again" +} From 8251a1aa73aaa526ac0d9e38e7e4b38a196ea491 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:06:10 +0000 Subject: [PATCH 37/76] Replace the UniGetUI bundles with a list of the software I've used UniGetUI can find these apps by name, so a markdown list with their winget IDs is enough, and easier to keep up to date than the exported bundles. - NanaZip replaces 7-Zip - Removes OpenVPN Connect, Slack, Zoom, Second Screen, LLVM, the Logitech apps and Plantronics Hub - Removes the apps the install flow handles now: Git and PowerShell are prerequisites, gcc and Python install before the CLI tools, and the desktop apps install after them. Snipping Tool comes with Windows - Adds UniGetUI itself and WSL, whose config is in reference_dotfiles Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 8 +- reference_dotfiles/README.md | 2 + reference_dotfiles/software.md | 19 ++ reference_dotfiles/wingetui/apps.json | 394 -------------------------- reference_dotfiles/wingetui/dev.json | 114 -------- 5 files changed, 25 insertions(+), 512 deletions(-) create mode 100644 reference_dotfiles/software.md delete mode 100644 reference_dotfiles/wingetui/apps.json delete mode 100644 reference_dotfiles/wingetui/dev.json diff --git a/README.md b/README.md index ef3b377..514a886 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,8 @@ The files I think are most notable are listed below: installs mise and the tools in its config. Also reruns when the mise config or `mise.lock` changes - [`run_onchange_after_install-desktop-apps-windows.ps1.tmpl`](./run_onchange_after_install-desktop-apps-windows.ps1.tmpl): installs the desktop apps with winget - - The other software I use is managed with [UniGetUI](https://github.com/Devolutions/UniGetUI) (formerly - WingetUI), which can install it from the bundles in [`wingetui/`](./reference_dotfiles/wingetui/) + - The other software I've used, which these scripts don't install, is listed in + [`software.md`](./reference_dotfiles/software.md) - Encryption scripts: files with sensitive information are [encrypted](https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/) with age. On the first apply, these scripts decrypt the age key with its passphrase using chezmoi's built-in age @@ -128,5 +128,5 @@ It saves the answers in `~/.config/chezmoi/chezmoi.yaml`. Run `chezmoi init --pr - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - Upgrade PowerShell, Git, gcc, Python and the desktop apps with winget or UniGetUI -4. Optional: install the other software I use with [UniGetUI](https://github.com/Devolutions/UniGetUI), by importing - the bundles in [`reference_dotfiles/wingetui`](./reference_dotfiles/wingetui/) +4. Optional: install the other software I've used, listed in + [`reference_dotfiles/software.md`](./reference_dotfiles/software.md) diff --git a/reference_dotfiles/README.md b/reference_dotfiles/README.md index 0a54040..41daea1 100644 --- a/reference_dotfiles/README.md +++ b/reference_dotfiles/README.md @@ -1,3 +1,5 @@ # Reference Dotfiles These dotfiles are not managed with Chezmoi and may not be exactly what I use, but can serve as a reference. + +[`software.md`](./software.md) lists the other software I've used on Windows. diff --git a/reference_dotfiles/software.md b/reference_dotfiles/software.md new file mode 100644 index 0000000..6853ed4 --- /dev/null +++ b/reference_dotfiles/software.md @@ -0,0 +1,19 @@ +# Software + +Other software I've used on Windows, which the dotfiles don't install. Search for it in +[UniGetUI](https://github.com/Devolutions/UniGetUI), or install it with `winget install --exact --id `. + +| Software | What it does | winget ID | +| --- | --- | --- | +| [Carnac](https://github.com/Code52/carnac) | Shows the keys you press, for presentations and screen recordings | `code52.Carnac` | +| [Discord](https://discord.com) | Chat | `Discord.Discord` | +| [NanaZip](https://github.com/M2Team/NanaZip) | Opens and creates archives. A 7-Zip fork that's in the Windows 11 context menu | `M2Team.NanaZip` | +| [Plex](https://www.plex.tv) | Plays media from Plex servers | `Plex.Plex` | +| [Rufus](https://rufus.ie) | Creates bootable USB drives | `Rufus.Rufus` | +| [Signal](https://signal.org) | Encrypted messaging | `OpenWhisperSystems.Signal` | +| [TeamViewer](https://www.teamviewer.com) | Remote access and support | `TeamViewer.TeamViewer` | +| [Thunderbird](https://www.thunderbird.net) | Email | `Mozilla.Thunderbird` | +| [UniGetUI](https://github.com/Devolutions/UniGetUI) | Installs and updates software with winget and other package managers | `Devolutions.UniGetUI` | +| [Visual Studio Code](https://code.visualstudio.com) | Code editor. My settings are in [`vscode/`](./vscode/) | `Microsoft.VisualStudioCode` | +| [Windows Terminal](https://github.com/microsoft/terminal) | Terminal, preinstalled on Windows 11. My settings are in [`windows_terminal/`](./windows_terminal/) | `Microsoft.WindowsTerminal` | +| [WSL](https://learn.microsoft.com/windows/wsl/) | Runs Linux, which the dotfiles also support. `wsl --install` installs it with Ubuntu. My config is in [`wsl/`](./wsl/) | `Microsoft.WSL` | diff --git a/reference_dotfiles/wingetui/apps.json b/reference_dotfiles/wingetui/apps.json deleted file mode 100644 index 8b7bc23..0000000 --- a/reference_dotfiles/wingetui/apps.json +++ /dev/null @@ -1,394 +0,0 @@ -{ - "export_version": 2, - "packages": [ - { - "Id": "7zip.7zip", - "Name": "7-Zip 23.01 (x64 edition)", - "Version": "23.01.00.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "code52.Carnac", - "Name": "carnac", - "Version": "2.3.13", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Discord.Discord", - "Name": "Discord", - "Version": "1.0.9028", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": true, - "IgnoredVersion": "*" - } - }, - { - "Id": "Logitech.LogiBolt", - "Name": "Logi Bolt", - "Version": "1.2.6024.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Logitech.OptionsPlus", - "Name": "Logi Options+", - "Version": "2.9.994631", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Logitech.LogiTune", - "Name": "Logi Tune", - "Version": "3.15.96.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Logitech.GHUB", - "Name": "Logitech G HUB", - "Version": "2026.7.992920", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Logitech.UnifyingSoftware", - "Name": "Logitech Unifying Software", - "Version": "2.52.33", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Mozilla.Thunderbird", - "Name": "Mozilla Thunderbird (x64 en-CA)", - "Version": "115.9.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "115.8.0" - } - }, - { - "Id": "OpenVPNTechnologies.OpenVPNConnect", - "Name": "OpenVPN Connect", - "Version": "3.4.4", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Poly.PlantronicsHub", - "Name": "Plantronics Hub Software", - "Version": "3.25.54307.37251", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Plex.Plex", - "Name": "Plex", - "Version": "1.88.1", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Rufus.Rufus", - "Name": "Rufus", - "Version": "4.4", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "OpenWhisperSystems.Signal", - "Name": "Signal 7.4.0", - "Version": "7.4.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "SlackTechnologies.Slack", - "Name": "Slack (Machine)", - "Version": "4.36.136", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": true, - "IgnoredVersion": "*" - } - }, - { - "Id": "TeamViewer.TeamViewer", - "Name": "TeamViewer", - "Version": "15.83.5", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Zoom.Zoom", - "Name": "Zoom", - "Version": "5.17.11.34827", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - } - ], - "incompatible_packages_info": "Incompatible packages cannot be installed from WingetUI, but they have been listed here for logging purposes.", - "incompatible_packages": [ - { - "Id": "SAMSUNGELECTRONICSCoLtd.SecondScreen_w\u2026", - "Name": "Second Screen", - "Version": "1.8.4.0", - "Source": "Microsoft Store" - }, - { - "Id": "Microsoft.ScreenSketch_8wekyb3d8bbwe", - "Name": "Snipping Tool", - "Version": "11.2401.37.0", - "Source": "Local PC" - } - ] -} \ No newline at end of file diff --git a/reference_dotfiles/wingetui/dev.json b/reference_dotfiles/wingetui/dev.json deleted file mode 100644 index 583848c..0000000 --- a/reference_dotfiles/wingetui/dev.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "export_version": 2, - "packages": [ - { - "Id": "Git.Git", - "Name": "Git", - "Version": "2.44.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "LLVM.LLVM", - "Name": "LLVM", - "Version": "18.1.3", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Microsoft.VisualStudioCode", - "Name": "Microsoft Visual Studio Code", - "Version": "1.144.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - }, - { - "Id": "Microsoft.WindowsTerminal", - "Name": "Windows Terminal", - "Version": "1.19.10821.0", - "Source": "winget", - "ManagerName": "Winget", - "InstallationOptions": { - "SkipHashCheck": false, - "InteractiveInstallation": false, - "RunAsAdministrator": false, - "Architecture": "", - "InstallationScope": "", - "CustomParameters": [], - "PreRelease": false, - "CustomInstallLocation": "", - "Version": "" - }, - "Updates": { - "UpdatesIgnored": false, - "IgnoredVersion": "" - } - } - ], - "incompatible_packages_info": "Incompatible packages cannot be installed from WingetUI, but they have been listed here for logging purposes.", - "incompatible_packages": [ - { - "Id": "Microsoft.PowerShell_8wekyb3d8bbwe", - "Name": "PowerShell", - "Version": "7.4.2.0", - "Source": "Local PC" - }, - { - "Id": "MicrosoftCorporationII.WindowsSubsyste\u2026", - "Name": "Windows Subsystem for Linux", - "Version": "2.1.5.0", - "Source": "Local PC" - }, - { - "Id": "{889610CC-4337-4BDB-AC3B-4F21806C0BDE}\u2026", - "Name": "WingetUI", - "Version": "3.0.2", - "Source": "Local PC" - } - ] -} From 5c9181800c42d93815d5051aa1a86dfbf10b124e Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:44:03 +0000 Subject: [PATCH 38/76] Create Neovim's site folder before lazy.nvim starts nvim-treesitter installs its parsers in stdpath("data")/site, which doesn't exist the first time Neovim starts. Neovim leaves missing folders out when it looks for runtime files, and lazy.nvim rebuilds the runtimepath from that list, so the parsers that were just built weren't found until Neovim restarted: no highlighting the first time a file is opened. Creating the folder first keeps it on the runtimepath. https://github.com/folke/lazy.nvim/issues/2153 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dot_config/nvim/lua/config/lazy.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dot_config/nvim/lua/config/lazy.lua b/dot_config/nvim/lua/config/lazy.lua index 8ff81ff..527cbb3 100644 --- a/dot_config/nvim/lua/config/lazy.lua +++ b/dot_config/nvim/lua/config/lazy.lua @@ -5,6 +5,10 @@ if not vim.loop.fs_stat(lazypath) then vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) end vim.opt.rtp:prepend(vim.env.LAZY or lazypath) +-- nvim-treesitter installs its parsers in site, which doesn't exist on the first +-- start. Neovim leaves out missing folders when it looks for runtime files, so it +-- wouldn't find the parsers until a restart: https://github.com/folke/lazy.nvim/issues/2153 +vim.fn.mkdir(vim.fn.stdpath("data") .. "/site", "p") require("lazy").setup({ spec = { From 421dabdb6f58817fd85338c73b2d6475e4ba6a83 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:44:03 +0000 Subject: [PATCH 39/76] Check that Neovim is ready to use after the install The CI now opens a Python file in a headless Neovim after applying the dotfiles, the way you would on a new machine, and checks that lazy.nvim installs the plugins, Mason installs the tools and language servers, nvim-treesitter builds and loads the parsers, and the Python language servers start. lazy.nvim's install log is only shown if the check fails. mason-lspconfig only installs the language servers when Neovim has a UI, so the check does that itself. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/check-nvim.lua | 172 +++++++++++++++++++++++++++++++++++++++++ .github/test.ps1 | 33 +++++++- .github/test.sh | 18 ++++- README.md | 5 +- 4 files changed, 220 insertions(+), 8 deletions(-) create mode 100644 .github/check-nvim.lua diff --git a/.github/check-nvim.lua b/.github/check-nvim.lua new file mode 100644 index 0000000..668a3ba --- /dev/null +++ b/.github/check-nvim.lua @@ -0,0 +1,172 @@ +-- Checks that Neovim is ready to use the first time it starts after the +-- dotfiles install: lazy.nvim installs the plugins, Mason installs the tools +-- and language servers, nvim-treesitter builds the parsers, and the Python +-- language servers start. The test scripts run it on a new Python file: +-- nvim --headless check.py -S check-nvim.lua +-- It reports what it checked and the problems it finds on stderr, and exits +-- with status 1 if there are any. + +local report = {} ---@type string[] +local function say(message) + report[#report + 1] = message +end + +local problems = {} ---@type string[] +local function problem(message) + problems[#problems + 1] = message +end + +-- Waits until done() returns true, for at most the given number of minutes +local function wait(minutes, done) + return vim.wait(minutes * 60 * 1000, done, 1000) +end + +-- Opening the file already started Mason's installs, so record their errors +-- before they can fail. An error here would stop the check from running, so +-- it's reported instead +local install_errors = {} ---@type table +local watching, watch_error = pcall(function() + require("mason-registry"):on("package:install:failed", function(pkg, err) + install_errors[pkg.name] = type(err) == "string" and err or vim.inspect(err) + end) +end) +if not watching then + problem("Can't watch Mason's installs: " .. watch_error) +end + +local function check_plugins() + local count, installed = 0, 0 + for _, plugin in pairs(require("lazy.core.config").plugins) do + if plugin._.cond ~= false then + count = count + 1 + if not plugin._.installed then + problem("lazy.nvim didn't install " .. plugin.name) + elseif require("lazy.core.plugin").has_errors(plugin) then + problem("lazy.nvim couldn't install or build " .. plugin.name) + else + installed = installed + 1 + end + end + end + say(("lazy.nvim installed %d of %d plugins"):format(installed, count)) +end + +local function check_mason() + local registry = require("mason-registry") + -- mason-lspconfig only installs the language servers when Neovim has a UI, so + -- do what it does in a terminal + require("mason-lspconfig.features.ensure_installed")() + -- LazyVim's tools, and the language servers it has mason-lspconfig install + local names = vim.deepcopy(LazyVim.opts("mason.nvim").ensure_installed or {}) + local server_packages = require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package + for _, server in ipairs(require("mason-lspconfig.settings").current.ensure_installed) do + names[#names + 1] = server_packages[server] or server + end + + local packages = {} ---@type table + for _, name in ipairs(names) do + if registry.has_package(name) then + packages[name] = registry.get_package(name) + else + problem("Mason's registry doesn't have " .. name) + end + end + wait(10, function() + return vim.iter(packages):all(function(_, pkg) + return pkg:is_installed() or not pkg:is_installing() + end) + end) + + local installed = {} ---@type string[] + for _, pkg in pairs(packages) do + if pkg:is_installed() then + installed[#installed + 1] = pkg.name + else + local reason = install_errors[pkg.name] or (pkg:is_installing() and "timed out" or "didn't start") + problem(("Mason didn't install %s: %s"):format(pkg.name, reason)) + end + end + table.sort(installed) + say("Mason installed " .. table.concat(installed, ", ")) +end + +local function check_parsers() + local TS = require("nvim-treesitter") + -- The parsers LazyVim installs. Their dependencies only have queries + local langs = require("nvim-treesitter.config").norm_languages( + LazyVim.opts("nvim-treesitter").ensure_installed, + { unsupported = true, dependencies = true } + ) + local function missing() + local installed = TS.get_installed("parsers") + return vim.tbl_filter(function(lang) + return not vim.list_contains(installed, lang) + end, langs) + end + wait(10, function() + return #missing() == 0 + end) + + local missed = missing() + for _, lang in ipairs(missed) do + problem(("nvim-treesitter didn't install the %s parser"):format(lang)) + end + for _, lang in ipairs(langs) do + if not vim.list_contains(missed, lang) then + local ok, loaded, err = pcall(vim.treesitter.language.add, lang) + if not (ok and loaded) then + problem(("Neovim can't load the %s parser: %s"):format(lang, ok and err or loaded)) + end + end + end + say(("nvim-treesitter installed %d of %d parsers"):format(#langs - #missed, #langs)) +end + +local function check_language_servers(buf) + local names = { vim.g.lazyvim_python_lsp or "pyright", vim.g.lazyvim_python_ruff or "ruff" } + local function started(name) + return vim.iter(vim.lsp.get_clients({ bufnr = buf, name = name })):any(function(client) + return client.initialized + end) + end + wait(2, function() + return vim.iter(names):all(started) + end) + + for _, name in ipairs(names) do + if started(name) then + say(("The %s language server started"):format(name)) + else + problem(("The %s language server didn't start for %s"):format(name, vim.api.nvim_buf_get_name(buf))) + end + end +end + +local function check() + local buf = vim.api.nvim_get_current_buf() + check_plugins() + check_mason() + check_parsers() + check_language_servers(buf) +end + +-- Runs once startup finishes, like a session where you open a file +vim.api.nvim_create_autocmd("VimEnter", { + once = true, + callback = vim.schedule_wrap(function() + local ok, err = xpcall(check, debug.traceback) + if not ok then + problem("The check failed: " .. err) + end + if #problems == 0 then + say("Neovim is ready to use") + end + vim.list_extend(report, problems) + + -- On stderr, since the test scripts only show lazy.nvim's install log on + -- stdout if the check fails. Neovim's messages, which are also on stderr, + -- don't end with a newline, so the report starts with one + io.stderr:write("\n", table.concat(report, "\n"), "\n") + vim.cmd(#problems == 0 and "qall!" or "cquit") + end), +}) diff --git a/.github/test.ps1 b/.github/test.ps1 index c3636a7..319702d 100644 --- a/.github/test.ps1 +++ b/.github/test.ps1 @@ -1,6 +1,7 @@ # Installs the dotfiles from this checkout like the README does, then checks that -# applying again changes nothing and that PowerShell starts cleanly with the -# tools from mise. It replaces your dotfiles, so it only runs in CI. +# applying again changes nothing, that PowerShell starts cleanly with the tools +# from mise, and that Neovim is ready to use. It replaces your dotfiles, so it +# only runs in CI. $ErrorActionPreference = 'Stop' if ($env:CI -ne 'true') { @@ -16,11 +17,15 @@ function Fail([string] $Message) { $script:failed = $true } +# Encodes code for pwsh -EncodedCommand, so it doesn't need quoting +function ConvertTo-EncodedCommand([string] $Code) { + [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($Code)) +} + # Runs code in a new PowerShell, which loads the profile like a new terminal # does, and returns everything it printed function Invoke-NewPowerShell([string] $Code) { - $encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($Code)) - pwsh -NoLogo -EncodedCommand $encoded 2>&1 | Out-String + pwsh -NoLogo -EncodedCommand (ConvertTo-EncodedCommand $Code) 2>&1 | Out-String } Write-Host '::group::Install the dotfiles' @@ -72,6 +77,26 @@ $output = Invoke-NewPowerShell $checks if ($LASTEXITCODE -ne 0 -or $output.Trim()) { Fail "The PowerShell checks failed: $output" } Write-Host '::endgroup::' +Write-Host '::group::Check Neovim' +# Opening a file the first time installs the plugins, tools, language servers +# and parsers. The new PowerShell loads the profile, which sets XDG_CONFIG_HOME +# for Neovim. lazy.nvim's install log on stdout is mostly git's progress, so +# it's only shown on failure. The temp folder's path is shortened to RUNNER~1 +# on GitHub's runners, so the file goes in the home folder +$nvimDir = New-Item -ItemType Directory -Force (Join-Path $HOME 'nvim-check') +Set-Content (Join-Path $nvimDir 'check.py') 'print("Hello")' +$code = @" +Set-Location '$nvimDir' +nvim --headless check.py -S '$PSScriptRoot\check-nvim.lua' > lazy.log +exit `$LASTEXITCODE +"@ +pwsh -NoLogo -EncodedCommand (ConvertTo-EncodedCommand $code) +if ($LASTEXITCODE -ne 0) { + Get-Content (Join-Path $nvimDir 'lazy.log') + Fail "Neovim isn't ready to use" +} +Write-Host '::endgroup::' + if ($failed) { exit 1 } diff --git a/.github/test.sh b/.github/test.sh index 52f90eb..0707901 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -1,7 +1,8 @@ #!/bin/bash # Installs the dotfiles from this checkout the way the README does, then checks -# that applying again changes nothing and that the shells start cleanly with the -# tools from mise. It replaces your dotfiles, so it only runs in CI. +# that applying again changes nothing, that the shells start cleanly with the +# tools from mise, and that Neovim is ready to use. It replaces your dotfiles, so +# it only runs in CI. set -euo pipefail if [ "${CI:-}" != true ]; then @@ -136,6 +137,19 @@ if [ "$status" -ne 0 ] || [ -n "$output" ]; then fi echo "::endgroup::" +echo "::group::Check Neovim" +# Opening a file the first time installs the plugins, tools, language servers +# and parsers. mise exec puts the tools on the PATH, as zsh does. lazy.nvim's +# install log on stdout is mostly git's progress, so it's only shown on failure +nvim_dir=$(mktemp -d) +echo 'print("Hello")' >"$nvim_dir/check.py" +if ! (cd "$nvim_dir" && mise exec -- nvim --headless check.py -S "$checkout/.github/check-nvim.lua" \ + lazy.log); then + cat "$nvim_dir/lazy.log" + fail "Neovim isn't ready to use" +fi +echo "::endgroup::" + if [ "$failed" = true ]; then exit 1 fi diff --git a/README.md b/README.md index 514a886..0534d6c 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,9 @@ The files I think are most notable are listed below: then checks them and the files that aren't templates with shellcheck, `zsh -n`, the PowerShell parser, and TOML, YAML and git config parsers. Also runs locally - [`.github/test.sh`](./.github/test.sh) and [`.github/test.ps1`](./.github/test.ps1): install the dotfiles on - fresh Ubuntu (latest and 22.04), macOS and Windows machines, then check that applying again changes nothing and - that the shells start cleanly with the tools from mise + fresh Ubuntu (latest and 22.04), macOS and Windows machines, then check that applying again changes nothing, + that the shells start cleanly with the tools from mise, and that Neovim installs its plugins, tools, language + servers and parsers the first time it opens a file: [`.github/check-nvim.lua`](./.github/check-nvim.lua) - Configuration files for software that is not managed with chezmoi: [`reference_dotfiles`](./reference_dotfiles) ## Installation From 9a3a9cc6de064b02f540182ccb25ec56108a5a06 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 19:56:48 +0000 Subject: [PATCH 40/76] Explain why tree-sitter comes from conda-forge nvim-treesitter needs tree-sitter 0.26.1 or later, whose official builds need glibc 2.39, and mise's conda backend downloads conda-forge's build without installing conda. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dot_config/mise/config.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index 593189f..09b392b 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -29,8 +29,10 @@ lockfile_platforms = ["linux-arm64", "linux-x64", "macos-arm64", "windows-x64"] # mise skips tmux on Windows, which it has no builds for. atuin = { version = "latest", libc = "musl" } bat = "latest" -# The tree-sitter CLI, which nvim-treesitter uses to build parsers. Its -# official builds need glibc 2.39, so install conda-forge's from conda instead. +# The tree-sitter CLI, which nvim-treesitter builds parsers with. Its official +# builds need glibc 2.39 (Ubuntu 24.04) since 0.26.1, the oldest version +# nvim-treesitter supports, so use conda-forge's build. mise downloads it +# without installing conda. "conda:tree-sitter-cli" = "latest" delta = "latest" dust = "latest" From bdf815874127842791a6e4f9f836c044f160df5f Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 19:57:43 +0000 Subject: [PATCH 41/76] List the desktop apps once, for macOS and Windows .chezmoidata/desktop-apps.toml has an entry for each desktop app, with its Homebrew cask or App Store ID and its winget or Microsoft Store ID. The macOS script builds its Brewfile from it, and the Windows script its list of winget IDs, so adding an app to both OSes takes one entry, and the README links to the list instead of repeating it. The Windows script now names the apps it installs and the ones that fail, instead of their IDs. The rendered Brewfile is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoidata/desktop-apps.toml | 15 ++++++++++ README.md | 4 +-- ...e_after_install-desktop-apps-macos.sh.tmpl | 17 +++++------ ...fter_install-desktop-apps-windows.ps1.tmpl | 30 +++++++++---------- 4 files changed, 40 insertions(+), 26 deletions(-) create mode 100644 .chezmoidata/desktop-apps.toml diff --git a/.chezmoidata/desktop-apps.toml b/.chezmoidata/desktop-apps.toml new file mode 100644 index 0000000..647ce3e --- /dev/null +++ b/.chezmoidata/desktop-apps.toml @@ -0,0 +1,15 @@ +# The desktop apps that chezmoi installs on macOS and Windows, if you answer yes +# to its prompt, skipping the ones that are already installed. Each app has a +# Homebrew cask or a Mac App Store ID for macOS, and a winget ID or a Microsoft +# Store ID for Windows. Leave them out for an OS that the app isn't on. Find +# more with `brew search`, `mas search` and `winget search`. +desktopApps = [ + { name = "Bitwarden", cask = "bitwarden", winget = "Bitwarden.Bitwarden" }, + { name = "Docker Desktop", cask = "docker-desktop", winget = "Docker.DockerDesktop" }, + { name = "Microsoft To Do", mas = 1274495053, msstore = "9NBLGGH5R558" }, + { name = "Nextcloud", cask = "nextcloud", winget = "Nextcloud.NextcloudDesktop" }, + { name = "Speedtest by Ookla", mas = 1153157709, winget = "Ookla.Speedtest.Desktop" }, + { name = "TorGuard", cask = "torguard", winget = "VPNetwork.TorGuard" }, + { name = "WireGuard", mas = 1451685025, winget = "WireGuard.WireGuard" }, + { name = "WizTree", winget = "AntibodySoftware.WizTree" }, +] diff --git a/README.md b/README.md index 0534d6c..9bfa81c 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,8 @@ The files I think are most notable are listed below: `chezmoi init` asks: - Whether to decrypt the encrypted files with the key passphrase. Answer no if you don't have the passphrase -- On macOS and Windows, whether to install the desktop apps: Bitwarden, Docker Desktop, Microsoft To Do, Nextcloud, - Speedtest, TorGuard, WireGuard, and on Windows, WizTree. It skips the ones that are already installed +- On macOS and Windows, whether to install the desktop apps in + [`.chezmoidata/desktop-apps.toml`](./.chezmoidata/desktop-apps.toml). It skips the ones that are already installed It saves the answers in `~/.config/chezmoi/chezmoi.yaml`. Run `chezmoi init --prompt` to answer again. diff --git a/run_onchange_after_install-desktop-apps-macos.sh.tmpl b/run_onchange_after_install-desktop-apps-macos.sh.tmpl index 787b25a..978161e 100644 --- a/run_onchange_after_install-desktop-apps-macos.sh.tmpl +++ b/run_onchange_after_install-desktop-apps-macos.sh.tmpl @@ -13,17 +13,16 @@ fi printf "\n# Install the desktop apps with Homebrew\n" # Casks, and App Store apps, which mas installs once you sign in to the App -# Store. WizTree has no macOS version. Find more with `brew search` and -# `mas search` +# Store, from .chezmoidata/desktop-apps.toml brewfile=$(mktemp) trap 'rm -f "$brewfile"' EXIT cat >"$brewfile" <<'EOF' -cask "bitwarden" -cask "docker-desktop" -mas "Microsoft To Do", id: 1274495053 -cask "nextcloud" -mas "Speedtest by Ookla", id: 1153157709 -cask "torguard" -mas "WireGuard", id: 1451685025 +{{ range .desktopApps -}} +{{ if hasKey . "cask" -}} +cask {{ quote .cask }} +{{ else if hasKey . "mas" -}} +mas {{ quote .name }}, id: {{ .mas }} +{{ end -}} +{{ end -}} EOF "$brew" bundle --no-upgrade --file="$brewfile" diff --git a/run_onchange_after_install-desktop-apps-windows.ps1.tmpl b/run_onchange_after_install-desktop-apps-windows.ps1.tmpl index d835702..b56ded1 100644 --- a/run_onchange_after_install-desktop-apps-windows.ps1.tmpl +++ b/run_onchange_after_install-desktop-apps-windows.ps1.tmpl @@ -4,23 +4,23 @@ # administrator rights. $ErrorActionPreference = 'Stop' -# winget IDs and the sources they're from. Find more with `winget search` -$apps = [ordered]@{ - 'Bitwarden.Bitwarden' = 'winget' - 'Docker.DockerDesktop' = 'winget' - '9NBLGGH5R558' = 'msstore' # Microsoft To Do - 'Nextcloud.NextcloudDesktop' = 'winget' - 'Ookla.Speedtest.Desktop' = 'winget' - 'VPNetwork.TorGuard' = 'winget' - 'WireGuard.WireGuard' = 'winget' - 'AntibodySoftware.WizTree' = 'winget' -} +# The apps' names, winget IDs and the sources they're from, from +# .chezmoidata/desktop-apps.toml +$apps = @( +{{- range .desktopApps }} +{{- if hasKey . "winget" }} + @{ Name = {{ squote .name }}; Id = {{ squote .winget }}; Source = 'winget' } +{{- else if hasKey . "msstore" }} + @{ Name = {{ squote .name }}; Id = {{ squote .msstore }}; Source = 'msstore' } +{{- end }} +{{- end }} +) $failed = @() -foreach ($id in $apps.Keys) { - Write-Host "`n# Install $id with winget" - winget install --exact --id $id --source $apps[$id] --no-upgrade --accept-package-agreements --accept-source-agreements +foreach ($app in $apps) { + Write-Host "`n# Install $($app.Name) with winget" + winget install --exact --id $app.Id --source $app.Source --no-upgrade --accept-package-agreements --accept-source-agreements # -1978335135 means it's already installed - if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne -1978335135) { $failed += $id } + if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne -1978335135) { $failed += $app.Name } } if ($failed) { throw "winget couldn't install $($failed -join ', '). Run chezmoi apply to try again" From 5d8f7a30c40eee6474d7608340c7de4ee054f84d Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 19:58:13 +0000 Subject: [PATCH 42/76] Install VS Code and UniGetUI with the desktop apps Visual Studio Code installs on macOS and Windows, and UniGetUI, which upgrades the apps from winget, on Windows. software.md no longer lists them, and links to the lists of what the dotfiles do install instead. The reference_dotfiles README points to the VS Code settings, which the software.md row did. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoidata/desktop-apps.toml | 2 ++ reference_dotfiles/README.md | 2 ++ reference_dotfiles/software.md | 7 +++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.chezmoidata/desktop-apps.toml b/.chezmoidata/desktop-apps.toml index 647ce3e..a7cd671 100644 --- a/.chezmoidata/desktop-apps.toml +++ b/.chezmoidata/desktop-apps.toml @@ -10,6 +10,8 @@ desktopApps = [ { name = "Nextcloud", cask = "nextcloud", winget = "Nextcloud.NextcloudDesktop" }, { name = "Speedtest by Ookla", mas = 1153157709, winget = "Ookla.Speedtest.Desktop" }, { name = "TorGuard", cask = "torguard", winget = "VPNetwork.TorGuard" }, + { name = "UniGetUI", winget = "Devolutions.UniGetUI" }, + { name = "Visual Studio Code", cask = "visual-studio-code", winget = "Microsoft.VisualStudioCode" }, { name = "WireGuard", mas = 1451685025, winget = "WireGuard.WireGuard" }, { name = "WizTree", winget = "AntibodySoftware.WizTree" }, ] diff --git a/reference_dotfiles/README.md b/reference_dotfiles/README.md index 41daea1..2d41943 100644 --- a/reference_dotfiles/README.md +++ b/reference_dotfiles/README.md @@ -2,4 +2,6 @@ These dotfiles are not managed with Chezmoi and may not be exactly what I use, but can serve as a reference. +[`vscode`](./vscode) has my settings for Visual Studio Code, which is one of the desktop apps. + [`software.md`](./software.md) lists the other software I've used on Windows. diff --git a/reference_dotfiles/software.md b/reference_dotfiles/software.md index 6853ed4..c328e5d 100644 --- a/reference_dotfiles/software.md +++ b/reference_dotfiles/software.md @@ -1,7 +1,8 @@ # Software -Other software I've used on Windows, which the dotfiles don't install. Search for it in -[UniGetUI](https://github.com/Devolutions/UniGetUI), or install it with `winget install --exact --id `. +Other software I've used on Windows. Unlike the CLI tools in [mise's config](../dot_config/mise/config.toml) and the +[desktop apps](../.chezmoidata/desktop-apps.toml), the dotfiles don't install it. Search for it in UniGetUI, one of the +desktop apps, or install it with `winget install --exact --id `. | Software | What it does | winget ID | | --- | --- | --- | @@ -13,7 +14,5 @@ Other software I've used on Windows, which the dotfiles don't install. Search fo | [Signal](https://signal.org) | Encrypted messaging | `OpenWhisperSystems.Signal` | | [TeamViewer](https://www.teamviewer.com) | Remote access and support | `TeamViewer.TeamViewer` | | [Thunderbird](https://www.thunderbird.net) | Email | `Mozilla.Thunderbird` | -| [UniGetUI](https://github.com/Devolutions/UniGetUI) | Installs and updates software with winget and other package managers | `Devolutions.UniGetUI` | -| [Visual Studio Code](https://code.visualstudio.com) | Code editor. My settings are in [`vscode/`](./vscode/) | `Microsoft.VisualStudioCode` | | [Windows Terminal](https://github.com/microsoft/terminal) | Terminal, preinstalled on Windows 11. My settings are in [`windows_terminal/`](./windows_terminal/) | `Microsoft.WindowsTerminal` | | [WSL](https://learn.microsoft.com/windows/wsl/) | Runs Linux, which the dotfiles also support. `wsl --install` installs it with Ubuntu. My config is in [`wsl/`](./wsl/) | `Microsoft.WSL` | From fc949073d60aa1bbddf4bf89989d2c09b437bde3 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 19:59:44 +0000 Subject: [PATCH 43/76] Install WizTree on macOS WizTree for macOS isn't in Homebrew's casks, so it comes from Antibody Software's tap, antibodysw/tap. Its cask downloads the app from diskanalyzer.com. Since Homebrew 6.0, Homebrew only loads casks from third-party taps that are trusted, so the Brewfile trusts the casks listed with a tap, which trusts that cask but not the rest of the tap. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoidata/desktop-apps.toml | 3 ++- run_onchange_after_install-desktop-apps-macos.sh.tmpl | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.chezmoidata/desktop-apps.toml b/.chezmoidata/desktop-apps.toml index a7cd671..06e7dce 100644 --- a/.chezmoidata/desktop-apps.toml +++ b/.chezmoidata/desktop-apps.toml @@ -13,5 +13,6 @@ desktopApps = [ { name = "UniGetUI", winget = "Devolutions.UniGetUI" }, { name = "Visual Studio Code", cask = "visual-studio-code", winget = "Microsoft.VisualStudioCode" }, { name = "WireGuard", mas = 1451685025, winget = "WireGuard.WireGuard" }, - { name = "WizTree", winget = "AntibodySoftware.WizTree" }, + # WizTree for macOS isn't in Homebrew's casks, but in Antibody Software's tap + { name = "WizTree", cask = "antibodysw/tap/wiztree", winget = "AntibodySoftware.WizTree" }, ] diff --git a/run_onchange_after_install-desktop-apps-macos.sh.tmpl b/run_onchange_after_install-desktop-apps-macos.sh.tmpl index 978161e..248d14a 100644 --- a/run_onchange_after_install-desktop-apps-macos.sh.tmpl +++ b/run_onchange_after_install-desktop-apps-macos.sh.tmpl @@ -13,13 +13,15 @@ fi printf "\n# Install the desktop apps with Homebrew\n" # Casks, and App Store apps, which mas installs once you sign in to the App -# Store, from .chezmoidata/desktop-apps.toml +# Store, from .chezmoidata/desktop-apps.toml. Homebrew only loads the casks from +# third-party taps, named user/tap/cask, that are trusted, so trust them: +# https://docs.brew.sh/Tap-Trust brewfile=$(mktemp) trap 'rm -f "$brewfile"' EXIT cat >"$brewfile" <<'EOF' {{ range .desktopApps -}} {{ if hasKey . "cask" -}} -cask {{ quote .cask }} +cask {{ quote .cask }}{{ if contains "/" .cask }}, trusted: true{{ end }} {{ else if hasKey . "mas" -}} mas {{ quote .name }}, id: {{ .mas }} {{ end -}} From 1cc136889004abcb0521e777bb188c617d490088 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 20:01:24 +0000 Subject: [PATCH 44/76] Merge the README's installation sections Installing on Linux, macOS and Windows takes the same steps now: install the prerequisites, install chezmoi, which runs the scripts, and keep everything up to date with the same commands. So the README has one list of steps, with what differs by OS under each step, instead of a section per shell that repeats the rest. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 79 ++++++++++++++++++++----------------------------------- 1 file changed, 29 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 9bfa81c..c46d322 100644 --- a/README.md +++ b/README.md @@ -55,66 +55,44 @@ The files I think are most notable are listed below: ## Installation -`chezmoi init` asks: +1. Install the prerequisites + - Linux: [curl](https://curl.se/download.html), to install chezmoi. chezmoi installs git, zsh and the other + packages it needs with apt + - macOS: git, from the Xcode Command Line Tools: `xcode-select --install`. If you're installing the desktop apps, + sign in to the App Store, which some of them come from + - Windows: PowerShell 7, which the profile and chezmoi's scripts run in, and Git, which chezmoi uses to clone the + yazi theme. Install them with winget: -- Whether to decrypt the encrypted files with the key passphrase. Answer no if you don't have the passphrase -- On macOS and Windows, whether to install the desktop apps in - [`.chezmoidata/desktop-apps.toml`](./.chezmoidata/desktop-apps.toml). It skips the ones that are already installed + ``` + winget install --exact --id Microsoft.PowerShell --source winget + winget install --exact --id Git.Git --source winget + ``` -It saves the answers in `~/.config/chezmoi/chezmoi.yaml`. Run `chezmoi init --prompt` to answer again. - -### Zsh on Linux or macOS - -1. Install prerequisites - - [curl](https://curl.se/download.html), to install chezmoi - - On macOS, git from the Xcode Command Line Tools: `xcode-select --install` - - On macOS, if you're installing the desktop apps, sign in to the App Store, which some of them come from - - On Linux, chezmoi installs git, zsh, and the other packages it needs with apt - -2. Install chezmoi in `~/.local/bin`, pulling and applying the latest changes +2. Install chezmoi in `~/.local/bin`, pulling and applying the latest changes. On Linux and macOS: ``` sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin" init --apply patrick-5546 ``` - - On macOS, this also installs Homebrew if it's missing, and the desktop apps with it. Enter your password when - they ask for it - - Open a new terminal, or log out and back in, to start using zsh - -3. Keep everything up to date - - ``` - chezmoi update # pull and apply the latest changes - mise upgrade # upgrade the tools, which updates mise.lock - chezmoi re-add ~/.config/mise # save mise.lock, then commit and push it - mise self-update # upgrade mise - chezmoi upgrade # upgrade chezmoi - ``` - - - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - - On macOS, upgrade the desktop apps with `brew upgrade` and the App Store, if they don't update themselves - -### PowerShell 7 on Windows - -1. Install PowerShell 7 and Git with winget - - ``` - winget install --exact --id Microsoft.PowerShell --source winget - winget install --exact --id Git.Git --source winget - ``` - - - The profile and chezmoi's scripts run in PowerShell 7, and chezmoi uses Git to clone the yazi theme - -2. Open a new PowerShell 7 terminal, then install chezmoi in `~\.local\bin`, pulling and applying the latest changes + On Windows, in a new PowerShell 7 terminal: ``` iex "&{$(irm 'https://get.chezmoi.io/ps1')} -b '~/.local/bin' -- init --apply patrick-5546" ``` - - This also installs gcc ([WinLibs](https://winlibs.com)) and Python with winget if they're missing, which Neovim - needs, then installs mise in `~\.local\bin`, adds that folder to your Path, and installs the tools in mise's - config. Open a new terminal to start using them - - Then it installs the desktop apps with winget. Allow the installers that ask for administrator rights + - `chezmoi init` asks: + - Whether to decrypt the encrypted files with the key passphrase. Answer no if you don't have the passphrase + - On macOS and Windows, whether to install the [desktop apps](./.chezmoidata/desktop-apps.toml). It skips + the ones that are already installed + + It saves the answers in `~/.config/chezmoi/chezmoi.yaml`. Run `chezmoi init --prompt` to answer again + - Then chezmoi's scripts install what's missing. Enter your password, or allow the installers that ask for + administrator rights, when they ask + - The packages that the dotfiles and Neovim need: with apt on Linux, and gcc ([WinLibs](https://winlibs.com)) + and Python with winget on Windows. On Linux and macOS, zsh becomes your login shell + - mise in `~/.local/bin`, and the tools in its config. On Windows, it adds `~\.local\bin` to your Path + - The desktop apps: with Homebrew on macOS, which it installs first if it's missing, and winget on Windows + - Open a new terminal to start using them, or log out and back in if it doesn't start zsh 3. Keep everything up to date @@ -127,7 +105,8 @@ It saves the answers in `~/.config/chezmoi/chezmoi.yaml`. Run `chezmoi init --pr ``` - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - - Upgrade PowerShell, Git, gcc, Python and the desktop apps with winget or UniGetUI + - Upgrade everything else with the OS's package managers: `sudo apt upgrade` on Linux, `brew upgrade` and the + App Store on macOS, and winget or UniGetUI on Windows -4. Optional: install the other software I've used, listed in +4. Optional, on Windows: install the other software I've used, listed in [`reference_dotfiles/software.md`](./reference_dotfiles/software.md) From fb644956cf846bd22b6951af0f5458016c7efd64 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 20:02:09 +0000 Subject: [PATCH 45/76] Shorten the README's highlights The highlights described every script, per OS, and every CI file, which their first comments already do, so they list the main points again: mise with its lockfile, the shared list of desktop apps, encryption and CI. The decrypt scripts get first comments, which they didn't have. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 46 ++++--------------- run_before_decrypt-private-key-unix.sh.tmpl | 2 + ...efore_decrypt-private-key-windows.ps1.tmpl | 2 + 3 files changed, 14 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index c46d322..4546bc7 100644 --- a/README.md +++ b/README.md @@ -15,42 +15,16 @@ The files I think are most notable are listed below: - Neovim configuration, based off [LazyVim](https://www.lazyvim.org): [`dot_config/nvim`](./dot_config/nvim) - Tmux configuration: [`dot_tmux.conf`](./dot_tmux.conf) - Integrated with neovim: uses same theme, seamless navigation between tmux and neovim splits -- Installation scripts: improve and standardize the CLI across operating systems - - CLI tools are installed and updated with [mise](https://mise.jdx.dev): - [`dot_config/mise/config.toml`](./dot_config/mise/config.toml), with their versions pinned in - [`mise.lock`](./dot_config/mise/mise.lock) - - Unix-specific, rerun by chezmoi only when they change: - - [`run_onchange_before_install-packages-unix.sh.tmpl`](./run_onchange_before_install-packages-unix.sh.tmpl): - installs the missing system packages and makes zsh the login shell. Only uses sudo when something is missing - - [`run_onchange_after_install-cli-tools-unix.sh.tmpl`](./run_onchange_after_install-cli-tools-unix.sh.tmpl): - installs mise and the tools in its config, and generates their zsh completions. - Also reruns when the mise config or `mise.lock` changes - - [`run_onchange_after_install-desktop-apps-macos.sh.tmpl`](./run_onchange_after_install-desktop-apps-macos.sh.tmpl): - on macOS, installs [Homebrew](https://brew.sh) if it's missing, then the desktop apps with it - - Plugins cloned from git: [`.chezmoiexternal.toml`](./.chezmoiexternal.toml) - - Windows-specific, rerun by chezmoi only when they change: - - [`run_onchange_before_install-packages-windows.ps1.tmpl`](./run_onchange_before_install-packages-windows.ps1.tmpl): - installs gcc and Python with winget if they're missing, which Neovim needs to build its parsers and install - its language servers - - [`run_onchange_after_install-cli-tools-windows.ps1.tmpl`](./run_onchange_after_install-cli-tools-windows.ps1.tmpl): - installs mise and the tools in its config. Also reruns when the mise config or `mise.lock` changes - - [`run_onchange_after_install-desktop-apps-windows.ps1.tmpl`](./run_onchange_after_install-desktop-apps-windows.ps1.tmpl): - installs the desktop apps with winget - - The other software I've used, which these scripts don't install, is listed in - [`software.md`](./reference_dotfiles/software.md) -- Encryption scripts: files with sensitive information are - [encrypted](https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/) with age. - On the first apply, these scripts decrypt the age key with its passphrase using chezmoi's built-in age - - Unix-specific: [`run_before_decrypt-private-key-unix.sh.tmpl`](./run_before_decrypt-private-key-unix.sh.tmpl) - - Windows-specific: [`run_before_decrypt-private-key-windows.ps1.tmpl`](./run_before_decrypt-private-key-windows.ps1.tmpl) -- CI: [`.github/workflows/ci.yml`](./.github/workflows/ci.yml) - - [`.github/lint.sh`](./.github/lint.sh): renders the templates for each OS, with and without the encrypted files, - then checks them and the files that aren't templates with shellcheck, `zsh -n`, the PowerShell parser, and - TOML, YAML and git config parsers. Also runs locally - - [`.github/test.sh`](./.github/test.sh) and [`.github/test.ps1`](./.github/test.ps1): install the dotfiles on - fresh Ubuntu (latest and 22.04), macOS and Windows machines, then check that applying again changes nothing, - that the shells start cleanly with the tools from mise, and that Neovim installs its plugins, tools, language - servers and parsers the first time it opens a file: [`.github/check-nvim.lua`](./.github/check-nvim.lua) +- Installation scripts: improve and standardize the CLI across operating systems. chezmoi reruns each one only when + it changes + - CLI tools are installed and updated with [mise](https://mise.jdx.dev), with their versions pinned in its + lockfile: [`dot_config/mise`](./dot_config/mise) + - Desktop apps are listed once for macOS and Windows: + [`.chezmoidata/desktop-apps.toml`](./.chezmoidata/desktop-apps.toml) +- Encryption: files with sensitive information are + [encrypted](https://www.chezmoi.io/user-guide/frequently-asked-questions/encryption/) with age +- CI: lints the templates for each OS, then installs the dotfiles on fresh Ubuntu, macOS and Windows machines and + checks that Neovim is ready to use: [`.github/workflows/ci.yml`](./.github/workflows/ci.yml) - Configuration files for software that is not managed with chezmoi: [`reference_dotfiles`](./reference_dotfiles) ## Installation diff --git a/run_before_decrypt-private-key-unix.sh.tmpl b/run_before_decrypt-private-key-unix.sh.tmpl index b520a96..a30289b 100644 --- a/run_before_decrypt-private-key-unix.sh.tmpl +++ b/run_before_decrypt-private-key-unix.sh.tmpl @@ -1,4 +1,6 @@ #!/bin/sh +# Decrypts the key that chezmoi decrypts the encrypted files with, asking for its +# passphrase, if it isn't decrypted yet. chezmoi runs this before applying files. set -eu if [ ! -f "{{ .chezmoi.homeDir }}/.chezmoikey.txt" ]; then diff --git a/run_before_decrypt-private-key-windows.ps1.tmpl b/run_before_decrypt-private-key-windows.ps1.tmpl index fb67edb..d504bee 100644 --- a/run_before_decrypt-private-key-windows.ps1.tmpl +++ b/run_before_decrypt-private-key-windows.ps1.tmpl @@ -1,3 +1,5 @@ +# Decrypts the key that chezmoi decrypts the encrypted files with, asking for its +# passphrase, if it isn't decrypted yet. chezmoi runs this before applying files. if (-Not (Test-Path "{{ .chezmoi.homeDir }}/.chezmoikey.txt" -PathType Leaf)) { Write-Host "# create ~/.chezmoikey.txt" & "{{ .chezmoi.executable }}" age decrypt --output "{{ .chezmoi.homeDir }}/.chezmoikey.txt" --passphrase "{{ .chezmoi.sourceDir }}/key.txt.age" From d8a8c73a6a95dda538abfc1d08505a3afc54d251 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 23:00:47 +0000 Subject: [PATCH 46/76] Install Bitwarden from the Mac App Store on macOS Its Safari extension only comes with the App Store app, not the cask. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoidata/desktop-apps.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.chezmoidata/desktop-apps.toml b/.chezmoidata/desktop-apps.toml index 06e7dce..e2b1d86 100644 --- a/.chezmoidata/desktop-apps.toml +++ b/.chezmoidata/desktop-apps.toml @@ -4,7 +4,8 @@ # Store ID for Windows. Leave them out for an OS that the app isn't on. Find # more with `brew search`, `mas search` and `winget search`. desktopApps = [ - { name = "Bitwarden", cask = "bitwarden", winget = "Bitwarden.Bitwarden" }, + # Bitwarden's Safari extension only comes with its Mac App Store app + { name = "Bitwarden", mas = 1352778147, winget = "Bitwarden.Bitwarden" }, { name = "Docker Desktop", cask = "docker-desktop", winget = "Docker.DockerDesktop" }, { name = "Microsoft To Do", mas = 1274495053, msstore = "9NBLGGH5R558" }, { name = "Nextcloud", cask = "nextcloud", winget = "Nextcloud.NextcloudDesktop" }, From fd67700c786239a0627d3deb5817858bf452f41a Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 23:00:47 +0000 Subject: [PATCH 47/76] Note which mise builds to switch once Ubuntu 22.04 is dropped atuin and yazi use musl builds, and tree-sitter conda-forge's build, only because of Ubuntu 22.04's glibc. Say so in their comments, so that dropping 22.04 also switches them back to the official glibc builds. Drop the note that mise doesn't install conda. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dot_config/mise/config.toml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index 09b392b..64117c3 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -24,15 +24,16 @@ lockfile_platforms = ["linux-arm64", "linux-x64", "macos-arm64", "windows-x64"] [tools] # On Linux, the glibc builds of atuin and yazi need glibc 2.39 (Ubuntu 24.04), -# so use their static musl builds. mise uses glibc builds for the other tools, -# which matters for lsd: its musl build shows uid/gid instead of user names. -# mise skips tmux on Windows, which it has no builds for. +# so use their static musl builds until the dotfiles drop Ubuntu 22.04. mise +# uses glibc builds for the other tools, which matters for lsd: its musl build +# shows uid/gid instead of user names. mise skips tmux on Windows, which it has +# no builds for. atuin = { version = "latest", libc = "musl" } bat = "latest" # The tree-sitter CLI, which nvim-treesitter builds parsers with. Its official # builds need glibc 2.39 (Ubuntu 24.04) since 0.26.1, the oldest version -# nvim-treesitter supports, so use conda-forge's build. mise downloads it -# without installing conda. +# nvim-treesitter supports, so use conda-forge's build until the dotfiles drop +# Ubuntu 22.04. Then switch to the official build: tree-sitter = "latest". "conda:tree-sitter-cli" = "latest" delta = "latest" dust = "latest" From 3f3e4428203297323cc01655e2fc3ebddff65d6f Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 23:03:52 +0000 Subject: [PATCH 48/76] Make the scripts that don't need templating plain files The Windows packages script has no template actions, and the decrypt scripts only used chezmoi's paths, which chezmoi also gives scripts as environment variables. As plain files they're checked directly, and the paths don't need quoting. lint.sh shellchecks every .sh file, so it now also checks the Unix decrypt script. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/lint.sh | 2 +- run_before_decrypt-private-key-unix.sh | 11 +++++++++++ run_before_decrypt-private-key-unix.sh.tmpl | 10 ---------- ...tmpl => run_before_decrypt-private-key-windows.ps1 | 5 +++-- ...> run_onchange_before_install-packages-windows.ps1 | 0 5 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 run_before_decrypt-private-key-unix.sh delete mode 100644 run_before_decrypt-private-key-unix.sh.tmpl rename run_before_decrypt-private-key-windows.ps1.tmpl => run_before_decrypt-private-key-windows.ps1 (53%) rename run_onchange_before_install-packages-windows.ps1.tmpl => run_onchange_before_install-packages-windows.ps1 (100%) diff --git a/.github/lint.sh b/.github/lint.sh index d3de332..ecdece2 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -61,7 +61,7 @@ for os in "${!os_data[@]}"; do done echo "# files that aren't templates" -shellcheck .github/*.sh +git ls-files -z '*.sh' | xargs -0 shellcheck for file in dot_zshenv dot_zshrc dot_config/zsh/*.zsh; do zsh -n "$file" done diff --git a/run_before_decrypt-private-key-unix.sh b/run_before_decrypt-private-key-unix.sh new file mode 100644 index 0000000..8d1ce54 --- /dev/null +++ b/run_before_decrypt-private-key-unix.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# Decrypts the key that chezmoi decrypts the encrypted files with, asking for its +# passphrase, if it isn't decrypted yet. chezmoi runs this before applying files. +set -eu + +key="$HOME/.chezmoikey.txt" +if [ ! -f "$key" ]; then + printf "# create ~/.chezmoikey.txt\n" + "$CHEZMOI_EXECUTABLE" age decrypt --output "$key" --passphrase "$CHEZMOI_SOURCE_DIR/key.txt.age" + chmod 600 "$key" +fi diff --git a/run_before_decrypt-private-key-unix.sh.tmpl b/run_before_decrypt-private-key-unix.sh.tmpl deleted file mode 100644 index a30289b..0000000 --- a/run_before_decrypt-private-key-unix.sh.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -# Decrypts the key that chezmoi decrypts the encrypted files with, asking for its -# passphrase, if it isn't decrypted yet. chezmoi runs this before applying files. -set -eu - -if [ ! -f "{{ .chezmoi.homeDir }}/.chezmoikey.txt" ]; then - printf "# create ~/.chezmoikey.txt\n" - "{{ .chezmoi.executable }}" age decrypt --output "{{ .chezmoi.homeDir }}/.chezmoikey.txt" --passphrase "{{ .chezmoi.sourceDir }}/key.txt.age" - chmod 600 "{{ .chezmoi.homeDir }}/.chezmoikey.txt" -fi diff --git a/run_before_decrypt-private-key-windows.ps1.tmpl b/run_before_decrypt-private-key-windows.ps1 similarity index 53% rename from run_before_decrypt-private-key-windows.ps1.tmpl rename to run_before_decrypt-private-key-windows.ps1 index d504bee..7197aa3 100644 --- a/run_before_decrypt-private-key-windows.ps1.tmpl +++ b/run_before_decrypt-private-key-windows.ps1 @@ -1,7 +1,8 @@ # Decrypts the key that chezmoi decrypts the encrypted files with, asking for its # passphrase, if it isn't decrypted yet. chezmoi runs this before applying files. -if (-Not (Test-Path "{{ .chezmoi.homeDir }}/.chezmoikey.txt" -PathType Leaf)) { +$key = Join-Path $HOME '.chezmoikey.txt' +if (-Not (Test-Path $key -PathType Leaf)) { Write-Host "# create ~/.chezmoikey.txt" - & "{{ .chezmoi.executable }}" age decrypt --output "{{ .chezmoi.homeDir }}/.chezmoikey.txt" --passphrase "{{ .chezmoi.sourceDir }}/key.txt.age" + & $env:CHEZMOI_EXECUTABLE age decrypt --output $key --passphrase (Join-Path $env:CHEZMOI_SOURCE_DIR 'key.txt.age') if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } } diff --git a/run_onchange_before_install-packages-windows.ps1.tmpl b/run_onchange_before_install-packages-windows.ps1 similarity index 100% rename from run_onchange_before_install-packages-windows.ps1.tmpl rename to run_onchange_before_install-packages-windows.ps1 From ff0a240b0ed58dcecf7ad27b399bdc13457f2ede Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 23:04:10 +0000 Subject: [PATCH 49/76] Say the dotfiles support Ubuntu 22.04 or later, not Linux apt is on other Debian-based distros too, but CI only tests Ubuntu 22.04 and the latest Ubuntu, and the mise config works around 22.04's glibc. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 12 ++++++------ reference_dotfiles/software.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4546bc7..346f3e8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ My cross-platform, cross-shell configuration files and installation scripts managed with [chezmoi](https://www.chezmoi.io/): -- Zsh on Linux: Ubuntu and WSL 2 +- Zsh on Ubuntu 22.04 or later, including in WSL 2 - Zsh on macOS - PowerShell 7 on Windows 11 @@ -30,7 +30,7 @@ The files I think are most notable are listed below: ## Installation 1. Install the prerequisites - - Linux: [curl](https://curl.se/download.html), to install chezmoi. chezmoi installs git, zsh and the other + - Ubuntu: [curl](https://curl.se/download.html), to install chezmoi. chezmoi installs git, zsh and the other packages it needs with apt - macOS: git, from the Xcode Command Line Tools: `xcode-select --install`. If you're installing the desktop apps, sign in to the App Store, which some of them come from @@ -42,7 +42,7 @@ The files I think are most notable are listed below: winget install --exact --id Git.Git --source winget ``` -2. Install chezmoi in `~/.local/bin`, pulling and applying the latest changes. On Linux and macOS: +2. Install chezmoi in `~/.local/bin`, pulling and applying the latest changes. On Ubuntu and macOS: ``` sh -c "$(curl -fsLS get.chezmoi.io)" -- -b "$HOME/.local/bin" init --apply patrick-5546 @@ -62,8 +62,8 @@ The files I think are most notable are listed below: It saves the answers in `~/.config/chezmoi/chezmoi.yaml`. Run `chezmoi init --prompt` to answer again - Then chezmoi's scripts install what's missing. Enter your password, or allow the installers that ask for administrator rights, when they ask - - The packages that the dotfiles and Neovim need: with apt on Linux, and gcc ([WinLibs](https://winlibs.com)) - and Python with winget on Windows. On Linux and macOS, zsh becomes your login shell + - The packages that the dotfiles and Neovim need: with apt on Ubuntu, and gcc ([WinLibs](https://winlibs.com)) + and Python with winget on Windows. On Ubuntu and macOS, zsh becomes your login shell - mise in `~/.local/bin`, and the tools in its config. On Windows, it adds `~\.local\bin` to your Path - The desktop apps: with Homebrew on macOS, which it installs first if it's missing, and winget on Windows - Open a new terminal to start using them, or log out and back in if it doesn't start zsh @@ -79,7 +79,7 @@ The files I think are most notable are listed below: ``` - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - - Upgrade everything else with the OS's package managers: `sudo apt upgrade` on Linux, `brew upgrade` and the + - Upgrade everything else with the OS's package managers: `sudo apt upgrade` on Ubuntu, `brew upgrade` and the App Store on macOS, and winget or UniGetUI on Windows 4. Optional, on Windows: install the other software I've used, listed in diff --git a/reference_dotfiles/software.md b/reference_dotfiles/software.md index c328e5d..48ce46b 100644 --- a/reference_dotfiles/software.md +++ b/reference_dotfiles/software.md @@ -15,4 +15,4 @@ desktop apps, or install it with `winget install --exact --id `. | [TeamViewer](https://www.teamviewer.com) | Remote access and support | `TeamViewer.TeamViewer` | | [Thunderbird](https://www.thunderbird.net) | Email | `Mozilla.Thunderbird` | | [Windows Terminal](https://github.com/microsoft/terminal) | Terminal, preinstalled on Windows 11. My settings are in [`windows_terminal/`](./windows_terminal/) | `Microsoft.WindowsTerminal` | -| [WSL](https://learn.microsoft.com/windows/wsl/) | Runs Linux, which the dotfiles also support. `wsl --install` installs it with Ubuntu. My config is in [`wsl/`](./wsl/) | `Microsoft.WSL` | +| [WSL](https://learn.microsoft.com/windows/wsl/) | Runs Linux. `wsl --install` installs it with Ubuntu, which the dotfiles also support. My config is in [`wsl/`](./wsl/) | `Microsoft.WSL` | From 4c5a130d3625d5b331313ada3cfdf4634b70ef7b Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 23:04:55 +0000 Subject: [PATCH 50/76] Explain what the Windows prerequisites are for Windows only comes with Windows PowerShell 5.1, which doesn't load the profile from Documents\PowerShell and ships PSReadLine 2.0, while the profile binds Ctrl+j/k to suggestions from PSReadLine 2.2. Git isn't only for the yazi theme: lazy.nvim clones Neovim's plugins with it, and the profile points yazi at its file command. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 346f3e8..8ca5dd1 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,10 @@ The files I think are most notable are listed below: packages it needs with apt - macOS: git, from the Xcode Command Line Tools: `xcode-select --install`. If you're installing the desktop apps, sign in to the App Store, which some of them come from - - Windows: PowerShell 7, which the profile and chezmoi's scripts run in, and Git, which chezmoi uses to clone the - yazi theme. Install them with winget: + - Windows: PowerShell 7 and Git. The profile needs PowerShell 7: the Windows PowerShell 5.1 that Windows comes + with doesn't load it, and its PSReadLine is too old for it. chezmoi's scripts run in PowerShell 7 too. chezmoi + gets the yazi theme with Git, Neovim gets its plugins with it, and yazi uses its `file` command. Install them + with winget: ``` winget install --exact --id Microsoft.PowerShell --source winget From d95557170531c01e77182216ea23f9ace7e1eb09 Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 23:25:57 +0000 Subject: [PATCH 51/76] Shorten the Windows prerequisites to match the other OSes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8ca5dd1..de2b6b0 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,8 @@ The files I think are most notable are listed below: packages it needs with apt - macOS: git, from the Xcode Command Line Tools: `xcode-select --install`. If you're installing the desktop apps, sign in to the App Store, which some of them come from - - Windows: PowerShell 7 and Git. The profile needs PowerShell 7: the Windows PowerShell 5.1 that Windows comes - with doesn't load it, and its PSReadLine is too old for it. chezmoi's scripts run in PowerShell 7 too. chezmoi - gets the yazi theme with Git, Neovim gets its plugins with it, and yazi uses its `file` command. Install them - with winget: + - Windows: PowerShell 7, which the profile and chezmoi's scripts run in, and Git, which chezmoi, Neovim and yazi + use. Install them with winget: ``` winget install --exact --id Microsoft.PowerShell --source winget From 7a158896dbd4f14c731f8a7f592783a8e81c62bc Mon Sep 17 00:00:00 2001 From: patrick-5546 <65756895+patrick-5546@users.noreply.github.com> Date: Wed, 11 Nov 2026 23:25:57 +0000 Subject: [PATCH 52/76] Remove the redundant Import-Module PSReadLine from the profile PSReadLine comes with PowerShell 7. In interactive sessions, PowerShell imports it before running the profile, so the import did nothing. In `pwsh -Command` sessions, the first Set-PSReadLineOption autoloads it, before atuin's init checks that it's loaded. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Documents/PowerShell/Microsoft.PowerShell_profile.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 index 136b609..6dab969 100644 --- a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 +++ b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 @@ -1,6 +1,3 @@ -# Imports -Import-Module PSReadLine - $ProfilePath=Split-Path -parent $profile # Functions @@ -8,6 +5,7 @@ $ProfilePath=Split-Path -parent $profile . $ProfilePath/ssh.autocomplete.ps1 ## PSReadLine configuration +# PSReadLine comes with PowerShell 7, which loads it without Import-Module Set-PSReadLineOption -EditMode Vi # Shows navigable menu of all options when hitting Tab Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete From a4a153dc0714dd8ef9dda6a16027d235973abc90 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 01:52:33 +0000 Subject: [PATCH 53/76] Lock zsh's history file with fcntl so mise's prompt hook can skip its work By default, zsh locks the history file by creating and deleting ~/.zsh_history.LOCK after every command. That changes ~'s modification time, and mise's prompt hook takes a changed folder on its config search path as a sign that a config file might have appeared, so it rebuilt PATH and the environment at every prompt instead of taking its fast path. hist_fcntl_lock locks the history file itself instead. On my WSL machine, the hook went from about 36 ms to 5 ms per prompt, and from 550 ms to 6 ms with WSL's Windows PATH. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dot_config/zsh/history.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dot_config/zsh/history.zsh b/dot_config/zsh/history.zsh index 0a1693b..09bc825 100644 --- a/dot_config/zsh/history.zsh +++ b/dot_config/zsh/history.zsh @@ -33,3 +33,7 @@ setopt hist_expire_dups_first # delete duplicates first when HISTFILE size excee setopt hist_ignore_space # ignore commands that start with space setopt hist_verify # show command with history expansion to user before running it setopt share_history # share command history data (zsh ignores inc_append_history_time with it) +# Lock the history file with fcntl. zsh's default lock is a file it creates and +# deletes in ~ after every command, which changes ~'s modification time, so +# mise's prompt hook looked for new config files and rebuilt PATH every time +setopt hist_fcntl_lock From 7b5c0476ff799ce5a6ff7d9f095f32879381d714 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 01:52:40 +0000 Subject: [PATCH 54/76] Keep only the Windows folders that zsh uses on PATH in WSL WSL appends the whole Windows PATH, 42 folders on my machine, and folders in /mnt/c are slow to read from Linux. mise checks every folder on PATH when it activates and at each cd, and zsh searches them for each command it doesn't know, which syntax highlighting does as you type. So a new shell took 1.2 s, each cd 0.5 s, and each lookup of a missing command 127 ms. .zshrc now keeps only System32 and Windows, for clip.exe, cmd.exe, explorer.exe and wsl.exe, and VS Code's bin folder, for code. A new shell takes 0.16 s, a cd 0.11 s, a missing command 10 ms, and chezmoi status 0.11 s instead of 0.93 s. test.sh checks which folders it keeps. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/test.sh | 8 ++++++++ dot_zshrc | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/test.sh b/.github/test.sh index 0707901..bca83f6 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -103,6 +103,14 @@ output=$(in_pty zsh -i -c exit) && status=0 || status=$? if [ "$status" -ne 0 ] || [ -n "$output" ]; then fail "zsh should start without printing anything, but exited with $status and printed: $output" fi +# On WSL, .zshrc keeps only the Windows folders it needs on PATH. It expands in +# zsh, not here: +# shellcheck disable=SC2016 +output=$(WSL_DISTRO_NAME=Ubuntu PATH="$PATH:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Tools:/mnt/c/Program Files/Microsoft VS Code/bin" \ + in_pty zsh -i -c 'print -rl -- ${(M)path:#/mnt/*}') || true +if [ "$output" != $'/mnt/c/Windows/system32\n/mnt/c/Windows\n/mnt/c/Program Files/Microsoft VS Code/bin' ]; then + fail "On WSL, PATH should only keep System32, Windows and VS Code from /mnt, but has: $output" +fi # Prints the problems it finds. It expands in zsh, not here: # shellcheck disable=SC2016 zsh_checks=' diff --git a/dot_zshrc b/dot_zshrc index f27d7a7..b89447e 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -4,6 +4,15 @@ if [[ -x /opt/homebrew/bin/brew ]]; then eval "$(/opt/homebrew/bin/brew shellenv zsh)" fi +# WSL appends the whole Windows PATH, and the folders in /mnt/c are slow to read +# from Linux. mise and zsh look through every folder on PATH, which made new +# shells take a second, each cd half a second, and typing lag. Keep only the +# Windows commands used here: System32 and Windows (clip.exe, cmd.exe, +# explorer.exe) and VS Code (code) +if [[ -n $WSL_DISTRO_NAME ]]; then + path=(${path:#/mnt/*} ${(M)path:#/mnt/c/[Ww]indows(|/[Ss]ystem32)} ${(M)path:#/mnt/*/Microsoft VS Code/bin}) +fi + # Enable colors and change prompt: autoload -U colors && colors From e996c3ec65157976a014afd07bffa3cd2227862a Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 01:52:48 +0000 Subject: [PATCH 55/76] Get git's GitHub credentials from gh through mise's shim gh auth login added itself to ~/.gitconfig, which chezmoi manages, as git's credential helper for GitHub, with the path of the gh it ran from. On my machine, that was grm's ~/.local/bin/gh, which the PR says to delete, and mise's would be a versioned path that mise upgrade removes. .gitconfig now sets the helper to mise's gh shim on every OS. gh recognizes itself as the helper, so gh auth login no longer offers to set up git or changes the file. Windows used Git Credential Manager, and its tools script now runs gh auth login too, like the Unix one, unless chezmoi's input isn't the terminal. test.sh and test.ps1 check that git gets GitHub credentials through the shim, using the GITHUB_TOKEN that CI sets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/test.ps1 | 11 ++++++++++- .github/test.sh | 7 +++++++ README.md | 1 + dot_gitconfig.tmpl | 13 +++++++++++++ run_onchange_after_install-cli-tools-unix.sh.tmpl | 2 ++ ...nchange_after_install-cli-tools-windows.ps1.tmpl | 11 +++++++++++ 6 files changed, 44 insertions(+), 1 deletion(-) diff --git a/.github/test.ps1 b/.github/test.ps1 index 319702d..a6402b6 100644 --- a/.github/test.ps1 +++ b/.github/test.ps1 @@ -32,7 +32,8 @@ Write-Host '::group::Install the dotfiles' New-Item -ItemType Directory -Force "$HOME\.local\share" | Out-Null Copy-Item -Recurse -Force $checkout "$HOME\.local\share\chezmoi" Invoke-Expression "&{$(Invoke-RestMethod https://get.chezmoi.io/ps1)} -b '$bin'" -chezmoi init --apply --promptBool 'Decrypt the encrypted files with the key passphrase=false' ` +# Without a terminal for input, like test.sh, so the scripts don't ask to log in +$null | chezmoi init --apply --promptBool 'Decrypt the encrypted files with the key passphrase=false' ` --promptBool 'Install the desktop apps=false' if ($LASTEXITCODE -ne 0) { throw "chezmoi init --apply failed with exit code $LASTEXITCODE" } Write-Host '::endgroup::' @@ -49,6 +50,14 @@ if ($LASTEXITCODE -ne 0) { Fail 'chezmoi verify found differences' } mise ls Write-Host '::endgroup::' +Write-Host "::group::Check git's GitHub credentials" +# git gets them from gh through mise's shim, and gh returns the token that CI +# sets in GITHUB_TOKEN +$env:GIT_TERMINAL_PROMPT = '0' +$output = "protocol=https`nhost=github.com`n" | git credential fill 2>&1 | Out-String +if ($output -notmatch '(?m)^password=.') { Fail "git didn't get GitHub credentials from gh: $output" } +Write-Host '::endgroup::' + Write-Host '::group::Check PowerShell' $output = Invoke-NewPowerShell 'exit' if ($LASTEXITCODE -ne 0 -or $output.Trim()) { Fail "PowerShell printed on startup: $output" } diff --git a/.github/test.sh b/.github/test.sh index bca83f6..eabce82 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -89,6 +89,13 @@ printf '#include \nint main(void) { return EXIT_SUCCESS; }\n' | cc -x fail "cc can't compile a C program" echo "::endgroup::" +echo "::group::Check git's GitHub credentials" +# git gets them from gh through mise's shim, and gh returns the token that CI +# sets in GITHUB_TOKEN +output=$(printf 'protocol=https\nhost=github.com\n\n' | GIT_TERMINAL_PROMPT=0 git credential fill 2>&1) || true +grep -q '^password=.' <<<"$output" || fail "git didn't get GitHub credentials from gh: $output" +echo "::endgroup::" + echo "::group::Check zsh" # GitHub's Ubuntu image makes everything in /usr/share writable by everyone, # including zsh's completion directories, so compinit would ask whether to use diff --git a/README.md b/README.md index de2b6b0..15900fc 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ The files I think are most notable are listed below: - The packages that the dotfiles and Neovim need: with apt on Ubuntu, and gcc ([WinLibs](https://winlibs.com)) and Python with winget on Windows. On Ubuntu and macOS, zsh becomes your login shell - mise in `~/.local/bin`, and the tools in its config. On Windows, it adds `~\.local\bin` to your Path + - `gh auth login`, if you aren't logged in to GitHub. git gets its GitHub credentials from gh - The desktop apps: with Homebrew on macOS, which it installs first if it's missing, and winget on Windows - Open a new terminal to start using them, or log out and back in if it doesn't start zsh diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index c48c554..862280f 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -40,6 +40,19 @@ autoStash = true [log] date = local +{{- $gh := printf "%s/.local/share/mise/shims/gh" .chezmoi.homeDir }} +{{- if eq .chezmoi.os "windows" }} +{{- $gh = printf "%s/AppData/Local/mise/shims/gh.exe" .chezmoi.homeDir }} +{{- end }} +# git gets GitHub credentials from gh, through mise's shim, which runs the gh in +# mise.lock. gh auth login leaves this file alone since gh is already the helper. +# gh auth setup-git would add the path of the gh it runs, which mise upgrade removes +[credential "https://github.com"] + helper = + helper = !'{{ $gh }}' auth git-credential +[credential "https://gist.github.com"] + helper = + helper = !'{{ $gh }}' auth git-credential [alias] # from https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git a = add diff --git a/run_onchange_after_install-cli-tools-unix.sh.tmpl b/run_onchange_after_install-cli-tools-unix.sh.tmpl index 3124e84..8e1162d 100644 --- a/run_onchange_after_install-cli-tools-unix.sh.tmpl +++ b/run_onchange_after_install-cli-tools-unix.sh.tmpl @@ -48,6 +48,8 @@ curl -fsSL -o _dust "https://raw.githubusercontent.com/bootandy/dust/v$("$mise" || echo "Couldn't download the dust completions" >&2 rm -f "$HOME/.zcompdump" # so that the next zsh loads the new completions +# git gets GitHub credentials from gh (see .gitconfig). Skipped without a +# terminal, as in CI if [ -t 0 ] && ! gh auth status >/dev/null 2>&1; then printf "\n# Log in to GitHub\n" gh auth login || echo "gh auth login failed, run it again later" >&2 diff --git a/run_onchange_after_install-cli-tools-windows.ps1.tmpl b/run_onchange_after_install-cli-tools-windows.ps1.tmpl index 5bdb789..c8d1fe5 100644 --- a/run_onchange_after_install-cli-tools-windows.ps1.tmpl +++ b/run_onchange_after_install-cli-tools-windows.ps1.tmpl @@ -17,3 +17,14 @@ Write-Host "`n# Install tools with mise" # Only the versions in mise.lock, and fail if it doesn't have them & $mise install --locked if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +# git gets GitHub credentials from gh (see .gitconfig). Skipped when chezmoi's +# input isn't the terminal, as in CI +if (-not [Console]::IsInputRedirected) { + & $mise exec -- gh auth status *> $null + if ($LASTEXITCODE -ne 0) { + Write-Host "`n# Log in to GitHub" + & $mise exec -- gh auth login + if ($LASTEXITCODE -ne 0) { Write-Warning 'gh auth login failed, run it again later' } + } +} From 5d13c5dd4451a81ba20da02a0abd89508123e0d5 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 01:52:53 +0000 Subject: [PATCH 56/76] Hold back new releases for 7 days and update mise automatically minimum_release_age = "7d" makes mise skip tool and mise releases from the last 7 days, instead of its default 24 hours, which gives others time to find a compromised or broken release. It applies to mise upgrade, use and lock, and to mise's own updates, but not to the versions already in mise.lock, so nothing is downgraded. The tools script gives mise's installer the same age, since it doesn't read the config. self_update.auto updates mise once a week, before a command that may download something, except in CI and scripts. Every machine reads the same mise.lock, so this keeps their mise versions close. An automatic update never installs a release older than the running one. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 2 +- dot_config/mise/config.toml | 11 +++++++++-- run_onchange_after_install-cli-tools-unix.sh.tmpl | 4 +++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 15900fc..322e0a9 100644 --- a/README.md +++ b/README.md @@ -75,10 +75,10 @@ The files I think are most notable are listed below: chezmoi update # pull and apply the latest changes mise upgrade # upgrade the tools, which updates mise.lock chezmoi re-add ~/.config/mise # save mise.lock, then commit and push it - mise self-update # upgrade mise chezmoi upgrade # upgrade chezmoi ``` + - mise updates itself once a week. Like `mise upgrade`, it skips releases from the last 7 days - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - Upgrade everything else with the OS's package managers: `sudo apt upgrade` on Ubuntu, `brew upgrade` and the App Store on macOS, and winget or UniGetUI on Windows diff --git a/dot_config/mise/config.toml b/dot_config/mise/config.toml index 64117c3..38d241a 100644 --- a/dot_config/mise/config.toml +++ b/dot_config/mise/config.toml @@ -13,14 +13,21 @@ # editing this file by hand, update mise.lock with `mise lock --global`. Then # save the changes with `chezmoi re-add ~/.config/mise`, and commit them. # - Roll back an update by reverting its commit and running `chezmoi apply`. -# - Run a tool once without adding it with `mise exec TOOL@VERSION -- COMMAND`, -# and update mise itself with `mise self-update`. +# - Run a tool once without adding it with `mise exec TOOL@VERSION -- COMMAND`. +# mise updates itself, or run `mise self-update`. # # See https://mise.jdx.dev/configuration.html [settings] # Platforms that mise.lock has downloads for. To set up another kind of machine, # add its platform and run `mise lock --global`. lockfile_platforms = ["linux-arm64", "linux-x64", "macos-arm64", "windows-x64"] +# Skip tool and mise releases from the last 7 days, which gives others time to +# find a compromised or broken release. It doesn't change the versions in +# mise.lock. Take a release early with `mise upgrade --minimum-release-age 0s TOOL`. +minimum_release_age = "7d" +# Update mise once a week, before a command that may download something, except +# in CI and scripts +self_update.auto = true [tools] # On Linux, the glibc builds of atuin and yazi need glibc 2.39 (Ubuntu 24.04), diff --git a/run_onchange_after_install-cli-tools-unix.sh.tmpl b/run_onchange_after_install-cli-tools-unix.sh.tmpl index 8e1162d..517293e 100644 --- a/run_onchange_after_install-cli-tools-unix.sh.tmpl +++ b/run_onchange_after_install-cli-tools-unix.sh.tmpl @@ -9,7 +9,9 @@ set -euo pipefail mise="$HOME/.local/bin/mise" if [ ! -x "$mise" ]; then printf "\n# Install mise\n" - curl -fsSL https://mise.run | MISE_INSTALL_PATH="$mise" sh + # The installer doesn't read the mise config, so give it its minimum release age + curl -fsSL https://mise.run | MISE_INSTALL_PATH="$mise" \ + MISE_MINIMUM_RELEASE_AGE={{ (include "dot_config/mise/config.toml" | fromToml).settings.minimum_release_age | quote }} sh fi printf "\n# Install tools with mise\n" From 9eaeac6e46226c49d47e2ec4b800ab6704361c8e Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 01:53:00 +0000 Subject: [PATCH 57/76] Skip the decrypt scripts once the key exists chezmoi runs run_before_ scripts on every apply, so chezmoi status always listed decrypt-private-key-unix.sh on the machines that decrypt. CI answers no to the decrypt prompt, so its check that chezmoi status is empty didn't see it. The scripts are templates again, and they're empty once ~/.chezmoikey.txt exists. chezmoi skips empty scripts, and still runs them if the key is deleted. lint.sh renders them for home folders without a key. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/lint.sh | 7 ++++--- run_before_decrypt-private-key-unix.sh | 11 ----------- run_before_decrypt-private-key-unix.sh.tmpl | 12 ++++++++++++ run_before_decrypt-private-key-windows.ps1 | 8 -------- run_before_decrypt-private-key-windows.ps1.tmpl | 9 +++++++++ 5 files changed, 25 insertions(+), 22 deletions(-) delete mode 100644 run_before_decrypt-private-key-unix.sh create mode 100644 run_before_decrypt-private-key-unix.sh.tmpl delete mode 100644 run_before_decrypt-private-key-windows.ps1 create mode 100644 run_before_decrypt-private-key-windows.ps1.tmpl diff --git a/.github/lint.sh b/.github/lint.sh index ecdece2..136f349 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -7,10 +7,11 @@ set -euo pipefail cd "$(dirname "$0")/.." +# Home folders without the age key, so that the decrypt scripts render declare -A os_data=( - [linux]='{"os":"linux"}' - [darwin]='{"os":"darwin"}' - [windows]='{"os":"windows"}' + [linux]='{"os":"linux","homeDir":"/home/lint"}' + [darwin]='{"os":"darwin","homeDir":"/Users/lint"}' + [windows]='{"os":"windows","homeDir":"C:/Users/lint"}' ) out=$(mktemp -d) trap 'rm -rf "$out"' EXIT diff --git a/run_before_decrypt-private-key-unix.sh b/run_before_decrypt-private-key-unix.sh deleted file mode 100644 index 8d1ce54..0000000 --- a/run_before_decrypt-private-key-unix.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# Decrypts the key that chezmoi decrypts the encrypted files with, asking for its -# passphrase, if it isn't decrypted yet. chezmoi runs this before applying files. -set -eu - -key="$HOME/.chezmoikey.txt" -if [ ! -f "$key" ]; then - printf "# create ~/.chezmoikey.txt\n" - "$CHEZMOI_EXECUTABLE" age decrypt --output "$key" --passphrase "$CHEZMOI_SOURCE_DIR/key.txt.age" - chmod 600 "$key" -fi diff --git a/run_before_decrypt-private-key-unix.sh.tmpl b/run_before_decrypt-private-key-unix.sh.tmpl new file mode 100644 index 0000000..30ea642 --- /dev/null +++ b/run_before_decrypt-private-key-unix.sh.tmpl @@ -0,0 +1,12 @@ +{{ if not (stat (joinPath .chezmoi.homeDir ".chezmoikey.txt")) -}} +#!/bin/sh +# Decrypts the key that chezmoi decrypts the encrypted files with, asking for its +# passphrase. chezmoi runs this before applying files while the key is missing. +# Once it exists, the template is empty, so chezmoi skips it. +set -eu + +key="$HOME/.chezmoikey.txt" +printf "# create ~/.chezmoikey.txt\n" +"$CHEZMOI_EXECUTABLE" age decrypt --output "$key" --passphrase "$CHEZMOI_SOURCE_DIR/key.txt.age" +chmod 600 "$key" +{{ end -}} diff --git a/run_before_decrypt-private-key-windows.ps1 b/run_before_decrypt-private-key-windows.ps1 deleted file mode 100644 index 7197aa3..0000000 --- a/run_before_decrypt-private-key-windows.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# Decrypts the key that chezmoi decrypts the encrypted files with, asking for its -# passphrase, if it isn't decrypted yet. chezmoi runs this before applying files. -$key = Join-Path $HOME '.chezmoikey.txt' -if (-Not (Test-Path $key -PathType Leaf)) { - Write-Host "# create ~/.chezmoikey.txt" - & $env:CHEZMOI_EXECUTABLE age decrypt --output $key --passphrase (Join-Path $env:CHEZMOI_SOURCE_DIR 'key.txt.age') - if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } -} diff --git a/run_before_decrypt-private-key-windows.ps1.tmpl b/run_before_decrypt-private-key-windows.ps1.tmpl new file mode 100644 index 0000000..f823ebb --- /dev/null +++ b/run_before_decrypt-private-key-windows.ps1.tmpl @@ -0,0 +1,9 @@ +{{ if not (stat (joinPath .chezmoi.homeDir ".chezmoikey.txt")) -}} +# Decrypts the key that chezmoi decrypts the encrypted files with, asking for its +# passphrase. chezmoi runs this before applying files while the key is missing. +# Once it exists, the template is empty, so chezmoi skips it. +$key = Join-Path $HOME '.chezmoikey.txt' +Write-Host "# create ~/.chezmoikey.txt" +& $env:CHEZMOI_EXECUTABLE age decrypt --output $key --passphrase (Join-Path $env:CHEZMOI_SOURCE_DIR 'key.txt.age') +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } +{{ end -}} From c9fee53fa49d5eb7d0987207fe5eba335ad0ec87 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 01:53:00 +0000 Subject: [PATCH 58/76] Use chezmoi's built-in age on every OS chezmoi used the age command where it's installed, as on my Ubuntu machine, and its built-in age everywhere else. The decrypt scripts already use the built-in one, so now chezmoi always does, and no machine needs the age command. chezmoi init applies it to existing machines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoi.yaml.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl index 1668a93..a1d8aff 100644 --- a/.chezmoi.yaml.tmpl +++ b/.chezmoi.yaml.tmpl @@ -22,6 +22,8 @@ diff: edit: command: "nvim" encryption: "age" +# Decrypt with chezmoi's own age on every OS, even where the age command is installed +useBuiltinAge: true age: identity: "{{ .chezmoi.homeDir }}/.chezmoikey.txt" recipient: "age1tqerfm7h83nl3d6ewcmhze8jmndfaaznrt84e8r0cd9rux9l5cwq72c992" From 9bf4a71ca1fe4ffeaa56f70ca411abe121deded7 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 19:08:04 +0000 Subject: [PATCH 59/76] Hold back new mise releases for 7 days on Windows's first install too The Windows tools script installs mise with mise's PowerShell installer, which, like the Unix one, reads MISE_MINIMUM_RELEASE_AGE, even though mise's docs don't list it for that script. So the first install picked any release older than the installer's default of 24 hours, while the mise config holds back mise's own updates for 7 days. Give it the config's value, as the Unix tools script does. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- run_onchange_after_install-cli-tools-windows.ps1.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run_onchange_after_install-cli-tools-windows.ps1.tmpl b/run_onchange_after_install-cli-tools-windows.ps1.tmpl index c8d1fe5..f19ab72 100644 --- a/run_onchange_after_install-cli-tools-windows.ps1.tmpl +++ b/run_onchange_after_install-cli-tools-windows.ps1.tmpl @@ -10,6 +10,8 @@ if (-not (Test-Path $mise -PathType Leaf)) { Write-Host "`n# Install mise" # The installer also adds ~\.local\bin to the user Path $env:MISE_INSTALL_PATH = $mise + # The installer doesn't read the mise config, so give it its minimum release age + $env:MISE_MINIMUM_RELEASE_AGE = {{ (include "dot_config/mise/config.toml" | fromToml).settings.minimum_release_age | squote }} Invoke-RestMethod https://mise.run/powershell | Invoke-Expression } From 794e1999cdbaf0f59f3db8bc5602ce6321a17134 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 19:08:04 +0000 Subject: [PATCH 60/76] Say that the WSL PATH filter needs WSL to append the Windows PATH .zshrc keeps System32, Windows and VS Code's bin folder from the Windows PATH that WSL appends. With appendWindowsPath = false in /etc/wsl.conf, WSL appends nothing, so clip.exe, explorer.exe and code are missing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- dot_zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dot_zshrc b/dot_zshrc index b89447e..3411d1d 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -8,7 +8,8 @@ fi # from Linux. mise and zsh look through every folder on PATH, which made new # shells take a second, each cd half a second, and typing lag. Keep only the # Windows commands used here: System32 and Windows (clip.exe, cmd.exe, -# explorer.exe) and VS Code (code) +# explorer.exe) and VS Code (code). They come from what WSL appends, so +# /etc/wsl.conf must keep its default, appendWindowsPath = true if [[ -n $WSL_DISTRO_NAME ]]; then path=(${path:#/mnt/*} ${(M)path:#/mnt/c/[Ww]indows(|/[Ss]ystem32)} ${(M)path:#/mnt/*/Microsoft VS Code/bin}) fi From c882eac9a8da8165eec472a95ac1d52bddb433fa Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 19:08:04 +0000 Subject: [PATCH 61/76] Check that git gets GitHub credentials from cmd on Windows cmd, Windows PowerShell and VS Code don't activate mise, so git only finds gh through the absolute path of mise's shim in .gitconfig. Run git credential fill from cmd with the Path that a new terminal gets, from the registry, as well as from the test's PowerShell. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/test.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/test.ps1 b/.github/test.ps1 index a6402b6..a3bbd18 100644 --- a/.github/test.ps1 +++ b/.github/test.ps1 @@ -54,8 +54,17 @@ Write-Host "::group::Check git's GitHub credentials" # git gets them from gh through mise's shim, and gh returns the token that CI # sets in GITHUB_TOKEN $env:GIT_TERMINAL_PROMPT = '0' -$output = "protocol=https`nhost=github.com`n" | git credential fill 2>&1 | Out-String +$request = "protocol=https`nhost=github.com`n" +$output = $request | git credential fill 2>&1 | Out-String if ($output -notmatch '(?m)^password=.') { Fail "git didn't get GitHub credentials from gh: $output" } +# cmd, Windows PowerShell and VS Code don't activate mise, so check git there +# too: from cmd, with the Path that a new terminal gets +$sessionPath = $env:Path +$env:Path = [Environment]::GetEnvironmentVariable('Path', 'Machine') + ';' + + [Environment]::GetEnvironmentVariable('Path', 'User') +$output = $request | cmd /d /c 'git credential fill 2>&1' | Out-String +$env:Path = $sessionPath +if ($output -notmatch '(?m)^password=.') { Fail "git in cmd didn't get GitHub credentials from gh: $output" } Write-Host '::endgroup::' Write-Host '::group::Check PowerShell' From c7f6fdca327706a746bdcb57cdf03ec0622b2b48 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 20:19:26 +0000 Subject: [PATCH 62/76] Install Ghostty on macOS Ghostty is a terminal emulator, and its Homebrew cask needs macOS 13 or later. It has no Windows version, so the desktop apps list only gives its cask. The Windows script renders the same as before, so it doesn't run again. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoidata/desktop-apps.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.chezmoidata/desktop-apps.toml b/.chezmoidata/desktop-apps.toml index e2b1d86..0702bbb 100644 --- a/.chezmoidata/desktop-apps.toml +++ b/.chezmoidata/desktop-apps.toml @@ -7,6 +7,7 @@ desktopApps = [ # Bitwarden's Safari extension only comes with its Mac App Store app { name = "Bitwarden", mas = 1352778147, winget = "Bitwarden.Bitwarden" }, { name = "Docker Desktop", cask = "docker-desktop", winget = "Docker.DockerDesktop" }, + { name = "Ghostty", cask = "ghostty" }, { name = "Microsoft To Do", mas = 1274495053, msstore = "9NBLGGH5R558" }, { name = "Nextcloud", cask = "nextcloud", winget = "Nextcloud.NextcloudDesktop" }, { name = "Speedtest by Ookla", mas = 1153157709, winget = "Ookla.Speedtest.Desktop" }, From 6a09ac2b0e1adee7458c42dc74408fc34a4d200d Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 20:19:26 +0000 Subject: [PATCH 63/76] List Outlook for Windows instead of Thunderbird in software.md winget's default source has the new Outlook for Windows as Microsoft.Outlook. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- reference_dotfiles/software.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference_dotfiles/software.md b/reference_dotfiles/software.md index 48ce46b..f66989d 100644 --- a/reference_dotfiles/software.md +++ b/reference_dotfiles/software.md @@ -9,10 +9,10 @@ desktop apps, or install it with `winget install --exact --id `. | [Carnac](https://github.com/Code52/carnac) | Shows the keys you press, for presentations and screen recordings | `code52.Carnac` | | [Discord](https://discord.com) | Chat | `Discord.Discord` | | [NanaZip](https://github.com/M2Team/NanaZip) | Opens and creates archives. A 7-Zip fork that's in the Windows 11 context menu | `M2Team.NanaZip` | +| [Outlook for Windows](https://www.microsoft.com/microsoft-365/outlook/outlook-for-windows) | Email and calendar | `Microsoft.Outlook` | | [Plex](https://www.plex.tv) | Plays media from Plex servers | `Plex.Plex` | | [Rufus](https://rufus.ie) | Creates bootable USB drives | `Rufus.Rufus` | | [Signal](https://signal.org) | Encrypted messaging | `OpenWhisperSystems.Signal` | | [TeamViewer](https://www.teamviewer.com) | Remote access and support | `TeamViewer.TeamViewer` | -| [Thunderbird](https://www.thunderbird.net) | Email | `Mozilla.Thunderbird` | | [Windows Terminal](https://github.com/microsoft/terminal) | Terminal, preinstalled on Windows 11. My settings are in [`windows_terminal/`](./windows_terminal/) | `Microsoft.WindowsTerminal` | | [WSL](https://learn.microsoft.com/windows/wsl/) | Runs Linux. `wsl --install` installs it with Ubuntu, which the dotfiles also support. My config is in [`wsl/`](./wsl/) | `Microsoft.WSL` | From 9cf7ca8e2a9edfa5c0a42f11b2835b58e66a531b Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 21:45:06 +0000 Subject: [PATCH 64/76] Install Outlook on Windows with the desktop apps The new Outlook for Windows moves from software.md, which lists what the dotfiles don't install, to the desktop apps, which install it with winget's Microsoft.Outlook. It's only for Windows, so macOS's script renders the same as before and doesn't run again. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoidata/desktop-apps.toml | 2 ++ reference_dotfiles/software.md | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.chezmoidata/desktop-apps.toml b/.chezmoidata/desktop-apps.toml index 0702bbb..1d324bd 100644 --- a/.chezmoidata/desktop-apps.toml +++ b/.chezmoidata/desktop-apps.toml @@ -10,6 +10,8 @@ desktopApps = [ { name = "Ghostty", cask = "ghostty" }, { name = "Microsoft To Do", mas = 1274495053, msstore = "9NBLGGH5R558" }, { name = "Nextcloud", cask = "nextcloud", winget = "Nextcloud.NextcloudDesktop" }, + # The new Outlook for Windows, not classic Outlook + { name = "Outlook", winget = "Microsoft.Outlook" }, { name = "Speedtest by Ookla", mas = 1153157709, winget = "Ookla.Speedtest.Desktop" }, { name = "TorGuard", cask = "torguard", winget = "VPNetwork.TorGuard" }, { name = "UniGetUI", winget = "Devolutions.UniGetUI" }, diff --git a/reference_dotfiles/software.md b/reference_dotfiles/software.md index f66989d..fe3b2e9 100644 --- a/reference_dotfiles/software.md +++ b/reference_dotfiles/software.md @@ -9,7 +9,6 @@ desktop apps, or install it with `winget install --exact --id `. | [Carnac](https://github.com/Code52/carnac) | Shows the keys you press, for presentations and screen recordings | `code52.Carnac` | | [Discord](https://discord.com) | Chat | `Discord.Discord` | | [NanaZip](https://github.com/M2Team/NanaZip) | Opens and creates archives. A 7-Zip fork that's in the Windows 11 context menu | `M2Team.NanaZip` | -| [Outlook for Windows](https://www.microsoft.com/microsoft-365/outlook/outlook-for-windows) | Email and calendar | `Microsoft.Outlook` | | [Plex](https://www.plex.tv) | Plays media from Plex servers | `Plex.Plex` | | [Rufus](https://rufus.ie) | Creates bootable USB drives | `Rufus.Rufus` | | [Signal](https://signal.org) | Encrypted messaging | `OpenWhisperSystems.Signal` | From 7f4d062c7f9c317db1ecb04e5241d1ed0e7fbfe7 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 22:25:49 +0000 Subject: [PATCH 65/76] Load the PowerShell profile's scripts from its own folder The profile dot-sourced functions.ps1, ssh.autocomplete.ps1 and aliases.ps1 from $profile's folder, which is where PowerShell looks for the profile. With Documents in OneDrive, that's OneDrive's Documents, so a profile there has to load chezmoi's from ~\Documents\PowerShell, and chezmoi's then loaded the old copies of the three scripts left in OneDrive. $PSScriptRoot is the folder of the running file, and the same as $profile's when PowerShell loads chezmoi's profile itself. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Documents/PowerShell/Microsoft.PowerShell_profile.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 index 6dab969..e7a48fe 100644 --- a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 +++ b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 @@ -1,4 +1,6 @@ -$ProfilePath=Split-Path -parent $profile +# This file's folder. $profile isn't, when PowerShell loads this file from a +# profile elsewhere, such as in a Documents folder that's in OneDrive +$ProfilePath = $PSScriptRoot # Functions . $ProfilePath/functions.ps1 From 2fe66fb408cced57be0893b1a295a2544ccc076b Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 22:27:51 +0000 Subject: [PATCH 66/76] Page delta's and bat's output with Git's less on Windows chezmoi diff and bat printed without paging on Windows: both look for less on PATH, and Git's less is in C:\Program Files\Git\usr\bin, which isn't on it. git diff paged, because Git puts that folder on PATH for the programs it starts. PowerShell's less alias doesn't reach them. The profile sets DELTA_PAGER and BAT_PAGER to Git's less, without arguments: given any, delta and bat pass only those, so delta would skip --quit-if-one-screen and wait for q after even a short diff. delta splits BAT_PAGER's path at the space, so BAT_PAGER alone isn't enough. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- Documents/PowerShell/Microsoft.PowerShell_profile.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 index e7a48fe..04493e7 100644 --- a/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 +++ b/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 @@ -25,6 +25,11 @@ Set-PSReadlineKeyHandler -Chord 'Ctrl+k' -Function PreviousSuggestion $env:YAZI_FILE_ONE = "C:\Program Files\Git\usr\bin\file.exe" $env:YAZI_CONFIG_HOME = Join-Path $HOME ".config\yazi" $env:XDG_CONFIG_HOME = Join-Path $HOME ".config" +# delta and bat page with less, which comes with Git but isn't on PATH. Without +# arguments, so that they add their own options for less, such as -R and +# --quit-if-one-screen. The quotes are for the space: they split it like a command +$env:DELTA_PAGER = '"C:\Program Files\Git\usr\bin\less.exe"' +$env:BAT_PAGER = $env:DELTA_PAGER # Tools installed by mise: https://mise.jdx.dev # Before atuin, starship and zoxide, which it puts on PATH. Starship replaces From d4cdd5ce58c733b3fb9f108ffb65b19c95b1815b Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 22:29:38 +0000 Subject: [PATCH 67/76] Load the dotfiles' PowerShell profile when Documents is in OneDrive PowerShell looks for its profile in the Documents folder, and OneDrive can move that folder into OneDrive. chezmoi still puts the profile in ~\Documents\PowerShell, so PowerShell didn't load it. A new Windows script writes a profile in the Documents folder that PowerShell uses, which loads chezmoi's, if that folder isn't ~\Documents. It leaves a profile that has other commands as it is, and says what line to add to it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 1 + README.md | 2 ++ ...nge_after_install-profile-stub-windows.ps1 | 20 +++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 run_onchange_after_install-profile-stub-windows.ps1 diff --git a/.chezmoiignore b/.chezmoiignore index 3ad4c32..f7a856b 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -9,6 +9,7 @@ decrypt-private-key-windows.ps1 install-cli-tools-windows.ps1 install-desktop-apps-windows.ps1 install-packages-windows.ps1 +install-profile-stub-windows.ps1 {{- end }} # macOS files diff --git a/README.md b/README.md index 322e0a9..0a62885 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,8 @@ The files I think are most notable are listed below: - mise in `~/.local/bin`, and the tools in its config. On Windows, it adds `~\.local\bin` to your Path - `gh auth login`, if you aren't logged in to GitHub. git gets its GitHub credentials from gh - The desktop apps: with Homebrew on macOS, which it installs first if it's missing, and winget on Windows + - On Windows, if Documents is in OneDrive, where PowerShell then looks for its profile, a profile there that + loads the dotfiles' one - Open a new terminal to start using them, or log out and back in if it doesn't start zsh 3. Keep everything up to date diff --git a/run_onchange_after_install-profile-stub-windows.ps1 b/run_onchange_after_install-profile-stub-windows.ps1 new file mode 100644 index 0000000..971acce --- /dev/null +++ b/run_onchange_after_install-profile-stub-windows.ps1 @@ -0,0 +1,20 @@ +# PowerShell loads the profile from the Documents folder, which can be in +# OneDrive rather than ~\Documents, where chezmoi puts it. Then this writes a +# profile there that loads chezmoi's, unless that one has other commands. +# chezmoi runs this after applying files, and again whenever this script changes. +$ErrorActionPreference = 'Stop' + +$chezmoiProfile = Join-Path $HOME 'Documents\PowerShell\Microsoft.PowerShell_profile.ps1' +$profilePath = $PROFILE.CurrentUserCurrentHost +if ($profilePath -eq $chezmoiProfile) { return } + +$stub = '. "$HOME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"' +$current = if (Test-Path $profilePath -PathType Leaf) { "$(Get-Content -Raw $profilePath)".Trim() } +if ($current -eq $stub) { return } +if ($current) { + Write-Warning "$profilePath has other commands, so it's left as is. To load the dotfiles' profile, add: $stub" + return +} +Write-Host "`n# Load the dotfiles' profile from $profilePath" +New-Item -ItemType Directory -Force (Split-Path $profilePath) | Out-Null +Set-Content -Path $profilePath -Value $stub From 2d782840eec9729e8ad1402ab826839e2dc287ef Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 22:45:17 +0000 Subject: [PATCH 68/76] Revert "Load the dotfiles' PowerShell profile when Documents is in OneDrive" This reverts commit d4cdd5c. Where Documents is in OneDrive, a profile there with the one line that loads chezmoi's, added by hand, is enough. chezmoi doesn't manage that file, so it leaves it alone, and the profile loads its scripts from its own folder since 7f4d062. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chezmoiignore | 1 - README.md | 2 -- ...nge_after_install-profile-stub-windows.ps1 | 20 ------------------- 3 files changed, 23 deletions(-) delete mode 100644 run_onchange_after_install-profile-stub-windows.ps1 diff --git a/.chezmoiignore b/.chezmoiignore index f7a856b..3ad4c32 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -9,7 +9,6 @@ decrypt-private-key-windows.ps1 install-cli-tools-windows.ps1 install-desktop-apps-windows.ps1 install-packages-windows.ps1 -install-profile-stub-windows.ps1 {{- end }} # macOS files diff --git a/README.md b/README.md index 0a62885..322e0a9 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,6 @@ The files I think are most notable are listed below: - mise in `~/.local/bin`, and the tools in its config. On Windows, it adds `~\.local\bin` to your Path - `gh auth login`, if you aren't logged in to GitHub. git gets its GitHub credentials from gh - The desktop apps: with Homebrew on macOS, which it installs first if it's missing, and winget on Windows - - On Windows, if Documents is in OneDrive, where PowerShell then looks for its profile, a profile there that - loads the dotfiles' one - Open a new terminal to start using them, or log out and back in if it doesn't start zsh 3. Keep everything up to date diff --git a/run_onchange_after_install-profile-stub-windows.ps1 b/run_onchange_after_install-profile-stub-windows.ps1 deleted file mode 100644 index 971acce..0000000 --- a/run_onchange_after_install-profile-stub-windows.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -# PowerShell loads the profile from the Documents folder, which can be in -# OneDrive rather than ~\Documents, where chezmoi puts it. Then this writes a -# profile there that loads chezmoi's, unless that one has other commands. -# chezmoi runs this after applying files, and again whenever this script changes. -$ErrorActionPreference = 'Stop' - -$chezmoiProfile = Join-Path $HOME 'Documents\PowerShell\Microsoft.PowerShell_profile.ps1' -$profilePath = $PROFILE.CurrentUserCurrentHost -if ($profilePath -eq $chezmoiProfile) { return } - -$stub = '. "$HOME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"' -$current = if (Test-Path $profilePath -PathType Leaf) { "$(Get-Content -Raw $profilePath)".Trim() } -if ($current -eq $stub) { return } -if ($current) { - Write-Warning "$profilePath has other commands, so it's left as is. To load the dotfiles' profile, add: $stub" - return -} -Write-Host "`n# Load the dotfiles' profile from $profilePath" -New-Item -ItemType Directory -Force (Split-Path $profilePath) | Out-Null -Set-Content -Path $profilePath -Value $stub From 632093c39706f55d507ea6b2fc32b8c2d15f9d60 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 23:24:58 +0000 Subject: [PATCH 69/76] Keep tools' git settings out of the dotfiles Git Credential Manager saves which account to use for an Azure DevOps organization in ~/.gitconfig, with git config --global, and asks you to sign in again on every fetch and push without it. chezmoi managed that file, so each apply removed the setting, and GCM kept opening its sign-in window until you signed in again. The dotfiles' settings move to ~/.config/git/config, which git reads before ~/.gitconfig on every OS. chezmoi creates ~/.gitconfig if it's missing but doesn't manage it, and git config --global writes there when it exists, so tools' settings stay out of the dotfiles. CI checks that such a write leaves chezmoi status empty. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/lint.sh | 2 +- .github/test.ps1 | 11 +++++++++++ create_dot_gitconfig | 3 +++ dot_gitconfig.tmpl => dot_config/git/config.tmpl | 7 +++++-- run_onchange_after_install-cli-tools-unix.sh.tmpl | 4 ++-- run_onchange_after_install-cli-tools-windows.ps1.tmpl | 4 ++-- 6 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 create_dot_gitconfig rename dot_gitconfig.tmpl => dot_config/git/config.tmpl (88%) diff --git a/.github/lint.sh b/.github/lint.sh index 136f349..d089317 100755 --- a/.github/lint.sh +++ b/.github/lint.sh @@ -35,7 +35,7 @@ check() { # check OS TEMPLATE RENDERED *.ps1.tmpl) [ "$1" != windows ] || ps1 "$3" ;; *.toml.tmpl | .chezmoiexternal.toml) toml "$3" ;; *.yaml.tmpl | *.yml.tmpl) yq . "$3" >/dev/null ;; - dot_gitconfig.tmpl) git config --file "$3" --list >/dev/null ;; + dot_config/git/config.tmpl) git config --file "$3" --list >/dev/null ;; esac } diff --git a/.github/test.ps1 b/.github/test.ps1 index a3bbd18..136aae4 100644 --- a/.github/test.ps1 +++ b/.github/test.ps1 @@ -67,6 +67,17 @@ $env:Path = $sessionPath if ($output -notmatch '(?m)^password=.') { Fail "git in cmd didn't get GitHub credentials from gh: $output" } Write-Host '::endgroup::' +Write-Host "::group::Check that tools' git settings stay out of the dotfiles" +# Tools like Git Credential Manager save their settings with git config +# --global, which writes to ~/.gitconfig rather than to the dotfiles' file +git config --global credential.azrepos:org/example.username user@example.com +$saved = git config --file "$HOME\.gitconfig" credential.azrepos:org/example.username +$output = chezmoi status 2>&1 | Out-String +if ($saved -ne 'user@example.com' -or $output.Trim()) { + Fail "git config --global should write to ~/.gitconfig, which chezmoi doesn't manage. chezmoi status: $output" +} +Write-Host '::endgroup::' + Write-Host '::group::Check PowerShell' $output = Invoke-NewPowerShell 'exit' if ($LASTEXITCODE -ne 0 -or $output.Trim()) { Fail "PowerShell printed on startup: $output" } diff --git a/create_dot_gitconfig b/create_dot_gitconfig new file mode 100644 index 0000000..7a803b4 --- /dev/null +++ b/create_dot_gitconfig @@ -0,0 +1,3 @@ +# This machine's git settings. chezmoi creates this file but doesn't manage it, +# so tools that run git config --global, like Git Credential Manager, save their +# settings here. The dotfiles' settings are in ~/.config/git/config diff --git a/dot_gitconfig.tmpl b/dot_config/git/config.tmpl similarity index 88% rename from dot_gitconfig.tmpl rename to dot_config/git/config.tmpl index 862280f..82f39dc 100644 --- a/dot_gitconfig.tmpl +++ b/dot_config/git/config.tmpl @@ -1,3 +1,5 @@ +# The dotfiles' git settings. git reads ~/.gitconfig after this file, and +# git config --global writes there, so tools' settings stay out of the dotfiles [user] email = pcreighton429@gmail.com name = Patrick Creighton @@ -45,8 +47,9 @@ {{- $gh = printf "%s/AppData/Local/mise/shims/gh.exe" .chezmoi.homeDir }} {{- end }} # git gets GitHub credentials from gh, through mise's shim, which runs the gh in -# mise.lock. gh auth login leaves this file alone since gh is already the helper. -# gh auth setup-git would add the path of the gh it runs, which mise upgrade removes +# mise.lock. gh auth login leaves git's settings alone since gh is already the +# helper. gh auth setup-git would add the path of the gh it runs, which mise +# upgrade removes [credential "https://github.com"] helper = helper = !'{{ $gh }}' auth git-credential diff --git a/run_onchange_after_install-cli-tools-unix.sh.tmpl b/run_onchange_after_install-cli-tools-unix.sh.tmpl index 517293e..5a9a1ea 100644 --- a/run_onchange_after_install-cli-tools-unix.sh.tmpl +++ b/run_onchange_after_install-cli-tools-unix.sh.tmpl @@ -50,8 +50,8 @@ curl -fsSL -o _dust "https://raw.githubusercontent.com/bootandy/dust/v$("$mise" || echo "Couldn't download the dust completions" >&2 rm -f "$HOME/.zcompdump" # so that the next zsh loads the new completions -# git gets GitHub credentials from gh (see .gitconfig). Skipped without a -# terminal, as in CI +# git gets GitHub credentials from gh (see ~/.config/git/config). Skipped +# without a terminal, as in CI if [ -t 0 ] && ! gh auth status >/dev/null 2>&1; then printf "\n# Log in to GitHub\n" gh auth login || echo "gh auth login failed, run it again later" >&2 diff --git a/run_onchange_after_install-cli-tools-windows.ps1.tmpl b/run_onchange_after_install-cli-tools-windows.ps1.tmpl index f19ab72..8d3622f 100644 --- a/run_onchange_after_install-cli-tools-windows.ps1.tmpl +++ b/run_onchange_after_install-cli-tools-windows.ps1.tmpl @@ -20,8 +20,8 @@ Write-Host "`n# Install tools with mise" & $mise install --locked if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } -# git gets GitHub credentials from gh (see .gitconfig). Skipped when chezmoi's -# input isn't the terminal, as in CI +# git gets GitHub credentials from gh (see ~/.config/git/config). Skipped when +# chezmoi's input isn't the terminal, as in CI if (-not [Console]::IsInputRedirected) { & $mise exec -- gh auth status *> $null if ($LASTEXITCODE -ne 0) { From 0386e75fbdb78433708b6c74948226b0e3186acb Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 23:24:58 +0000 Subject: [PATCH 70/76] Say how to load the profile when Documents is in OneDrive PowerShell then looks for its profile in OneDrive instead of in ~\Documents, where chezmoi puts it. The README gives the command that adds a profile there which loads chezmoi's. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 322e0a9..ad9afa5 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,13 @@ The files I think are most notable are listed below: - mise in `~/.local/bin`, and the tools in its config. On Windows, it adds `~\.local\bin` to your Path - `gh auth login`, if you aren't logged in to GitHub. git gets its GitHub credentials from gh - The desktop apps: with Homebrew on macOS, which it installs first if it's missing, and winget on Windows + - On Windows, if Documents is in OneDrive, PowerShell looks for its profile there instead of in `~\Documents`, + where chezmoi puts it. Add a profile there that loads chezmoi's: + + ``` + New-Item -Force $PROFILE -Value '. "$HOME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"' + ``` + - Open a new terminal to start using them, or log out and back in if it doesn't start zsh 3. Keep everything up to date From cb4658dd1f64f2925e0c49476472cafd6eabe354 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 23:26:30 +0000 Subject: [PATCH 71/76] Keep ~/.gitconfig when it's empty chezmoi removes a file that's empty unless its source name has empty_, even one that it only creates. Removing the dotfiles' settings from an existing ~/.gitconfig, now that they're in ~/.config/git/config, can leave it empty, and the next apply would delete it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- create_dot_gitconfig => create_empty_dot_gitconfig | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename create_dot_gitconfig => create_empty_dot_gitconfig (100%) diff --git a/create_dot_gitconfig b/create_empty_dot_gitconfig similarity index 100% rename from create_dot_gitconfig rename to create_empty_dot_gitconfig From cf7e008e384eac0dd047ca31ea3af6a28945d79e Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 23:46:57 +0000 Subject: [PATCH 72/76] Keep Windows' folders on WSL's PATH whatever their case Some PCs have Windows in C:\WINDOWS, so WSL appends /mnt/c/WINDOWS and /mnt/c/WINDOWS/system32 to PATH. .zshrc only kept the folders spelled Windows, so it removed those, and cmd.exe, clip.exe and explorer.exe with them. It now matches them in any case, and CI checks both spellings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/test.sh | 8 ++++---- dot_zshrc | 10 +++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/test.sh b/.github/test.sh index eabce82..f19b78c 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -110,12 +110,12 @@ output=$(in_pty zsh -i -c exit) && status=0 || status=$? if [ "$status" -ne 0 ] || [ -n "$output" ]; then fail "zsh should start without printing anything, but exited with $status and printed: $output" fi -# On WSL, .zshrc keeps only the Windows folders it needs on PATH. It expands in -# zsh, not here: +# On WSL, .zshrc keeps only the Windows folders it needs on PATH, in any case. +# It expands in zsh, not here: # shellcheck disable=SC2016 -output=$(WSL_DISTRO_NAME=Ubuntu PATH="$PATH:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Tools:/mnt/c/Program Files/Microsoft VS Code/bin" \ +output=$(WSL_DISTRO_NAME=Ubuntu PATH="$PATH:/mnt/c/WINDOWS/system32:/mnt/c/Windows:/mnt/c/Tools:/mnt/c/Program Files/Microsoft VS Code/bin" \ in_pty zsh -i -c 'print -rl -- ${(M)path:#/mnt/*}') || true -if [ "$output" != $'/mnt/c/Windows/system32\n/mnt/c/Windows\n/mnt/c/Program Files/Microsoft VS Code/bin' ]; then +if [ "$output" != $'/mnt/c/WINDOWS/system32\n/mnt/c/Windows\n/mnt/c/Program Files/Microsoft VS Code/bin' ]; then fail "On WSL, PATH should only keep System32, Windows and VS Code from /mnt, but has: $output" fi # Prints the problems it finds. It expands in zsh, not here: diff --git a/dot_zshrc b/dot_zshrc index 3411d1d..3973cbe 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -8,10 +8,14 @@ fi # from Linux. mise and zsh look through every folder on PATH, which made new # shells take a second, each cd half a second, and typing lag. Keep only the # Windows commands used here: System32 and Windows (clip.exe, cmd.exe, -# explorer.exe) and VS Code (code). They come from what WSL appends, so -# /etc/wsl.conf must keep its default, appendWindowsPath = true +# explorer.exe), in any case since some PCs have C:\WINDOWS, and VS Code +# (code). They come from what WSL appends, so /etc/wsl.conf must keep its +# default, appendWindowsPath = true if [[ -n $WSL_DISTRO_NAME ]]; then - path=(${path:#/mnt/*} ${(M)path:#/mnt/c/[Ww]indows(|/[Ss]ystem32)} ${(M)path:#/mnt/*/Microsoft VS Code/bin}) + () { + setopt local_options extended_glob + path=(${path:#/mnt/*} ${(M)path:#(#i)/mnt/c/windows(|/system32)} ${(M)path:#/mnt/*/Microsoft VS Code/bin}) + } fi # Enable colors and change prompt: From ba8a79dd3900da82001f0365fdfc7d4c709b1634 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 23:46:57 +0000 Subject: [PATCH 73/76] Say which Macs and PCs the dotfiles support mise.lock has the tools for Apple silicon Macs and x64 Windows PCs, but not for Intel Macs or Windows on Arm, where mise install --locked fails. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ad9afa5..952c46c 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ My cross-platform, cross-shell configuration files and installation scripts managed with [chezmoi](https://www.chezmoi.io/): - Zsh on Ubuntu 22.04 or later, including in WSL 2 -- Zsh on macOS -- PowerShell 7 on Windows 11 +- Zsh on macOS (Apple silicon) +- PowerShell 7 on Windows 11 (x64) ## Highlights From 2fa2a3d75cddcb4146697bdc2fbe0cd4015798a3 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Thu, 12 Nov 2026 23:46:57 +0000 Subject: [PATCH 74/76] Say what to do when chezmoi's config template changes When the config template asks a new question, chezmoi update pulls, then fails, since the templates read the answer that isn't saved yet. chezmoi warns that the template changed, and chezmoi init asks only the new questions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 952c46c..0dd02fb 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,8 @@ The files I think are most notable are listed below: chezmoi upgrade # upgrade chezmoi ``` + - If chezmoi says that the config file template has changed, run `chezmoi init --apply`. It asks only the + questions you haven't answered yet - mise updates itself once a week. Like `mise upgrade`, it skips releases from the last 7 days - To roll back an upgrade, revert its commit in the source directory (`chezmoi cd`) and run `chezmoi apply` - Upgrade everything else with the OS's package managers: `sudo apt upgrade` on Ubuntu, `brew upgrade` and the From ab3a41188fe93c85615faa9177a37c6a0b93f75a Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Fri, 13 Nov 2026 00:01:44 +0000 Subject: [PATCH 75/76] Say why chezmoi creates ~/.gitconfig git config --global writes to ~/.gitconfig only if it exists. Without it, git writes to ~/.config/git/config, the dotfiles' file, so what Git Credential Manager saves would end up there, and the next apply would remove it. The comment in the file says so now. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- create_empty_dot_gitconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/create_empty_dot_gitconfig b/create_empty_dot_gitconfig index 7a803b4..4e967b5 100644 --- a/create_empty_dot_gitconfig +++ b/create_empty_dot_gitconfig @@ -1,3 +1,3 @@ -# This machine's git settings. chezmoi creates this file but doesn't manage it, -# so tools that run git config --global, like Git Credential Manager, save their -# settings here. The dotfiles' settings are in ~/.config/git/config +# This machine's git settings, which tools like Git Credential Manager save with +# git config --global. chezmoi creates this file but doesn't manage it: without +# it, git config --global writes to the dotfiles' ~/.config/git/config instead From cc2c705cf09179c137e9502e3eba3e2c4507ec24 Mon Sep 17 00:00:00 2001 From: Patrick Creighton Date: Fri, 13 Nov 2026 00:01:44 +0000 Subject: [PATCH 76/76] Don't present software.md as only for Windows Discord, Plex, Signal and TeamViewer also run on macOS and Linux. software.md lists them apart from the software that only runs on Windows, with their Homebrew casks, and says how to install it on each OS. The READMEs no longer say that the list is for Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- README.md | 2 +- reference_dotfiles/README.md | 2 +- reference_dotfiles/software.md | 22 +++++++++++++++------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0dd02fb..d55f7ba 100644 --- a/README.md +++ b/README.md @@ -92,5 +92,5 @@ The files I think are most notable are listed below: - Upgrade everything else with the OS's package managers: `sudo apt upgrade` on Ubuntu, `brew upgrade` and the App Store on macOS, and winget or UniGetUI on Windows -4. Optional, on Windows: install the other software I've used, listed in +4. Optional: install the other software I've used, listed in [`reference_dotfiles/software.md`](./reference_dotfiles/software.md) diff --git a/reference_dotfiles/README.md b/reference_dotfiles/README.md index 2d41943..14a07b3 100644 --- a/reference_dotfiles/README.md +++ b/reference_dotfiles/README.md @@ -4,4 +4,4 @@ These dotfiles are not managed with Chezmoi and may not be exactly what I use, b [`vscode`](./vscode) has my settings for Visual Studio Code, which is one of the desktop apps. -[`software.md`](./software.md) lists the other software I've used on Windows. +[`software.md`](./software.md) lists the other software I've used. diff --git a/reference_dotfiles/software.md b/reference_dotfiles/software.md index fe3b2e9..ef8037c 100644 --- a/reference_dotfiles/software.md +++ b/reference_dotfiles/software.md @@ -1,17 +1,25 @@ # Software -Other software I've used on Windows. Unlike the CLI tools in [mise's config](../dot_config/mise/config.toml) and the -[desktop apps](../.chezmoidata/desktop-apps.toml), the dotfiles don't install it. Search for it in UniGetUI, one of the -desktop apps, or install it with `winget install --exact --id `. +Other software I've used. Unlike the CLI tools in [mise's config](../dot_config/mise/config.toml) and the +[desktop apps](../.chezmoidata/desktop-apps.toml), the dotfiles don't install it. On Windows, search for it in +UniGetUI, one of the desktop apps, or install it with `winget install --exact --id `. On macOS, install it with +`brew install --cask `, and on Linux, from its website. + +## Windows, macOS and Linux + +| Software | What it does | winget ID | Homebrew cask | +| --- | --- | --- | --- | +| [Discord](https://discord.com) | Chat | `Discord.Discord` | `discord` | +| [Plex](https://www.plex.tv) | Plays media from Plex servers | `Plex.Plex` | `plex` | +| [Signal](https://signal.org) | Encrypted messaging | `OpenWhisperSystems.Signal` | `signal` | +| [TeamViewer](https://www.teamviewer.com) | Remote access and support | `TeamViewer.TeamViewer` | `teamviewer` | + +## Windows only | Software | What it does | winget ID | | --- | --- | --- | | [Carnac](https://github.com/Code52/carnac) | Shows the keys you press, for presentations and screen recordings | `code52.Carnac` | -| [Discord](https://discord.com) | Chat | `Discord.Discord` | | [NanaZip](https://github.com/M2Team/NanaZip) | Opens and creates archives. A 7-Zip fork that's in the Windows 11 context menu | `M2Team.NanaZip` | -| [Plex](https://www.plex.tv) | Plays media from Plex servers | `Plex.Plex` | | [Rufus](https://rufus.ie) | Creates bootable USB drives | `Rufus.Rufus` | -| [Signal](https://signal.org) | Encrypted messaging | `OpenWhisperSystems.Signal` | -| [TeamViewer](https://www.teamviewer.com) | Remote access and support | `TeamViewer.TeamViewer` | | [Windows Terminal](https://github.com/microsoft/terminal) | Terminal, preinstalled on Windows 11. My settings are in [`windows_terminal/`](./windows_terminal/) | `Microsoft.WindowsTerminal` | | [WSL](https://learn.microsoft.com/windows/wsl/) | Runs Linux. `wsl --install` installs it with Ubuntu, which the dotfiles also support. My config is in [`wsl/`](./wsl/) | `Microsoft.WSL` |