Try to run getdot at login time

This commit is contained in:
Sage Vaillancourt 2024-05-18 14:17:06 -04:00
parent 49ccb01787
commit f9d69a590a
2 changed files with 8 additions and 3 deletions

3
fake_home/.zlogin Normal file
View File

@ -0,0 +1,3 @@
date >> "$HOME/.tmp/getdot-log"
echo "~/zlogin, babyyy" >> "$HOME/.tmp/getdot-log"
RUN_GETDOT="true" GETDOT_ARGS="--skip-dconf" source "$HOME/.zshrc"

View File

@ -251,7 +251,7 @@ function getdot {
sync-history
load-extensions
sync-dconf
[[ "$1" != "--skip-dconf" ]] && sync-dconf
cd - > /dev/null
}
@ -262,9 +262,11 @@ fi
last_get_file="$HOME/.tmp/.$(whoami)-dotfiles-last-get"
current_date="$(date '+%Y-%m-%d')"
if test -d "$DOT_DIR" && [[ "$current_date" != "$(cat "$last_get_file")" ]] &> /dev/null; then
if [[ "$RUN_GETDOT" == "true" ]] || (test -d "$DOT_DIR" && [[ "$current_date" != "$(cat "$last_get_file")" ]] &> /dev/null); then
echo "$current_date" > "$last_get_file"
getdot
date >> "$HOME/.tmp/getdot-log"
getdot $GETDOT_ARGS >> "$HOME/.tmp/getdot-log"
echo >> "$HOME/.tmp/getdot-log"
fi
export nvm_loaded=false