Neat! I'm working on something very similar for Xfce, but invoking ddcutil natively: https://github.com/apsun/xfce4-ddc-plugin (very much WIP, currently only supports hotkeys and a single monitor)
I've found that shelling out to the ddcutil CLI directly tends to be "lossy" - as in, if invoked very quickly (i.e. via keyboard shortcuts), it will tend to race with itself and fail half the time. So far the best solution I've found is to run a daemon to queue and batch together multiple operations, which significantly improved reliability.
I've found that shelling out to the ddcutil CLI directly tends to be "lossy" - as in, if invoked very quickly (i.e. via keyboard shortcuts), it will tend to race with itself and fail half the time. So far the best solution I've found is to run a daemon to queue and batch together multiple operations, which significantly improved reliability.