on *:active:*:{ if ($appactive) && ($cid != $lactivecid) && ($active != $null) && ($lactive != $null) echo 4 $active I've changed networks. }