If you need to know your current screen resolution on a Linux computer, you have several commands to choose from. Sometimes it is useful to incorporate that functionality in a Bash script.
Source : How to Discover the Screen Resolution in Linux Scripts