How to start --user units when using startx

Happy new year everyone, today i’m struggling how to start my user units when running startx as my display manager, i could run each one with a command inside my xinitrc but then it becomes a more extensive file, for instance here is my xinitrc

                # Setting up the user's D-Bus Daemon
                if test -z "$DBUS_SESSION_BUS_ADDRES"; then
                        eval $(dbus-launch --exit-with-session --sh --syntax)
                fi
                systemctl --user import-environment DISPLAY XAUTHORITY
                if command -v dbus-update-activation-environment >/dev/null 2>&1; then
                        dbus-update-activation-environment DISPLAY XAUTHORITY
                fi

                xrdb $HOME/.config/X11/xresources &

                export XNOTIFY_FIFO="$HOME/.cache/xnotify$DISPLAY.fifo"
                rm -f $XNOTIFY_FIFO
                mkfifo $XNOTIFY_FIFO
                xnotify -b 1 0<>$XNOTIFY_FIFO | sh &

                systemctl --user start picom
                numlockx on

                exec bspwm

i recently installed unclutter but since is not inside this file, it’s not starting? Any idea how to solve it?

For enabling user services take a look at this section of the manual. Basically you have to symlink the service unit into:

$XDG_CONFIG_HOME/systemd/user/default.target.wants/

By the way, dbus-launch and DBUS_SESSION_BUS_ADDRESS (you also have a typo) are deprecated. You can simply do

dbus-daemon --session --address="unix:path=$XDG_RUNTIME_DIR/bus" &