  Systems as diverse as binary mixtures and inclusions in biological membranes,
and many more, can be described effectively by interacting spins. When the
critical fluctuations in these systems are constrained by boundary conditions,
critical Casimir forces (CCF) emerge. Here we analyze CCF between boundaries
with alternating boundary conditions in two dimensions, employing conformal
field theory (CFT). After presenting the concept of boundary changing
operators, we specifically consider two different boundary configurations for a
strip of critical Ising spins: (I) alternating equi-sized domains of up and
down spins on both sides of the strip, with a possible lateral shift, and (II)
alternating domains of up and down spins of different size on one side and
homogeneously fixed spins on the other side of the strip. Asymptotic results
for the CCF at small and large distances are derived. We introduce a novel
modified Szeg\"o formula for determinants of real antisymmetric block Toeplitz
matrices to obtain the exact CCF and the corresponding scaling functions at all
distances. We demonstrate the existence of a surface Renormalization Group flow
between universal force amplitudes of different magnitude and sign. The Casimir
force can vanish at a stable equilibrium position that can be controlled by
parameters of the boundary conditions. Lateral Casimir forces assume a
universal simple cosine form at large separations.
