Shutdown – waiting for terminate process – after timout force shutdown/standby/hibernate

Hi guys,

I ask me if there exist a solution for the following “issue”:
When I want to shutdown/hibernate/standby my device, then sometimes a process is in the background which breaks the shutdown-command. For example, because an editor is still running.

That’s fine, and I already set in KDE Plasma that the program come to the foreground to exit it. But sometimes there are still processes open without to see (thunderbird is sending a mail? Don’t know…), pulling the plug, go away and when I come back my laptop doesn’t lunch because the battery is deeply discharged. Mist! (german for sh i t)

Now I want to set a timeout, so doesn’t matter what’s happening, but

  • when the battery charge is below 10% or
  • after 10 minutes
    the system will shutdown, totally irrelevant what’s still running.

It could be only complicated if an update is running in battery mode and my system want at 5% battery charge go in suspend… But this risk I would take.

Thanks for your ideas/suggestions/help!