I have some apps which to things like check for data updates online, or have systemd services packaged which to some background processing - some of which may be resource intensive or otherwise contradict the purposes of “battery saving mode”.
How can I detect (in a hopefully simple manner) that BSM is active, and that my services/apps shouldn’t do their thing?
I know about
mcetool -N | grep 'saving mode' Power saving mode: enabled (inactive) Forced power saving mode: disabled
busctl call "com.nokia.mce" /com/nokia/mce/request "com.nokia.mce.request" get_psm_state
but are there other ways (e.g.
query a dbus service, check for presence of a file, read a dconf key)?