There are lots, actually.
https://www.kde.org/applications/uti.../ktimetracker/
Project Hamster, aka the Gnome Time Tracker:
https://launchpad.net/~dylanmccall/+...cker-git-daily
An online one is called Toggle...don't think it's open source but a friend uses it on Linux.
Also,
https://www.teamwork.com/, also not open source but they have a Linux desktop app that records what you are doing. Again, a friend of mine used it before switching to toggle.
Not sure about mouse tracking; not even sure how that would show productivity (for instance, less mouse movement for me means more productive, but for others it might mean more productivity.
I think there are others, but those are the ones that leap to mind.