Macro to hide UI based on whether my weapon is put away or not?

Is it possible to have a macro that would toggle my weapon and parts of the UI at the same time? Or is there an addon that can do this?

I would love to have a way to have only the minimap show (or no UI at all if that is easier) when my weapon is away. Then have my action bars and such appear when I pull the weapon out/start an encounter.

Iā€™m not familiar with an addon that would work off of holstering/un-holstering a weapon, but I think what you want is for this to work if you are in combat or not. If that is the case various addons support this natively.

One that may interest you is Kong, it allows you to select frames in the UI and toggle their visibility based on conditions you specify, mouse over and other options. Its available on Curse Forge.

To make frames visible when in combat, select each frame you want hidden, check hide and use the macro option and specify [combat]. I also specify the macro [mod] which will show the frame when you press alt, ctrl or shift. By default the frame will be visible if you mouseover the frame or enter a vehicle. You can also create mouse over groups so that when you mouse over one frame all the frames in the group become visible. Kong also provides several built in options, such as making the frame visible when a your health drops below a specified percentage.

1 Like