MacBook – Print to touch bar

macbook protouch-bar

Is there a way to print things to the touchbar, preferably with the terminal? I have been trying to find documentation but I can't find any.

Best Answer

Some AppleScript

-- https://forum.latenightsw.com/t/set-touchbar-to-show-f-keys/638/8
set touchBar to true
try
    set touchBarText to do shell script "pgrep TouchBarServer"
on error
    set touchBar to false
end try
if touchBar is true then
    set fkeysSet to true
    try
        set fkeysSetText to do shell script "defaults read com.apple.touchbar.agent.plist | grep YOUR.APP.PREFS.HERE | grep functionKeys"
    on error
        set fkeysSet to false
    end try
    if fkeysSet is false then display dialog "Follow the instructions, etc."
end if