I'm trying to make BTT display a custom touchbar for a java app (specifically Minecraft). I have used the "select running app" option and chosen "java", and configured a touchbar, but it never appears. Other app-specific touchbars all work fine.
There seem to be several discussions around this subject, some of which suggest that this is possible, but I have yet to find a solution that works for me. Any help/advice would be much appreciated.
I have also since found this page, but it does not work (with Minecraft 1.13 at least, this release also breaks the icon and display name, so I expect the BTTAppBundleIdentifier has changed - but can't figure out for the life of me how to look up the current BTTAppBundleIdentifier value.
So I tried to modify the JSON above to match a BTTAppBundleIdentifier of "NULL", which let me add it, but did not work (trying to match the string NULL with an actual null value I assume), and trying to add the JSON with an actual JSON null just ignored my paste request (which makes sense I guess, as it's not very normal).
I should have mentioned that I tried that one first, and although it let me select java, when going to Minecraft the TouchBar widgets don't come up unfortunately
Is mine craft really started or is it still in the "launcher"? (I think you would need to select not the launcher but the actual game).
I can try it maybe tomorrow.
"java": Me selecting the running program in BTT (ie: after actually starting it from the launcher)
"Minecraft" (the first one): This is the launcher app, and this works as expected (I'm just using Widgets for my testing at this stage)
"Minecraft" (the second one, with no icon): this is from pasting in the JSON on the linked GitHub issue
"MinecraftJavaNull": This is me hacking the JSON to match the string "NULL" for the BTTAppBundleIdentifier attribute
I was obviously hoping one of these combinations would work, but so far no luck. If you have any other thoughts, or ways I could mess with the JSON, I'm happy to have a crack, but so far have not been able to find much info about it (eg: matching on process path or similar, maybe matching on all processes in a process/app tree?)
Thanks @wodan74, I tried that by pasting JSON config directly (see the github issue linked), unfortunately it didn't work.
I'm guessing that the Java with Minecraft has changed since v1.13 or something and the AppBundleIdentifier has changed (or is no longer there based on the output of lsappinfo).
Here is the preset I am using to get some basic Minecraft functions on the touch bar, namely F3 for debug and fullscreen. It works with Minecraft 1.14.2 and the current latest launcher (excluding betas). Although it works, it is rather hacked together. It checks whether the processes "java" and "Minecraft Launcher" are running independently, so theoretically if you had Minecraft open as well as another java process, these touch bar buttons would apply to the other java process as well. If there is a better way for the current/future versions of Minecraft, please let me know!!! Minecraft.bttpreset (58.7 KB)
Here's a much better preset. The newest version of Minecraft is currently 1.14.3, so it uses a conditional activation group that is: executable path matches\/Users\/.*\/Library\/Application Support\/minecraft\/runtime\/jre-x64\/jre.bundle\/Contents\/Home\/bin\/java
Here's the BTT Preset that includes two buttons, one for toggling the debug screen and one for toggling macOS native fullscreen.
Make sure to replace * with your user folder name. Also, check that java is installed; go to terminal and type in ls -a ~/Library/Application\ Support/minecraft/runtime/jre-x64/jre.bundle/Contents/Home/bin
If you see “java” then this present should work if you replace the asterisk.
This preset works great. I improved it a little bit, but it seems that this community requires participation karma before I can send attachments. ¯_(ツ)_/¯
here's a screenshot I guess. The 3-step sequences have key-down on the first F3's, and key-up on the last F3's. Copy/paste was buggy and I had to reset that each time. I don't see why this preset won't work with any version of minecraft, as long as the JRE is at the path specified. Tested as working on 1.15.2.