I like the screensavers, but when on battery power the blank one makes more sense. How could I configure the system to use the blank one when on battery power and other more colourful ones when on mains?
To clarify: The options to set different timeouts for battery/mains are fine; I am looking to set different screensavers (no screen content on battery power, interesting colourful stuff when on mains power).
upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state
will returndischarging
if your system is running on battery.xscreensaver
configuration is in ~/.xscreensaver. The property you're looking for in this file ismode
. The optional values areone
,blank
, andrandom
. So we need to find a notification of battery state change then a littlesed
piece to modify the xscreensaver configuration when the battery state changes. – Stephen Boston Jun 09 '19 at 15:42