Monitor Specific Buttons

Buttons that show up only when an external monitor is attached, specifically looking for a way to have external monitor brightness buttons appear only when the monitor is attached. I did some thorough searching and couldn't find any function to do so.