Hello!

I'd like to write a simple bash script which has to run a command, but only when a certain mouse button is pressed. To put it into "simple" words, i'd like to write...

Code:
if left_mouse_button_is_pressed = true
 ...
else
 ...
How can i figure out whether a mouse button is currently pressed, or not?

Thanks
Christoph