Add activity recognition for desktop


I don’t know if this is even possible, but I would like a feature that somehow detects if I’m using my desktop computer/ Chrome.

Currently if I’m sitting at my PC watching videos or smth and don’t move much, the app starts sleep tracking.
My phone is on the wireless charger on my desk and my Mi Band 4 on my wrist.

I couldn’t find any info on it, but maybe there is a way to use the activity recognition API in the desktop version of the Chrome browser?
Or is it possible to create some kind of programm for the PC that recognizes if I move my mouse or am watching smth?