A structure comprising a molybdenum disulfide monolayer on an azobenzene substrate could be used to build a highly compactable and malleable quasi-two-dimensional transistor powered by light.