You can use the AutostartCondition key to check for a
value of a GSettings key.
The session manager runs the application automatically if the key's value
is true. If the key's value changes in the running session, the session
manager starts or stops the application, depending on what the previous value
for the key was.