diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4712c33 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,42 @@ +# Matches what the repo already does, and what ./test.sh enforces for shell +# (shfmt -i 4, default case indentation). +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space + +[*.{sh,bash}] +indent_size = 4 + +# chezmoi source names carry attribute prefixes rather than extensions, so the +# shell scripts installed to ~/.local/bin match on the prefix instead. +[executable_*] +indent_size = 4 + +[*.{ps1,psm1}] +indent_size = 4 + +[*.{json,jsonc,toml,yaml,yml,md}] +indent_size = 2 + +[*.fish] +indent_size = 4 + +[*.lua] +indent_size = 2 + +[*.qml] +indent_size = 2 + +# Go templates wrap whatever they render; leave their indentation alone. +[*.tmpl] +trim_trailing_whitespace = false + +# Vendored upstream, kept byte-identical for easy diffing against new releases. +[root/private_dot_config/fish/functions/fundle.fish] +trim_trailing_whitespace = false +insert_final_newline = false diff --git a/.vscode/extensions.json b/.vscode/extensions.json index a5713c5..7cafab0 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,6 +4,7 @@ "timonwong.shellcheck", "foxundermoon.shell-format", "mads-hartmann.bash-ide-vscode", - "bmalehorn.vscode-fish" + "bmalehorn.vscode-fish", + "theqtcompany.qt-qml" ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 2feb09e..a37ae47 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,5 +23,7 @@ "editor.codeActionsOnSave": { "source.fixAll.markdownlint": "explicit" } - } + }, + "qt-core.showWelcomePageOnActivation": false, + "qt-qml.qmlls.enabled": false } diff --git a/AGENTS.md b/AGENTS.md index eeac50b..6701f76 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,9 +19,11 @@ This is a personal dotfiles repository managed with [chezmoi](https://www.chezmo Shell-agnostic commands applied by chezmoi to `~/.local/bin` (source: `root/dot_local/bin/`), so one bash implementation serves fish, bash, and zsh. Not applied on Windows (ignored via `.chezmoiignore.tmpl`): -- `update` - Updates everything: system packages (apt or pacman on Linux, brew on macOS), mise itself, chezmoi, then `chezmoi update` (pull latest dotfiles + apply), then `mise upgrade` for the freshly pulled tool pins. The mise step is skipped over when mise is package-managed — the system-package step above already covered it -- `clean` - Prunes what `update` leaves behind: orphaned system packages and caches (`apt-get autoremove --purge`/`clean`, `pacman -Rns` of `-Qtdq` orphans + `-Sc`, `brew autoremove`/`cleanup --prune=all`), mise tool versions no longer referenced by any config (`mise prune`), and mise's download cache -- `set-work-email ` - Writes `~/work.email` and re-runs `chezmoi init --apply` so the work identity takes effect (Windows gets a PowerShell function equivalent in the profile) +- `update` - Updates everything: system packages (apt or pacman on Linux, brew on macOS), mise itself, chezmoi, then `chezmoi update` (pull latest dotfiles + apply), then `mise upgrade` for the freshly pulled tool pins. On Omarchy the system-package step is `omarchy update -y` and it runs **last** instead of first: that command ends in a `gum confirm` reboot prompt which `-y` does not suppress (it exports `OMARCHY_UPDATE_UNATTENDED`, which nothing reads), so going first meant a kernel upgrade could reboot the machine before the dotfiles were ever pulled. The mise step is skipped over when mise is package-managed — the system-package step above already covered it. `chezmoi upgrade` is likewise skipped when the binary is not writable by the user, which is the real precondition for an in-place self-upgrade and covers every packager (Omarchy/Arch `extra/`, Homebrew) at once +- `clean` - Prunes what `update` leaves behind: orphaned system packages and caches (`apt-get autoremove --purge`/`clean`, `pacman -Rns` of `-Qtdq` orphans + `-Sc`, `brew autoremove`/`cleanup --prune=all`), mise tool versions no longer referenced by any config (`mise prune`), and mise's download cache. On Omarchy both package steps differ and the difference is destructive if ignored — see the Omarchy notes below +- `set-work-email ` - Writes `~/work.email` and re-runs `chezmoi init --apply` so the work identity takes effect + +Windows gets all three as PowerShell functions in `pwsh/rc.d/60-commands.ps1`, because `.chezmoiignore` drops `.local/bin` there (those are bash scripts). Without them a Windows machine has no way to update itself. ## Architecture @@ -42,6 +44,33 @@ The dotfiles adapt based on environment variables: - `DOTFILES_WORK_EMAIL` - Work email fallback when `~/work.email` is absent (the file wins; Codespaces user secrets surface as env vars) - `DOTFILES_WORK_EMAIL_FILE` - Relocates the work-email file from `~/work.email` (used by render.sh; unset in normal use) +Two data flags are derived from the machine itself rather than from env vars: + +- **`isOmarchy`** - true when `/etc/os-release` has `ID=omarchy`. [Omarchy](https://omarchy.org) is an opinionated Arch/Hyprland distribution that owns a large part of `$HOME`. Because the check is on the distro ID, it is false by construction in WSL (`ID=arch`/`ubuntu`), dev containers, macOS and Windows, so no Omarchy-only file can leak onto another host. Preview an Omarchy render from anywhere with `./render.sh --data '{"isOmarchy":true}'