Is there a way to let dzen and trayer handle dynamic screen resolution

view full story

https://bbs.archlinux.org – I am using XMonad on my laptop and I also have a monitor for the laptop. The monitor has higher resolution than my laptop so when I connect my laptop to the monitor, the dzen bar and trayer will still stay the same size so there will be a big gap between the right side of the bar and the right side of the screen.If I reload XMonad, trayer will go to the right place but dzen will stay the same size.Is there a way to specify the trayer size dynamically using percentage?-- Command to launch the bar. myBar = "dzen2 -bg black -fg white -ta l -w 1352 -x 0" conkyBar = "conky -c ~/.xmon (HowTos)