What are the topologies over $X$ where $\forall A \subseteq X$ we have $A$ or $X\setminus A$ is open but not both, except $X=A$ or $X=\varnothing?$ My question is really similar to the definition of ultrafilters. For finite cases all ultrafilters are generated by one element, we can use them to construct topologies satisfying the conditions easily. 
But with topologies we have more freedom and the proof does not work. Are there other examples? I checked for sets with elements up to 4, but only the ultrafilters or their complement works.
Also if the topic has some literature I am interested in the infinite cases too. I can construct nontrivial ultrafilters, so I know there are other examples.
 A: Every such topology is of the form $\mathcal U\cup\{\emptyset\}$ or $\overline {\mathcal U}\cup\{X\}$ for an ultrafilter $\mathcal U,$ where $\overline{\mathcal U}=\{X\setminus A\mid A\in\mathcal U\}$. In fact we only need the set of open sets to be closed under finite unions (i.e. a sublattice of the power set) - no infinite unions required.
Finite case
For finite $X$ we can just look at how many singletons are open. If $X$ has exactly one closed singleton $\{a\},$ all the other singletons are open, and hence the open sets are $X$ and the sets not containing $a.$ Similarly if $X$ has exactly one open singleton $\{a\}$, the open sets are $\emptyset$ and the sets containing $a.$
So we need to show that $X$ has either exactly one open singleton, or exactly one closed singleton.
I will assume this for $|X|\leq 4,$ for which I don't know an argument except checking lots of cases.
For $|X|>4$. Suppose for contradiction that there are distinct $a,b,c,d$ with $\{a\},\{b\}$ open and $\{c\},\{d\}$ closed. If $X\setminus\{a,b,c,d\}$ is closed, the final topology induced by the quotient map $X\to \{a,b,c,X\setminus\{a,b,c\}\}$ has two open singletons and two closed singletons, contradicting the $|X|=4$ case. A similar argument applies if $X\setminus\{a,b,c,d\}$ is open, using the final topology induced by the quotient map $X\to \{X\cup\setminus\{b,c,d\},b,c,d\}$. This completes the proof for finite $X.$
General case
Given two finite partitions $\mathcal P, \mathcal P'$ of $X,$ each with at least three parts, the common refinement $\mathcal P''$ is another finite partition and so must have either one open part or one closed part. If it has exactly one open part $A$, then any union of parts in $\mathcal P''$ is open iff it contains $A$, so $\mathcal P$ and $\mathcal P'$ each have exactly one open part. Similarly if $\mathcal P''$ has exactly one closed part, then $\mathcal P$ and $\mathcal P'$ each have exactly one closed part. So which case we are in is independent of the partition chosen.
Assume each finite partition has exactly one open part. To match a common definition of ultrafilters (ignoring $\emptyset$), we need to show that given non-empty $A\subsetneq B\subsetneq X,$ if $A$ is open then so is $B.$ But $A\cup (B\setminus A)\cup (X\setminus B)$ is a finite partition, but $A$ is open, so $X\setminus B$ is closed, so $B$ is open.
A similar argument applies to the case where each finite partition has exactly one closed part. This shows that the topology is of the form $\mathcal U\cup\{\emptyset\}$ or $\overline{\mathcal U}\cup\{X\}$ for an ultrafilter $\mathcal U.$
