Prevent M$ Teams from changing your status to Away
2025-11-03 by madcap
If, like me, you are a Linux user and have to use M$ Teams because of your $dayjob, you may be confused by the fact that your status keeps changing to Away, even when you're using your computer. Only when you hover your mouse pointer over Teams does it decide to wake up and change your status back to Available.
To prevent this from happening, you just have to trick it into thinking that you're periodically hovering your mouse pointer over it.
M$ Teams, on Linux, runs in the browser or as a progressive web app (PWA), which allows us to easily inject javascript code and change its behavior:
- Open Teams, press F12 to access the browser's DevTools
- Click on Console
- Run this script to simulate a `mousemove` event:
function moveMouse() {
const event = new MouseEvent('mousemove', { clientX: 0, clientY: 0 });
window.dispatchEvent(event);
}
setInterval(moveMouse, 30000);
You can run this every time you open the application or automate its execution. There are several add-ons that allow you to do this. I'm not going to compare them, so choose the one you like best.