I want to execute a command periodically and based on its output to have a visual indication of its last return value (0: green, non-zero: red).
e.g. by using the command below I can check whether my vpn connection is still alive and healthy. protected-node is only accessible through vpn, so if vpn is unhealthy or down it will return non-zero.
nc -w5 -z vpn-only-accessible-node 80
So as said above, I am looking for a way to convert the return value of the command to visual indication in the statusbar or to some other always-visible area on my desktop.
I am using mate desktop.
 
    
 
    