You can use various properties to match certain clients, such as c.class
or c.name
(see here for a full list of properties on a client
object).
To find out the value to match against, run xprop
in a terminal and click on your polybar.
It will then list various properties where WM_NAME
maps to c.name
and WM_CLASS
will list c.instance
and c.class
in that order, separated by a comma.
For your use case, matching against c.class
would be the recommended approach, as this translates to "match against any instance of the application polybar". It should then look similar to this:
if c.class ~= "polybar" then
c.shape = gears.shape.rounded_rect
end
where you replace polybar
with the value you got from xprop
.