In my new laptop in Xubuntu 16.04 toggle screen Fn button is not working so I need to write a script that will toggle the display, for this to work I need to check if screen is on or off, how can I do that from command line?
I can use:
sudo vbetool dpms off/on
but I need to know which command to execute, I didn't test it yet because will need to turn my display on after I turn in off.