Only dotsync on the first login of the day

This commit is contained in:
Sage Vaillancourt 2024-07-21 11:58:03 -04:00
parent d70ce29d7d
commit 68dce8e419
1 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,11 @@
date >> "$HOME/.tmp/getdot-log"
echo "~/zlogin, babyyy" >> "$HOME/.tmp/getdot-log"
LOGIN_SYNC_DATE="$HOME/.bin/.login-dot-sync"
touch $LOGIN_SYNC_DATE
current_date="$(date '+%D')"
if [[ "$current_date" != "$(cat "$LOGIN_SYNC_DATE")" ]]; then
RUN_GETDOT="true" GETDOT_ARGS="--skip-dconf" source "$HOME/.zshrc"
fi
echo "$current_date" > "$LOGIN_SYNC_DATE"