On Windows I've been using "Don't Sleep" [1] and have now switched to "PowerToys Awake" [2] for one-click sleep prevention. On macOS I've used Caffeine [3] for that purpose. KDE on the other hand already has a built-in check box to prohibit sleeping in the power/battery control applet.
There seems to be quite a market for this teeny tiny tools.
Caffeine is actually built into macs. You can just run ` caffeine` on the command line. I like to use hammerspoon to control it though, which adds the exact same icon to the taskbar, but I have one less thing to install.
There seems to be quite a market for this teeny tiny tools.
[1] https://www.softwareok.com/?seite=Microsoft/DontSleep [2] https://learn.microsoft.com/en-us/windows/powertoys/awake [3] https://www.caffeine-app.net