xprograms: make rightclick emulate function do not depend on another script