fix: defer backup reminder to precmd (p10k compat), add dotfiles restic profile

This commit is contained in:
Dmitry
2026-05-13 20:12:53 +03:00
parent f24af95184
commit 1a7abd9ed6
2 changed files with 40 additions and 1 deletions
+31
View File
@@ -9,6 +9,37 @@ groups:
- pictures - pictures
- pictures-local - pictures-local
dotfiles:
repository: "rclone:yadisk:System/Backups/ada-x1/dotfiles"
password-file: "~/.config/resticprofile/pass.txt"
backup:
source:
- ~/dotfiles
- ~/.config
- ~/.ssh
- ~/.claude
- ~/.codex
exclude:
- "**/.cache"
- "**/__pycache__"
- "~/.config/Code"
- "~/.config/BraveSoftware"
- "~/.config/chromium"
- "~/.config/google-chrome"
- "~/.codex/logs_*"
- "~/.codex/sqlite"
- "~/.codex/telemetry"
- "~/.codex/sessions"
- "~/.claude/telemetry"
- "~/.claude/file-history"
- "~/.claude/session-env"
- "~/.claude/projects"
forget:
keep-last: 10
keep-daily: 14
keep-weekly: 4
keep-monthly: 3
projects: projects:
repository: "rclone:yadisk:System/Backups/ada-x1/Documents/Projects" repository: "rclone:yadisk:System/Backups/ada-x1/Documents/Projects"
password-file: "~/.config/resticprofile/pass.txt" password-file: "~/.config/resticprofile/pass.txt"
+9 -1
View File
@@ -36,4 +36,12 @@ source "${ZSH_CONFIG_DIR}/prompt.zsh"
[[ -z "$TMUX" && "$TERM_PROGRAM" == "kitty" ]] && fastfetch [[ -z "$TMUX" && "$TERM_PROGRAM" == "kitty" ]] && fastfetch
# ═══ Напоминания ════════════════════════════════════════════ # ═══ Напоминания ════════════════════════════════════════════
(( ${+functions[_backup_reminder]} )) && _backup_reminder # Запускаем после первого промпта, чтобы не конфликтовать с p10k instant prompt
if (( ${+functions[_backup_reminder]} )); then
_precmd_backup_reminder() {
_backup_reminder
add-zsh-hook -d precmd _precmd_backup_reminder
unfunction _precmd_backup_reminder
}
add-zsh-hook precmd _precmd_backup_reminder
fi