Touch Bar Preset to toggle AirPlay Screen Mirroring. I have been able to hack together this AppleScript preset. Button Icon will change blue when airplay is active, and on press, will toggle on/off airplay.
This preset requires you to change the AppleScript Action script/code to reflect the NAME of your AppleTV (same name in Display Menu) or other AirPlay video device. Also requires you have the "Show mirroring options in the menu bar when available" selected in MacOS System Preferences | Display Preferences.
Still working out the bugs... Sometimes you need to press twice to activate or deactivate AirPlay Mirroring.
Preset Download: Updated: 05/14/2020
K2 AirPlay Mirroring.bttpreset (4.1 MB)
AirPlay Icon on Far Left:
NOTE: Requires you have the Display Menu in MacOS Menu Bar
Enjoying This Preset? PayPal.me/K2DesignLab