Perpetual motion desk toys and magnets
They use batteries and electromagnets.  They are NOT perpetual motion devices.  They just run a very long (too damn long) time on a battery.

The lower end of the pendulum may have a permanent magnet.  The base MUST use an electromagnet because it has to be turned on and off in time to the pendulum  motion to keep it running.

The electromagnet is turned on for a short period the either pull the pendulum closer or to push it away.
This action makes up for energy lost in the friction of the bearings and with the air.
Without the energy supplied by the battery, it would stop moving.  

Take the battery out and try it.  No battery, slows down and stops - blessed peace and quiet for those of us who can't stand the irritating junk piles.