that's awesome! do you reckon the pr is going to get accepted? I definitely remember reading discussions of this issue in the past and seeing a firm "we don't want this feature in i3" response.
It doesn't just implement this specific feature, though. It provides a more general approach for i3bar that enables this and many other use cases. This struck us as a good and flexible solution we can get behind.