I want an executable script that changes screen configuration from 1 to 2 or from 2 to 1. I would need a boolean or a variable where the state is saved. It's that possible?
Otherwise, how can I check with xrandr if i'm using config 1 or 2?
This question came from our site for professional and enthusiast programmers.
You can probably ask
However, failing that, to actually answer the question, the usual method for this is testing for the existence of a file: