Steam's automatic controller disconnect on idle doesn't work for some controllers, 2 types of Sony Dualshocks in my case. Steam can't even disconnect them with an explicit action, it's not just idle detection that's broken. The Dualshock Edge has a small battery so leaving it running when not in use is particularly bad.
This has two short scripts: one to detect connected Bluetooth controllers and the other to disconnect the Bluetooth connection for all connected controllers. Both these scripts can be used with Waybar, configs for which are also included.
The scripts assume controllers are Bluetooth devices with "controller" in their name.