This script is a work around of an issue in CentOS 7 which causes one of the monitors goes blank
I have two connected monitors and their names are: DP-1-1 and DP-1-2. These names can be get from xrand command: xrandr --listmonitors Please replace these names with your monitor names.
My monitor one is primary and monitor two is secondary which is placed right to monitor-one. This script is written according to my preference. Please change it acccording to your preference.