Looking for a way to have computer specific activation groups

I primarily use BTT for showing/hiding apps with a keyboard shortcut (option+f shows calendar, option+m shows messages, etc), and I use 2 different computers between work and home.

I also have some overlapping shortcuts. So at work, I like option+d to map to my bug tracking tool, and at home option+d maps to Discord.

Is there a way to activate a work group vs home group according to which computer is in use?

Currently I'm using the customVariable4, where if customVariable4 == "home", the Home group is active and if customVariable4 == "work", the Work group is active.

However, that often seems to get reset, so I'll attempt option+d, it does nothing, then I run a shortcut to set customVariable4 to either work or home, and then the keymap works again.

Not sure if that is getting reset due to syncing BTT settings via iCloud so one computer overwrites the others current setting or if the variable just gets reset periodically or what...

Any tips on how I could handle this setup more gracefully?

I'm not entirely sure, but with different presets “work” and “home” this should be possible. Just activate one of them at a time.

Instead of using CAGs for this I would recommend to create two separate presets (or three if you have some base settings that apply to both of your setups). This is exactly what presets are made for.

Then in the "Automations, Named & Other Triggers" section use the "After Launch On Mac With Serial Number" action to enable a specific set of presets:

//edit: ah sorry, it's the same Mac. I initially thought you were using it on two separate Macs. In this case maybe you can set up some keyboard shortcut that triggers the switch to preset action to switch between your Work and Private setups?

Thanks! I'll give that a shot. I did try that before posting, but it wasn't working...must have had something else configured incorrectly. But it seems to be working now.