Extra Right padding after applying statuscolours patch in dwm

Hi Guys, I have just installed the dwm patch for status colors, but I am facing a quest weird problem. As I start applying colors to each section of my dwmbar, the status bar is shifting to the left side I don’t know why. I haven’t applied any padding for space, the script is exactly the same just with colors.

dwmbar without colors: image

dwmbar after applying colors: image

Here you can see one with colors that has a lot of right padding.

My dwm build: Github

My dwmbar setup: Github

Adding colours like this doesn’t take up zero space in the string, when dwm then reads it I suspect it allocates space for the whole string (including the escapes) but when printed out they don’t take up space leaving you with an empty section to the left. This commit would seem to support my guess Fixed right gap issue in dwm-statuscolour · anurag3301/my-dwm@ba3cbf9 · GitHub