If you’re watch something on YouTube that’s long-ish, the screen saver is kicking in every few minutes. So you have to move the mouse around from time to time; that’s annoying.
Here is a one liner for KDE that will simulate user activity every minute. While this is running in Konsole, the screen saver won’t activate. You end it with [Ctrl+C]. It’s rather crude, but simple, easy to understand and it does the job.
while /bin/true; do qdbus org.freedesktop.ScreenSaver /ScreenSaver SimulateUserActivity > /dev/null; sleep 1m; done