@sebastienrousseau/dotfiles 0.2.520 → 0.2.521
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/LICENSE-APACHE +190 -0
- package/LICENSE-MIT +21 -0
- package/README.md +43 -37
- package/install.sh +76 -10
- package/package.json +7 -7
- package/tools/README.md +49 -0
- package/tools/ci/install-chezmoi-verified.sh +68 -0
- package/docs/.vitepress/reports/localization-readability-audit.md +0 -73
- package/docs/AI.md +0 -179
- package/docs/ARCHITECTURE.md +0 -117
- package/docs/CNAME +0 -1
- package/docs/CONFIG_STRATEGY.md +0 -124
- package/docs/COPYRIGHT +0 -7
- package/docs/ECOSYSTEM.md +0 -220
- package/docs/GOLD-STANDARD-AUDIT.md +0 -352
- package/docs/GOVERNANCE.md +0 -98
- package/docs/MAINTAINERS.md +0 -41
- package/docs/MINIMUM-TOOLCHAIN.md +0 -100
- package/docs/NAMING_CONVENTIONS.md +0 -102
- package/docs/OPENCODE.md +0 -127
- package/docs/README.md +0 -84
- package/docs/STRUCTURE.md +0 -102
- package/docs/adr/ADR-001-ci-cd-pipeline.md +0 -118
- package/docs/adr/ADR-002-shell-performance.md +0 -130
- package/docs/adr/ADR-003-security-first.md +0 -158
- package/docs/adr/ADR-004-cli-architecture.md +0 -171
- package/docs/adr/ADR-005-chezmoi-choice.md +0 -99
- package/docs/adr/ADR-006-shell-selection.md +0 -124
- package/docs/adr/ADR-007-multi-shell-parity.md +0 -62
- package/docs/adr/ADR-008-alias-system-architecture.md +0 -95
- package/docs/adr/ADR-009-wallpaper-driven-theming.md +0 -131
- package/docs/adr/ADR-010-starship-transient-prompt.md +0 -144
- package/docs/adr/ADR-011-nushell-tier3-keep.md +0 -144
- package/docs/adr/ADR-012-ai-fleet-local-proxy.md +0 -79
- package/docs/adr/README.md +0 -40
- package/docs/architecture/AI_COST_OPTIMIZATION.md +0 -144
- package/docs/architecture/ARCHITECTURE.md +0 -20
- package/docs/architecture/INTEROP.md +0 -44
- package/docs/architecture/REPO_LAYOUT.md +0 -241
- package/docs/architecture/WALKTHROUGH.md +0 -86
- package/docs/architecture/fleet-deployment.md +0 -77
- package/docs/archive/EUXIS_2026_REVIEW.md +0 -127
- package/docs/archive/LEGACY_ROADMAP.md +0 -6
- package/docs/archive/MILESTONE_v0.2.493.md +0 -47
- package/docs/archive/PLAN.md +0 -199
- package/docs/archive/REPO_AUDIT.md +0 -31
- package/docs/articles/.pages +0 -6
- package/docs/articles/2026-07-05-custom-mkdocs-material-dark-theme.md +0 -216
- package/docs/articles/2026-07-05-fish-startup-abbr.md +0 -153
- package/docs/articles/2026-07-05-master-to-main-rename-runbook.md +0 -128
- package/docs/articles/index.md +0 -36
- package/docs/guides/INSTALL.md +0 -144
- package/docs/guides/MACOS_ICLOUD_SYMLINKS.md +0 -121
- package/docs/guides/NEOVIM_IDE_GUIDE.md +0 -61
- package/docs/guides/THEMING.md +0 -230
- package/docs/guides/TROUBLESHOOTING.md +0 -176
- package/docs/guides/WSL2_NIX_TROUBLESHOOTING.md +0 -792
- package/docs/index.md +0 -132
- package/docs/interop/A2A.md +0 -39
- package/docs/interop/POWERSHELL.md +0 -102
- package/docs/manual/00-introduction.md +0 -89
- package/docs/manual/01-concepts/01-architecture.md +0 -138
- package/docs/manual/01-concepts/02-trust-model.md +0 -183
- package/docs/manual/01-concepts/03-theme-engine.md +0 -186
- package/docs/manual/01-concepts/04-fleet.md +0 -148
- package/docs/manual/01-concepts/05-self-healing.md +0 -204
- package/docs/manual/02-tutorials/01-first-install.md +0 -197
- package/docs/manual/02-tutorials/02-add-wallpaper.md +0 -216
- package/docs/manual/02-tutorials/03-create-profile.md +0 -244
- package/docs/manual/02-tutorials/04-encrypt-secret.md +0 -281
- package/docs/manual/02-tutorials/05-deploy-fleet.md +0 -283
- package/docs/manual/03-reference/01-dot-cli.md +0 -475
- package/docs/manual/03-reference/02-config-files.md +0 -265
- package/docs/manual/03-reference/03-environment.md +0 -124
- package/docs/manual/03-reference/04-templates.md +0 -190
- package/docs/manual/03-reference/05-feature-flags.md +0 -187
- package/docs/manual/04-cookbook/01-recipes.md +0 -285
- package/docs/manual/04-cookbook/02-troubleshooting.md +0 -351
- package/docs/manual/04-cookbook/03-faq.md +0 -175
- package/docs/manual/05-appendices/A-platform-matrix.md +0 -101
- package/docs/manual/05-appendices/B-security-checklist.md +0 -85
- package/docs/manual/05-appendices/C-glossary.md +0 -40
- package/docs/manual/05-appendices/D-bibliography.md +0 -58
- package/docs/manual/05-appendices/E-license.md +0 -38
- package/docs/manual/_toc.yml +0 -58
- package/docs/manual/command-index.md +0 -175
- package/docs/manual/concept-index.md +0 -170
- package/docs/manual/index.md +0 -66
- package/docs/migration/README.md +0 -81
- package/docs/migration/from-bare-git-repo.md +0 -156
- package/docs/migration/from-gnu-stow.md +0 -165
- package/docs/migration/from-plain-chezmoi.md +0 -148
- package/docs/migration/from-yadm.md +0 -187
- package/docs/operations/ARCHITECTURE_ROADMAP.md +0 -7
- package/docs/operations/ATTESTATION.md +0 -44
- package/docs/operations/CI_CADENCE.md +0 -107
- package/docs/operations/CI_COMPOSITES.md +0 -156
- package/docs/operations/COMPLETIONS.md +0 -123
- package/docs/operations/COVERAGE.md +0 -204
- package/docs/operations/DRIFT.md +0 -107
- package/docs/operations/HARD_AUDIT_2026.md +0 -631
- package/docs/operations/MAINTENANCE.md +0 -63
- package/docs/operations/MANIFEST.md +0 -127
- package/docs/operations/MIGRATION.md +0 -109
- package/docs/operations/OPERATIONS.md +0 -188
- package/docs/operations/PERFORMANCE.md +0 -133
- package/docs/operations/PERFORMANCE_BUDGETS.md +0 -196
- package/docs/operations/REGISTRY.md +0 -90
- package/docs/operations/RELEASE_PIPELINE.md +0 -128
- package/docs/operations/RELIABILITY.md +0 -122
- package/docs/operations/RFC_v0_2_503_reorganization.md +0 -280
- package/docs/operations/ROADMAP.md +0 -10
- package/docs/operations/ROADMAP_2026.md +0 -7
- package/docs/operations/ROADMAP_V0_2_503.md +0 -10
- package/docs/operations/TESTING.md +0 -216
- package/docs/operations/TRACEABILITY.md +0 -44
- package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +0 -65
- package/docs/operations/VERSION_SYNC.md +0 -393
- package/docs/packaging.md +0 -222
- package/docs/reference/ALIASES.md +0 -131
- package/docs/reference/ALIASES_CHEATSHEET.md +0 -32
- package/docs/reference/ALIASES_DEPRECATIONS.md +0 -13
- package/docs/reference/FEATURE-MATRIX.md +0 -646
- package/docs/reference/FEATURES.md +0 -66
- package/docs/reference/FONTS.md +0 -112
- package/docs/reference/POWERSHELL_PARITY.md +0 -82
- package/docs/reference/PROFILES.md +0 -69
- package/docs/reference/SCREENSHOTS.md +0 -121
- package/docs/reference/SCRIPTS.md +0 -71
- package/docs/reference/SUPPORT_MATRIX.md +0 -80
- package/docs/reference/THEMES.md +0 -117
- package/docs/reference/TOOLS.md +0 -110
- package/docs/reference/UTILS.md +0 -243
- package/docs/registry.json +0 -6
- package/docs/schema/dot-env-v1.json +0 -110
- package/docs/schema/dot-registry-v1.json +0 -33
- package/docs/security/AI_ACT_COMPLIANCE.md +0 -94
- package/docs/security/AUDIT_BYPASS.md +0 -103
- package/docs/security/AUTOMATION_SECRETS.md +0 -26
- package/docs/security/CI_EGRESS_ALLOWLIST.md +0 -127
- package/docs/security/CI_PINNING.md +0 -129
- package/docs/security/COMMIT_SIGNING.md +0 -138
- package/docs/security/COMPLIANCE.md +0 -458
- package/docs/security/DEPS_DEV_EXCEPTIONS.md +0 -86
- package/docs/security/DISCLOSURE.md +0 -130
- package/docs/security/ENCRYPTION.md +0 -57
- package/docs/security/FMEA.md +0 -159
- package/docs/security/FUZZING.md +0 -209
- package/docs/security/HISTORY_FILTERING.md +0 -132
- package/docs/security/INCIDENT_RESPONSE.md +0 -579
- package/docs/security/INSTALL_VERIFICATION.md +0 -122
- package/docs/security/KEYS.md +0 -49
- package/docs/security/KEY_ROTATION.md +0 -303
- package/docs/security/MCP_POLICY.md +0 -78
- package/docs/security/POLICY_RELEASES.md +0 -37
- package/docs/security/README.md +0 -28
- package/docs/security/SCORECARD.md +0 -195
- package/docs/security/SECRETS.md +0 -158
- package/docs/security/SECURITY.md +0 -45
- package/docs/security/SECURITY_CHECKLIST.md +0 -55
- package/docs/security/SHELL_EXEMPTIONS.md +0 -145
- package/docs/security/SOUP_REGISTER.md +0 -36
- package/docs/security/THREAT_MODEL.md +0 -130
- package/docs/security/VERIFICATION_VALIDATION.md +0 -228
- package/docs/security/VERIFY_RELEASE.md +0 -201
- package/docs/security/security-pubkey.asc +0 -15
- package/docs/stylesheets/extra.css +0 -444
- package/docs/themes/README.md +0 -10
- package/docs/themes/VISUAL_INTEGRITY_REPORT.md +0 -30
- package/docs/themes/hero-shot.svg +0 -78
- package/scripts/README.md +0 -123
- package/scripts/ci/check-copyright-headers.sh +0 -8
- package/scripts/ci/check-shell-preamble.sh +0 -8
- package/scripts/ci/guard-gitleaks-checkout.sh +0 -8
- package/scripts/demo/record.sh +0 -43
- package/scripts/diagnostics/a2a-conformance.sh +0 -163
- package/scripts/diagnostics/alias-governance.sh +0 -165
- package/scripts/diagnostics/aliases-cheatsheet.sh +0 -74
- package/scripts/diagnostics/aliases-manifest.sh +0 -77
- package/scripts/diagnostics/attest-verify.sh +0 -147
- package/scripts/diagnostics/benchmark.sh +0 -408
- package/scripts/diagnostics/conflicts.sh +0 -73
- package/scripts/diagnostics/doctor-unified.sh +0 -43
- package/scripts/diagnostics/doctor.sh +0 -797
- package/scripts/diagnostics/drift-dashboard.sh +0 -203
- package/scripts/diagnostics/health.sh +0 -656
- package/scripts/diagnostics/history-analysis.sh +0 -86
- package/scripts/diagnostics/mcp-doctor.sh +0 -582
- package/scripts/diagnostics/perf.sh +0 -453
- package/scripts/diagnostics/scorecard.sh +0 -120
- package/scripts/diagnostics/secret-governance.sh +0 -65
- package/scripts/diagnostics/security-score.sh +0 -467
- package/scripts/diagnostics/smoke-test.sh +0 -88
- package/scripts/diagnostics/snapshot.sh +0 -90
- package/scripts/diagnostics/verify.sh +0 -108
- package/scripts/diagnostics/verify_state.sh +0 -73
- package/scripts/diagnostics/version-locks.sh +0 -94
- package/scripts/diagnostics/workstation-attestation.sh +0 -212
- package/scripts/dot/commands/agent.sh +0 -535
- package/scripts/dot/commands/agents.sh +0 -352
- package/scripts/dot/commands/ai.sh +0 -600
- package/scripts/dot/commands/aliases.sh +0 -277
- package/scripts/dot/commands/appearance.sh +0 -110
- package/scripts/dot/commands/completion.sh +0 -171
- package/scripts/dot/commands/core.sh +0 -217
- package/scripts/dot/commands/diagnostics.sh +0 -265
- package/scripts/dot/commands/env-emit.sh +0 -203
- package/scripts/dot/commands/fleet.sh +0 -711
- package/scripts/dot/commands/init.sh +0 -185
- package/scripts/dot/commands/lint.sh +0 -208
- package/scripts/dot/commands/manual.sh +0 -169
- package/scripts/dot/commands/meta.sh +0 -438
- package/scripts/dot/commands/patterns.sh +0 -55
- package/scripts/dot/commands/registry.sh +0 -455
- package/scripts/dot/commands/restore.sh +0 -232
- package/scripts/dot/commands/secrets.sh +0 -296
- package/scripts/dot/commands/security.sh +0 -102
- package/scripts/dot/commands/tools.sh +0 -570
- package/scripts/dot/data/alias-deprecations.tsv +0 -2
- package/scripts/dot/powershell/Dot.psm1 +0 -319
- package/scripts/fonts/install-nerd-fonts.sh +0 -75
- package/scripts/fonts/patch-fonts.sh +0 -36
- package/scripts/git-hooks/install.sh +0 -12
- package/scripts/git-hooks/pre-commit +0 -12
- package/scripts/git-hooks/pre-commit-audit.sh +0 -146
- package/scripts/git-hooks/pre-push +0 -105
- package/scripts/git-hooks/prepare-commit-msg +0 -29
- package/scripts/lib/secrets_provider.sh +0 -200
- package/scripts/nvim/headless-upgrade.lua +0 -81
- package/scripts/ops/ai-setup.sh +0 -71
- package/scripts/ops/bundle.sh +0 -104
- package/scripts/ops/chaos.sh +0 -50
- package/scripts/ops/chezmoi-apply.sh +0 -333
- package/scripts/ops/chezmoi-diff.sh +0 -16
- package/scripts/ops/chezmoi-remove.sh +0 -46
- package/scripts/ops/chezmoi-update.sh +0 -67
- package/scripts/ops/heal-chezmoi.sh +0 -87
- package/scripts/ops/heal-system.sh +0 -129
- package/scripts/ops/heal-tools.sh +0 -297
- package/scripts/ops/heal.sh +0 -223
- package/scripts/ops/post-apply-repair.sh +0 -107
- package/scripts/ops/prewarm.sh +0 -128
- package/scripts/ops/release.sh +0 -262
- package/scripts/ops/rollback.sh +0 -613
- package/scripts/ops/setup.sh +0 -138
- package/scripts/ops/teleport.sh +0 -34
- package/scripts/qa/check-feature-matrix.sh +0 -296
- package/scripts/qa/check-version-consistency.sh +0 -12
- package/scripts/qa/coverage-baseline.sh +0 -61
- package/scripts/qa/docs-coverage.sh +0 -118
- package/scripts/qa/examples-coverage.sh +0 -94
- package/scripts/qa/powershell-contract.ps1 +0 -95
- package/scripts/qa/reliability-audit.sh +0 -139
- package/scripts/qa/scorecard-snapshot.sh +0 -128
- package/scripts/qa/traceability-coverage.sh +0 -124
- package/scripts/qa/validate-examples.sh +0 -90
- package/scripts/qa/wsl-contract.sh +0 -12
- package/scripts/secrets/age-init.sh +0 -82
- package/scripts/secrets/create-secrets-file.sh +0 -46
- package/scripts/secrets/encrypt-ssh-key.sh +0 -44
- package/scripts/security/backup.sh +0 -58
- package/scripts/security/check-disclosure-key-expiry.sh +0 -111
- package/scripts/security/dns-doh.sh +0 -52
- package/scripts/security/encryption-check.sh +0 -55
- package/scripts/security/enforce-policies.sh +0 -552
- package/scripts/security/firewall.sh +0 -91
- package/scripts/security/lock-configs.sh +0 -67
- package/scripts/security/lock-screen.sh +0 -56
- package/scripts/security/manage-secrets.sh +0 -429
- package/scripts/security/ssh-cert.sh +0 -204
- package/scripts/security/telemetry-kill.sh +0 -51
- package/scripts/security/usb-safety.sh +0 -52
- package/scripts/theme/apply-gnome-theme.sh +0 -333
- package/scripts/theme/extract-heic-frames.sh +0 -115
- package/scripts/theme/extract-theme.py +0 -1020
- package/scripts/theme/install-boot-logo.sh +0 -63
- package/scripts/theme/install-catppuccin-themes.sh +0 -371
- package/scripts/theme/install-cursors.sh +0 -26
- package/scripts/theme/install-file-icons.sh +0 -27
- package/scripts/theme/install-grub-theme.sh +0 -62
- package/scripts/theme/install-lock-icon.sh +0 -31
- package/scripts/theme/merge-wallpaper.sh +0 -146
- package/scripts/theme/rebuild-themes.sh +0 -603
- package/scripts/theme/switch.sh +0 -476
- package/scripts/theme/wallpaper-rotate.sh +0 -137
- package/scripts/theme/wallpaper-sync.sh +0 -690
- package/scripts/tools/cmatrix.sh +0 -22
- package/scripts/tools/detect-collisions.py +0 -103
- package/scripts/tools/emoji-picker.sh +0 -49
- package/scripts/tools/figlet-banner.sh +0 -19
- package/scripts/tools/log-rotate.sh +0 -31
- package/scripts/tools/lolcat-wrap.sh +0 -20
- package/scripts/tools/pipes.sh +0 -49
- package/scripts/tuning/linux.sh +0 -186
- package/scripts/tuning/macos.sh +0 -56
- package/scripts/uninstall.sh +0 -86
- package/scripts/verify-release-versions +0 -156
- package/scripts/version-sync.sh +0 -714
- package/templates/chezmoi-data/geekom-a9.toml.example +0 -21
- package/templates/chezmoi-data/mac-m1.toml.example +0 -16
- package/templates/chezmoi-data/mac-t2-linux.toml.example +0 -21
- package/templates/chezmoi-data/surface-pro-7p.toml.example +0 -21
- package/templates/projects/go/.github/workflows/ci.yml +0 -31
- package/templates/projects/go/README.md +0 -7
- package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +0 -8
- package/templates/projects/go/go.mod +0 -3
- package/templates/projects/go/go.sum +0 -0
- package/templates/projects/molecule/README.md +0 -7
- package/templates/projects/molecule/converge.yml +0 -7
- package/templates/projects/molecule/molecule.yml +0 -16
- package/templates/projects/node/.github/workflows/ci.yml +0 -30
- package/templates/projects/node/README.md +0 -7
- package/templates/projects/node/package-lock.json +0 -12
- package/templates/projects/node/package.json +0 -10
- package/templates/projects/node/src/index.js +0 -3
- package/templates/projects/packer/README.md +0 -15
- package/templates/projects/packer/main.pkr.hcl +0 -15
- package/templates/projects/python/.github/workflows/ci.yml +0 -34
- package/templates/projects/python/README.md +0 -7
- package/templates/projects/python/pyproject.toml +0 -25
- package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +0 -2
- package/templates/projects/python/tests/test_basic.py +0 -3
package/scripts/tools/cmatrix.sh
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
3
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
if ! command -v cmatrix >/dev/null; then
|
|
7
|
-
echo "cmatrix not installed. Install it via brew/apt." >&2
|
|
8
|
-
exit 1
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
color="${DOTFILES_CMATRIX_COLOR:-green}"
|
|
12
|
-
opts=("-b" "-C" "$color")
|
|
13
|
-
|
|
14
|
-
if [[ "${DOTFILES_CMATRIX_RAINBOW:-0}" = "1" ]]; then
|
|
15
|
-
opts+=("-r")
|
|
16
|
-
fi
|
|
17
|
-
|
|
18
|
-
if [[ "${DOTFILES_CMATRIX_ASYNC:-0}" = "1" ]]; then
|
|
19
|
-
opts+=("-a")
|
|
20
|
-
fi
|
|
21
|
-
|
|
22
|
-
exec cmatrix "${opts[@]}" "$@"
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# MIT License
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
4
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
5
|
-
# See LICENSE file for details.
|
|
6
|
-
|
|
7
|
-
import os
|
|
8
|
-
import re
|
|
9
|
-
import sys
|
|
10
|
-
|
|
11
|
-
# Post-Phase-4b (v0.2.503): chezmoi source is under the subdir
|
|
12
|
-
# named in .chezmoiroot (typically "defaults/"). Prefer the
|
|
13
|
-
# descended path; fall back to the old top-level layout for
|
|
14
|
-
# backwards compatibility.
|
|
15
|
-
_DOTFILES_ROOT = os.path.expanduser("~/.dotfiles")
|
|
16
|
-
_CHEZMOIROOT_FILE = os.path.join(_DOTFILES_ROOT, ".chezmoiroot")
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def _resolve_chezmoi_root() -> str:
|
|
20
|
-
if os.path.isfile(_CHEZMOIROOT_FILE):
|
|
21
|
-
with open(_CHEZMOIROOT_FILE, "r", encoding="utf-8") as _f:
|
|
22
|
-
sub = _f.read().strip()
|
|
23
|
-
cand = os.path.join(_DOTFILES_ROOT, sub)
|
|
24
|
-
if os.path.isdir(cand):
|
|
25
|
-
return cand
|
|
26
|
-
return _DOTFILES_ROOT
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
BASE_DIR = os.path.join(_resolve_chezmoi_root(), ".chezmoitemplates")
|
|
30
|
-
ALIASES_DIR = os.path.join(BASE_DIR, "aliases")
|
|
31
|
-
FUNCTIONS_DIR = os.path.join(BASE_DIR, "functions")
|
|
32
|
-
|
|
33
|
-
definitions = {}
|
|
34
|
-
collisions = []
|
|
35
|
-
|
|
36
|
-
def scan_file(filepath, kind):
|
|
37
|
-
with open(filepath, 'r', encoding='utf-8', errors='ignore') as f:
|
|
38
|
-
content = f.read()
|
|
39
|
-
|
|
40
|
-
# Regex for aliases: alias name='...' or alias name="..."
|
|
41
|
-
# We focus on the name.
|
|
42
|
-
if kind == "alias":
|
|
43
|
-
# simple regex, might miss multi-line or complex cases but good enough for 99%
|
|
44
|
-
matches = re.findall(r"^\s*alias\s+([a-zA-Z0-9_-]+)=['\"]", content, re.MULTILINE)
|
|
45
|
-
for name in matches:
|
|
46
|
-
record_definition(name, "alias", filepath)
|
|
47
|
-
|
|
48
|
-
# Regex for functions: name() { or function name {
|
|
49
|
-
if kind == "function":
|
|
50
|
-
matches = re.findall(r"^([a-zA-Z0-9_-]+)\s*\(\)\s*\{", content, re.MULTILINE)
|
|
51
|
-
for name in matches:
|
|
52
|
-
record_definition(name, "function", filepath)
|
|
53
|
-
|
|
54
|
-
matches_kwd = re.findall(r"^function\s+([a-zA-Z0-9_-]+)", content, re.MULTILINE)
|
|
55
|
-
for name in matches_kwd:
|
|
56
|
-
record_definition(name, "function", filepath)
|
|
57
|
-
|
|
58
|
-
def record_definition(name, kind, filepath):
|
|
59
|
-
rel_path = os.path.relpath(filepath, BASE_DIR)
|
|
60
|
-
|
|
61
|
-
if name in definitions:
|
|
62
|
-
prev_def = definitions[name]
|
|
63
|
-
# Ignore if it's the exact same file (unlikely unless file parsed twice)
|
|
64
|
-
if prev_def['filepath'] != rel_path:
|
|
65
|
-
collisions.append({
|
|
66
|
-
"name": name,
|
|
67
|
-
"kind": kind,
|
|
68
|
-
"conflict_with_kind": prev_def['kind'],
|
|
69
|
-
"file1": prev_def['filepath'],
|
|
70
|
-
"file2": rel_path
|
|
71
|
-
})
|
|
72
|
-
else:
|
|
73
|
-
definitions[name] = {
|
|
74
|
-
"kind": kind,
|
|
75
|
-
"filepath": rel_path
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
def main():
|
|
79
|
-
print(f"Scanning for collisions within {BASE_DIR}...")
|
|
80
|
-
|
|
81
|
-
# Scan Aliases
|
|
82
|
-
for root, _, files in os.walk(ALIASES_DIR):
|
|
83
|
-
for file in files:
|
|
84
|
-
if file.endswith(".sh"):
|
|
85
|
-
scan_file(os.path.join(root, file), "alias")
|
|
86
|
-
|
|
87
|
-
# Scan Functions
|
|
88
|
-
for root, _, files in os.walk(FUNCTIONS_DIR):
|
|
89
|
-
for file in files:
|
|
90
|
-
if file.endswith(".sh"):
|
|
91
|
-
scan_file(os.path.join(root, file), "function")
|
|
92
|
-
|
|
93
|
-
if collisions:
|
|
94
|
-
print(f"\n❌ Found {len(collisions)} collisions/duplicates:")
|
|
95
|
-
for c in collisions:
|
|
96
|
-
print(f" - '{c['name']}' ({c['kind']}) in {c['file2']} conflicts with ({c['conflict_with_kind']}) in {c['file1']}")
|
|
97
|
-
sys.exit(1)
|
|
98
|
-
else:
|
|
99
|
-
print("\n✅ No collisions found between aliases and functions.")
|
|
100
|
-
sys.exit(0)
|
|
101
|
-
|
|
102
|
-
if __name__ == "__main__":
|
|
103
|
-
main()
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
3
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
EMOJI_FILE="${EMOJI_FILE:-$HOME/.config/emoji/emoji.txt}"
|
|
7
|
-
|
|
8
|
-
if [[ ! -f "$EMOJI_FILE" ]]; then
|
|
9
|
-
echo "Emoji list not found: $EMOJI_FILE" >&2
|
|
10
|
-
exit 1
|
|
11
|
-
fi
|
|
12
|
-
|
|
13
|
-
pick_with_fzf() {
|
|
14
|
-
fzf --prompt="emoji> " --height=40% --layout=reverse <"$EMOJI_FILE"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
pick_with_select() {
|
|
18
|
-
local choice
|
|
19
|
-
local entries
|
|
20
|
-
IFS=$'\n' read -r -d '' -a entries < <(cat "$EMOJI_FILE" && printf '\0')
|
|
21
|
-
select choice in "${entries[@]}"; do
|
|
22
|
-
echo "$choice"
|
|
23
|
-
break
|
|
24
|
-
done
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
selection=""
|
|
28
|
-
if command -v fzf >/dev/null; then
|
|
29
|
-
selection=$(pick_with_fzf || true)
|
|
30
|
-
else
|
|
31
|
-
selection=$(pick_with_select || true)
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
emoji=$(printf '%s' "$selection" | awk '{print $1}')
|
|
35
|
-
if [[ -z "$emoji" ]]; then
|
|
36
|
-
exit 1
|
|
37
|
-
fi
|
|
38
|
-
|
|
39
|
-
printf '%s' "$emoji"
|
|
40
|
-
|
|
41
|
-
if command -v cb >/dev/null; then
|
|
42
|
-
printf '%s' "$emoji" | cb
|
|
43
|
-
elif command -v pbcopy >/dev/null; then
|
|
44
|
-
printf '%s' "$emoji" | pbcopy
|
|
45
|
-
elif command -v wl-copy >/dev/null; then
|
|
46
|
-
printf '%s' "$emoji" | wl-copy
|
|
47
|
-
elif command -v xclip >/dev/null; then
|
|
48
|
-
printf '%s' "$emoji" | xclip -selection clipboard
|
|
49
|
-
fi
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
3
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
text="${*:-${USER:-dotfiles}}"
|
|
7
|
-
font="${DOTFILES_FIGLET_FONT:-slant}"
|
|
8
|
-
|
|
9
|
-
if command -v figlet >/dev/null; then
|
|
10
|
-
figlet -f "$font" "$text"
|
|
11
|
-
exit 0
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
if command -v toilet >/dev/null; then
|
|
15
|
-
toilet -f "$font" "$text"
|
|
16
|
-
exit 0
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
echo "$text"
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
3
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
LOG_DIR="${HOME}/.local/share"
|
|
7
|
-
LOG_FILE="${LOG_DIR}/dotfiles.log"
|
|
8
|
-
MAX_SIZE_BYTES=$((1024 * 1024))
|
|
9
|
-
ROTATIONS=3
|
|
10
|
-
|
|
11
|
-
if [[ ! -f "${LOG_FILE}" ]]; then
|
|
12
|
-
exit 0
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
size=$(wc -c <"${LOG_FILE}" | tr -d ' ')
|
|
16
|
-
if [[ "${size}" -lt "${MAX_SIZE_BYTES}" ]]; then
|
|
17
|
-
exit 0
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
for ((i = ROTATIONS; i >= 1; i--)); do
|
|
21
|
-
if [[ -f "${LOG_FILE}.${i}.gz" ]]; then
|
|
22
|
-
mv "${LOG_FILE}.${i}.gz" "${LOG_FILE}.$((i + 1)).gz"
|
|
23
|
-
elif [[ -f "${LOG_FILE}.${i}" ]]; then
|
|
24
|
-
mv "${LOG_FILE}.${i}" "${LOG_FILE}.$((i + 1))"
|
|
25
|
-
gzip -f "${LOG_FILE}.$((i + 1))"
|
|
26
|
-
fi
|
|
27
|
-
done
|
|
28
|
-
|
|
29
|
-
mv "${LOG_FILE}" "${LOG_FILE}.1"
|
|
30
|
-
gzip -f "${LOG_FILE}.1"
|
|
31
|
-
: >"${LOG_FILE}"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
3
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
if command -v lolcat >/dev/null; then
|
|
7
|
-
if [[ $# -gt 0 ]]; then
|
|
8
|
-
cat "$@" | lolcat
|
|
9
|
-
else
|
|
10
|
-
lolcat
|
|
11
|
-
fi
|
|
12
|
-
exit 0
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
# Fallback: plain output
|
|
16
|
-
if [[ $# -gt 0 ]]; then
|
|
17
|
-
cat "$@"
|
|
18
|
-
else
|
|
19
|
-
cat
|
|
20
|
-
fi
|
package/scripts/tools/pipes.sh
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
3
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
4
|
-
set -euo pipefail
|
|
5
|
-
|
|
6
|
-
# Simple terminal pipes screensaver
|
|
7
|
-
# Inspired by pipes.sh but kept minimal for portability
|
|
8
|
-
|
|
9
|
-
cols=$(tput cols 2>/dev/null || echo 80)
|
|
10
|
-
rows=$(tput lines 2>/dev/null || echo 24)
|
|
11
|
-
|
|
12
|
-
cleanup() {
|
|
13
|
-
tput cnorm 2>/dev/null || true
|
|
14
|
-
stty echo 2>/dev/null || true
|
|
15
|
-
clear
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
trap cleanup EXIT INT TERM
|
|
19
|
-
|
|
20
|
-
tput civis 2>/dev/null || true
|
|
21
|
-
stty -echo 2>/dev/null || true
|
|
22
|
-
clear
|
|
23
|
-
|
|
24
|
-
symbols=("|" "-" "+" "┘" "└" "┐" "┌")
|
|
25
|
-
colors=(31 32 33 34 35 36 37)
|
|
26
|
-
|
|
27
|
-
while true; do
|
|
28
|
-
x=$((RANDOM % cols + 1))
|
|
29
|
-
y=$((RANDOM % rows + 1))
|
|
30
|
-
sym=${symbols[$((RANDOM % ${#symbols[@]}))]}
|
|
31
|
-
color=${colors[$((RANDOM % ${#colors[@]}))]}
|
|
32
|
-
printf "\033[%s;%sH\033[%sm%s\033[0m" "$y" "$x" "$color" "$sym"
|
|
33
|
-
sleep 0.01
|
|
34
|
-
if [[ "$y" -ge "$rows" ]]; then
|
|
35
|
-
clear
|
|
36
|
-
fi
|
|
37
|
-
if [[ "$x" -ge "$cols" ]]; then
|
|
38
|
-
clear
|
|
39
|
-
fi
|
|
40
|
-
if [[ "$RANDOM" -gt 32000 ]]; then
|
|
41
|
-
clear
|
|
42
|
-
fi
|
|
43
|
-
# slow down slightly
|
|
44
|
-
sleep 0.01
|
|
45
|
-
# allow keypress to exit
|
|
46
|
-
if read -r -t 0.001; then
|
|
47
|
-
break
|
|
48
|
-
fi
|
|
49
|
-
done
|
package/scripts/tuning/linux.sh
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
3
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
4
|
-
# Linux System Tuning (opt-in)
|
|
5
|
-
# Managed by chezmoi - https://github.com/sebastienrousseau/dotfiles
|
|
6
|
-
#
|
|
7
|
-
# Usage: DOTFILES_TUNING=1 DOTFILES_PROFILE=laptop ./linux.sh
|
|
8
|
-
# Profiles: laptop, desktop, server
|
|
9
|
-
|
|
10
|
-
set -euo pipefail
|
|
11
|
-
|
|
12
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
13
|
-
# shellcheck source=../../lib/dot/ui.sh
|
|
14
|
-
# shellcheck disable=SC1091
|
|
15
|
-
source "$SCRIPT_DIR/../../lib/dot/ui.sh"
|
|
16
|
-
|
|
17
|
-
ui_init
|
|
18
|
-
ui_header "Linux Tuning"
|
|
19
|
-
|
|
20
|
-
if [[ "${DOTFILES_TUNING:-0}" != "1" ]]; then
|
|
21
|
-
ui_warn "Tuning" "disabled. Re-run with DOTFILES_TUNING=1"
|
|
22
|
-
exit 0
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
PROFILE="${DOTFILES_PROFILE:-laptop}"
|
|
26
|
-
|
|
27
|
-
if [[ "$PROFILE" != "laptop" && "$PROFILE" != "desktop" && "$PROFILE" != "server" ]]; then
|
|
28
|
-
ui_err "DOTFILES_PROFILE" "must be laptop, desktop, or server (got: $PROFILE)"
|
|
29
|
-
exit 1
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
ui_info "Applying tuning" "$PROFILE profile"
|
|
33
|
-
|
|
34
|
-
apply_sysctl() {
|
|
35
|
-
local key="$1"
|
|
36
|
-
local value="$2"
|
|
37
|
-
if command -v sudo >/dev/null; then
|
|
38
|
-
ui_info "Setting" "$key = $value"
|
|
39
|
-
sudo sysctl -w "$key=$value" >/dev/null 2>&1 || ui_warn "Failed to set" "$key"
|
|
40
|
-
fi
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if ! command -v sudo >/dev/null; then
|
|
44
|
-
ui_warn "sudo" "not available; skipping sysctl tuning"
|
|
45
|
-
exit 0
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
# =============================================================================
|
|
49
|
-
# File System Tuning
|
|
50
|
-
# =============================================================================
|
|
51
|
-
ui_header "File system settings"
|
|
52
|
-
|
|
53
|
-
# Increase inotify watchers for IDEs and file sync tools
|
|
54
|
-
apply_sysctl "fs.inotify.max_user_watches" "524288"
|
|
55
|
-
apply_sysctl "fs.inotify.max_user_instances" "512"
|
|
56
|
-
|
|
57
|
-
# Increase file descriptor limits
|
|
58
|
-
apply_sysctl "fs.file-max" "2097152"
|
|
59
|
-
|
|
60
|
-
# =============================================================================
|
|
61
|
-
# Memory Tuning - vm.swappiness
|
|
62
|
-
# =============================================================================
|
|
63
|
-
ui_header "Memory settings"
|
|
64
|
-
|
|
65
|
-
case "$PROFILE" in
|
|
66
|
-
laptop)
|
|
67
|
-
# Laptop: Balance between RAM and battery (moderate swappiness)
|
|
68
|
-
apply_sysctl "vm.swappiness" "10"
|
|
69
|
-
apply_sysctl "vm.vfs_cache_pressure" "50"
|
|
70
|
-
apply_sysctl "vm.dirty_ratio" "15"
|
|
71
|
-
apply_sysctl "vm.dirty_background_ratio" "5"
|
|
72
|
-
;;
|
|
73
|
-
desktop)
|
|
74
|
-
# Desktop: Prefer RAM over swap (low swappiness, more RAM usage)
|
|
75
|
-
apply_sysctl "vm.swappiness" "5"
|
|
76
|
-
apply_sysctl "vm.vfs_cache_pressure" "50"
|
|
77
|
-
apply_sysctl "vm.dirty_ratio" "20"
|
|
78
|
-
apply_sysctl "vm.dirty_background_ratio" "5"
|
|
79
|
-
;;
|
|
80
|
-
server)
|
|
81
|
-
# Server: Minimal swapping for consistent performance
|
|
82
|
-
apply_sysctl "vm.swappiness" "1"
|
|
83
|
-
apply_sysctl "vm.vfs_cache_pressure" "100"
|
|
84
|
-
apply_sysctl "vm.dirty_ratio" "10"
|
|
85
|
-
apply_sysctl "vm.dirty_background_ratio" "3"
|
|
86
|
-
;;
|
|
87
|
-
esac
|
|
88
|
-
|
|
89
|
-
# =============================================================================
|
|
90
|
-
# Network Tuning - TCP Keepalive
|
|
91
|
-
# =============================================================================
|
|
92
|
-
ui_header "TCP keepalive settings"
|
|
93
|
-
|
|
94
|
-
# TCP keepalive: Detect dead connections faster
|
|
95
|
-
# Default: 7200s (2 hours) - we reduce to 60s for faster detection
|
|
96
|
-
apply_sysctl "net.ipv4.tcp_keepalive_time" "60"
|
|
97
|
-
|
|
98
|
-
# Interval between keepalive probes (default: 75s)
|
|
99
|
-
apply_sysctl "net.ipv4.tcp_keepalive_intvl" "10"
|
|
100
|
-
|
|
101
|
-
# Number of keepalive probes before connection is dropped (default: 9)
|
|
102
|
-
apply_sysctl "net.ipv4.tcp_keepalive_probes" "6"
|
|
103
|
-
|
|
104
|
-
# Enable TCP Fast Open for faster connections
|
|
105
|
-
apply_sysctl "net.ipv4.tcp_fastopen" "3"
|
|
106
|
-
|
|
107
|
-
# Increase TCP buffer sizes for better throughput
|
|
108
|
-
apply_sysctl "net.core.rmem_max" "16777216"
|
|
109
|
-
apply_sysctl "net.core.wmem_max" "16777216"
|
|
110
|
-
apply_sysctl "net.ipv4.tcp_rmem" "4096 87380 16777216"
|
|
111
|
-
apply_sysctl "net.ipv4.tcp_wmem" "4096 65536 16777216"
|
|
112
|
-
|
|
113
|
-
# Connection tracking and queueing
|
|
114
|
-
apply_sysctl "net.core.somaxconn" "4096"
|
|
115
|
-
apply_sysctl "net.core.netdev_max_backlog" "4096"
|
|
116
|
-
|
|
117
|
-
# Reuse TIME_WAIT sockets for new connections
|
|
118
|
-
apply_sysctl "net.ipv4.tcp_tw_reuse" "1"
|
|
119
|
-
|
|
120
|
-
# Reduce FIN timeout for faster connection cleanup
|
|
121
|
-
apply_sysctl "net.ipv4.tcp_fin_timeout" "15"
|
|
122
|
-
|
|
123
|
-
# =============================================================================
|
|
124
|
-
# Security Tuning
|
|
125
|
-
# =============================================================================
|
|
126
|
-
ui_header "Security settings"
|
|
127
|
-
|
|
128
|
-
# shellcheck disable=SC1091
|
|
129
|
-
# Disable IP source routing
|
|
130
|
-
apply_sysctl "net.ipv4.conf.all.accept_source_route" "0"
|
|
131
|
-
apply_sysctl "net.ipv4.conf.default.accept_source_route" "0"
|
|
132
|
-
|
|
133
|
-
# Ignore ICMP redirects
|
|
134
|
-
apply_sysctl "net.ipv4.conf.all.accept_redirects" "0"
|
|
135
|
-
apply_sysctl "net.ipv4.conf.default.accept_redirects" "0"
|
|
136
|
-
|
|
137
|
-
# Ignore bogus ICMP errors
|
|
138
|
-
apply_sysctl "net.ipv4.icmp_ignore_bogus_error_responses" "1"
|
|
139
|
-
|
|
140
|
-
# Enable SYN flood protection
|
|
141
|
-
apply_sysctl "net.ipv4.tcp_syncookies" "1"
|
|
142
|
-
|
|
143
|
-
# =============================================================================
|
|
144
|
-
# Persist Settings
|
|
145
|
-
# =============================================================================
|
|
146
|
-
ui_header "Persisting sysctl settings"
|
|
147
|
-
|
|
148
|
-
if command -v sudo >/dev/null; then
|
|
149
|
-
sudo tee /etc/sysctl.d/99-dotfiles.conf >/dev/null <<'EOF'
|
|
150
|
-
# Dotfiles system tuning - auto-generated
|
|
151
|
-
# https://github.com/sebastienrousseau/dotfiles
|
|
152
|
-
|
|
153
|
-
# File system
|
|
154
|
-
fs.inotify.max_user_watches = 524288
|
|
155
|
-
fs.inotify.max_user_instances = 512
|
|
156
|
-
fs.file-max = 2097152
|
|
157
|
-
|
|
158
|
-
# Memory (adjust vm.swappiness per profile)
|
|
159
|
-
vm.vfs_cache_pressure = 50
|
|
160
|
-
|
|
161
|
-
# TCP Keepalive
|
|
162
|
-
net.ipv4.tcp_keepalive_time = 60
|
|
163
|
-
net.ipv4.tcp_keepalive_intvl = 10
|
|
164
|
-
net.ipv4.tcp_keepalive_probes = 6
|
|
165
|
-
net.ipv4.tcp_fastopen = 3
|
|
166
|
-
|
|
167
|
-
# TCP Performance
|
|
168
|
-
net.core.rmem_max = 16777216
|
|
169
|
-
net.core.wmem_max = 16777216
|
|
170
|
-
net.core.somaxconn = 4096
|
|
171
|
-
net.core.netdev_max_backlog = 4096
|
|
172
|
-
net.ipv4.tcp_tw_reuse = 1
|
|
173
|
-
net.ipv4.tcp_fin_timeout = 15
|
|
174
|
-
|
|
175
|
-
# Security
|
|
176
|
-
net.ipv4.conf.all.accept_source_route = 0
|
|
177
|
-
net.ipv4.conf.default.accept_source_route = 0
|
|
178
|
-
net.ipv4.conf.all.accept_redirects = 0
|
|
179
|
-
net.ipv4.conf.default.accept_redirects = 0
|
|
180
|
-
net.ipv4.icmp_ignore_bogus_error_responses = 1
|
|
181
|
-
net.ipv4.tcp_syncookies = 1
|
|
182
|
-
EOF
|
|
183
|
-
fi
|
|
184
|
-
|
|
185
|
-
ui_ok "Linux tuning complete" "$PROFILE profile"
|
|
186
|
-
ui_info "Note" "Some settings require a reboot"
|
package/scripts/tuning/macos.sh
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
3
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
4
|
-
# macOS tuning (opt-in)
|
|
5
|
-
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
9
|
-
# shellcheck source=../../lib/dot/ui.sh
|
|
10
|
-
# shellcheck disable=SC1091
|
|
11
|
-
source "$SCRIPT_DIR/../../lib/dot/ui.sh"
|
|
12
|
-
|
|
13
|
-
ui_init
|
|
14
|
-
ui_header "macOS Tuning"
|
|
15
|
-
|
|
16
|
-
if [[ "${DOTFILES_TUNING:-0}" != "1" ]]; then
|
|
17
|
-
ui_warn "Tuning" "disabled. Re-run with DOTFILES_TUNING=1"
|
|
18
|
-
exit 0
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
if [[ "${DOTFILES_PROFILE:-}" != "laptop" && "${DOTFILES_PROFILE:-}" != "desktop" && "${DOTFILES_PROFILE:-}" != "server" ]]; then
|
|
22
|
-
ui_err "DOTFILES_PROFILE" "not set to known profile"
|
|
23
|
-
exit 1
|
|
24
|
-
fi
|
|
25
|
-
|
|
26
|
-
ui_info "Applying" "macOS tuning"
|
|
27
|
-
|
|
28
|
-
# Faster key repeat (requires logout/login to fully apply)
|
|
29
|
-
defaults write -g InitialKeyRepeat -int 15
|
|
30
|
-
defaults write -g KeyRepeat -int 2
|
|
31
|
-
|
|
32
|
-
# Finder: show all filename extensions
|
|
33
|
-
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
|
|
34
|
-
|
|
35
|
-
# Finder: use list view by default in all Finder windows
|
|
36
|
-
# Four-letter codes for view modes: `icnv`, `clmv`, `glyv`, `Nlsv` (list)
|
|
37
|
-
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
|
|
38
|
-
|
|
39
|
-
# Finder: show path bar
|
|
40
|
-
defaults write com.apple.finder ShowPathbar -bool true
|
|
41
|
-
|
|
42
|
-
# Finder: show status bar
|
|
43
|
-
defaults write com.apple.finder ShowStatusBar -bool true
|
|
44
|
-
|
|
45
|
-
# Finder: keep folders on top when sorting by name
|
|
46
|
-
defaults write com.apple.finder _FXSortFoldersFirst -bool true
|
|
47
|
-
|
|
48
|
-
# Restart Finder to apply changes
|
|
49
|
-
killall Finder >/dev/null 2>&1 || true
|
|
50
|
-
|
|
51
|
-
# Dock: reduce show/hide delay
|
|
52
|
-
defaults write com.apple.dock autohide-delay -float 0
|
|
53
|
-
defaults write com.apple.dock autohide-time-modifier -float 0.2
|
|
54
|
-
killall Dock >/dev/null 2>&1 || true
|
|
55
|
-
|
|
56
|
-
ui_ok "macOS tuning" "complete"
|
package/scripts/uninstall.sh
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
3
|
-
# Copyright (c) 2015-2026 Sebastien Rousseau
|
|
4
|
-
# Uninstall dotfiles and clean up all artifacts.
|
|
5
|
-
|
|
6
|
-
set -euo pipefail
|
|
7
|
-
|
|
8
|
-
RED='\033[0;31m'
|
|
9
|
-
GREEN='\033[0;32m'
|
|
10
|
-
YELLOW='\033[1;33m'
|
|
11
|
-
NC='\033[0m'
|
|
12
|
-
|
|
13
|
-
log_info() { printf "${GREEN}[INFO]${NC} %s\n" "$*"; }
|
|
14
|
-
log_warn() { printf "${YELLOW}[WARN]${NC} %s\n" "$*"; }
|
|
15
|
-
log_error() { printf "${RED}[ERROR]${NC} %s\n" "$*" >&2; }
|
|
16
|
-
|
|
17
|
-
echo ""
|
|
18
|
-
echo "Dotfiles Uninstall"
|
|
19
|
-
echo "=================="
|
|
20
|
-
echo ""
|
|
21
|
-
log_warn "This will remove all managed dotfiles and related artifacts."
|
|
22
|
-
echo ""
|
|
23
|
-
|
|
24
|
-
if [[ "${1:-}" != "--force" ]]; then
|
|
25
|
-
printf "Continue? [y/N] "
|
|
26
|
-
read -r confirm
|
|
27
|
-
case "$confirm" in
|
|
28
|
-
y | Y | yes) ;;
|
|
29
|
-
*)
|
|
30
|
-
echo "Aborted."
|
|
31
|
-
exit 0
|
|
32
|
-
;;
|
|
33
|
-
esac
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
# 1. Revert chezmoi-managed files
|
|
37
|
-
if command -v chezmoi >/dev/null 2>&1; then
|
|
38
|
-
log_info "Reverting chezmoi-managed files..."
|
|
39
|
-
chezmoi purge --force 2>/dev/null || true
|
|
40
|
-
fi
|
|
41
|
-
|
|
42
|
-
# 2. Remove dotfiles repo
|
|
43
|
-
if [[ -d "$HOME/.dotfiles" ]]; then
|
|
44
|
-
log_info "Removing ~/.dotfiles repository..."
|
|
45
|
-
rm -rf "$HOME/.dotfiles"
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
# 3. Remove chezmoi config and state
|
|
49
|
-
log_info "Removing chezmoi configuration..."
|
|
50
|
-
rm -rf "${XDG_CONFIG_HOME:-$HOME/.config}/chezmoi"
|
|
51
|
-
rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi"
|
|
52
|
-
|
|
53
|
-
# 4. Remove dotfiles artifacts
|
|
54
|
-
log_info "Removing dotfiles artifacts..."
|
|
55
|
-
rm -f "$HOME/.local/bin/dot"
|
|
56
|
-
rm -f "$HOME/.local/bin/dot-ai"
|
|
57
|
-
rm -f "$HOME/.local/bin/dot-theme-sync"
|
|
58
|
-
rm -f "$HOME/.local/bin/tour"
|
|
59
|
-
rm -f "$HOME/.local/bin/ai_core"
|
|
60
|
-
rm -f "$HOME/.local/bin/ai-update"
|
|
61
|
-
rm -f "$HOME/.local/bin/antigravity"
|
|
62
|
-
rm -f "$HOME/.local/bin/git-ai-commit"
|
|
63
|
-
rm -f "$HOME/.local/bin/git-ai-diff"
|
|
64
|
-
|
|
65
|
-
# 5. Remove shell caches
|
|
66
|
-
log_info "Removing shell caches..."
|
|
67
|
-
rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/dotfiles"
|
|
68
|
-
rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/zsh"
|
|
69
|
-
rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/bash"
|
|
70
|
-
|
|
71
|
-
# 6. Remove state and logs
|
|
72
|
-
log_info "Removing state and logs..."
|
|
73
|
-
rm -rf "${XDG_STATE_HOME:-$HOME/.local/state}/dotfiles"
|
|
74
|
-
rm -f "${XDG_DATA_HOME:-$HOME/.local/share}/dotfiles.log"
|
|
75
|
-
|
|
76
|
-
# 7. Remove completions
|
|
77
|
-
log_info "Removing shell completions..."
|
|
78
|
-
rm -f "${XDG_DATA_HOME:-$HOME/.local/share}/zsh/completions/_dot"
|
|
79
|
-
rm -f "${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions/dot"
|
|
80
|
-
|
|
81
|
-
echo ""
|
|
82
|
-
log_info "Uninstall complete."
|
|
83
|
-
log_info "You may need to manually:"
|
|
84
|
-
log_info " - Remove mise tools: mise implode"
|
|
85
|
-
log_info " - Reset your shell: chsh -s /bin/zsh"
|
|
86
|
-
log_info " - Restart your terminal"
|