Script that switches 1 and 2 displays in linux based on the current state (toggles). Also disables notifications while it 2-displays state. More information and examples could be find at https://linuxconfig.org/how-to-configure-your-monitors-with-xrandr-in-linux
Example of how xrandr
output can look like:
Save .sh script to your directory and use bash /path/to/where/you/saved/displays.sh
in terminal in order to execute it or ./path/to/where/you/saved/displays.sh
. Useful to bind to some keyboard combination.