I am trying to make a simple screencasting bash script. I want to get screen selection coordinates by drawing a red rectangle with mouse. I can use xdotools to get coordinates but how can I draw rectangle on screen?
I am trying to make a simple screencasting bash script. I want to get screen selection coordinates by drawing a red rectangle with mouse. I can use xdotools to get coordinates but how can I draw rectangle on screen?
I just found https://www.opengl.org/discussion_boards/showthread.php/157014-Compiling-with-gcc, and I modified the code to get rid of the 100% CPU hog; it seems to work fine on Ubuntu 14.04 - simply run it from a terminal, draw your rectangle area, and the program will exit, printing the coordinates in the terminal:
xrectsel.c
:you can install python cli package
Check format options