playing / 09 of 15
Battery
phonto can pause the wallpaper while the laptop runs on battery, or only once the charge drops below a threshold.
Pausing on battery
shell
phonto ~/Videos/harbour.mp4 --pause-on-batteryUnplug, and the video stops on the frame it was showing. Plug back in, and it plays again.
Pausing on low charge
shell
phonto ~/Videos/harbour.mp4 --pause-below 30On battery with less than 30% left, the video pauses. On mains power it plays, whatever the charge. The threshold is a whole number from 1 to 100. Use one flag or the other, not both.
How phonto knows
On macOS, the system tells phonto when the power source changes, and it pauses or plays straight away. On Linux, phonto reads /sys/class/power_supply every 10 seconds. A machine without an AC adapter there, like a desktop, counts as plugged in.