# ABOUTME: pacman install hooks for Moongreet.
# ABOUTME: Sets ownership on cache directory for the greeter user.

post_install() {
    if getent passwd greeter > /dev/null 2>&1; then
        chown greeter:greeter /var/cache/moongreet
    fi

    echo "==> Copy /etc/moongreet/moongreet.toml and adjust the wallpaper path."
    echo "==> Configure greetd to use moongreet:"
    echo "    [default_session]"
    echo "    command = \"moongreet\""
    echo "    user = \"greeter\""
}

post_upgrade() {
    post_install
}
