Enhanced Dock for macOS

@derhausmeister i didnt add a global setting for that because it reduces "snappiness". but you can disable notifications with adding "//" to beginning of setTimeout(e=>NT(),150) in every real javascript action in BTT > Automations & Named & Other presets > Enhanced dock

but i dont recommend to disable hud because it shows you is gesture correctly reconized or not

Hi, thanks for making this!
Believe it or not, but not everyone uses English as their OS language, and that seems to stop many triggers for working. I'm using Polish and while Safari is called the same, Music is called Muzyka, Messages is called WiadomoΕ›ci, etc. How/where can I change these names so actions are triggered properly instead of getting information they're not supported?

@spitfire i will try to use app paths to make preset a bit more universal but not sure it will fix fully. code already uses app paths on some parts but uses dock icon title on other parts

BTT > Automations & Named & Other triggers > Enhanced dock Actions > Primary Action Dock

can you replace this lines

}else if(N=="Music"||N=="Spotify"||N=="TV"){
		AS(`tell app "`+N+`" to `+(S?`playpause`:`play (next track)`))

to

}else if(P=="/System/Applications/Music.app"||N=="Spotify"||N=="TV"){
		AS(`tell app "`+P+`" to `+(S?`playpause`:`play (next track)`))

press verify and save

Music should be functional for primary action with this change

if it solves i will try to fix other ones

1 Like

Thank, that worked really well!
It's a good idea, but please keep in mind there's a potential downside (at least to some apps). While a system app like Music will always be in /System/Applications, some people may put their applications somewhere else than in /Applications. Some may be in ~ /Applications, and there's now a new option to Download and install large apps to a separate disk - Apple Support

i assume 3rd party apps doesnt use localization on their names

personally I solve the localization problem by using the bundle identifier of an app instead of the name:

 tell application id "com.google.Chrome" to set currentTabUrl to URL of active tab of front window
1 Like

@Andreas_Hegenberg i get application info from hovered UI element but AXDockItem doesnt have an property for bundle identifier. AXDockItem has a property for url(app path). i think its the fastest way to launch script. otherwise i have to convert path to bundle identifier that will add additional step. at least on my script. i didnt fully edit script yet but that will be optional path for me if i got any problems. thanks

1 Like

ah in that case your approach should be fine!

Makes sense. 3rd pary apps don't use generic names like "Mail".
Do you plan to update the preset for the system apps though?
So far I've noticed Calculator, Calendar, Clock, Contacts, Mail, Maps, Messages, Notes, Podcast Preview, Reminders, Script Editor, Shortcuts, Stickies, Voice Memos have localized names and won't work with the preset. That's pretty much most of the Apple's built-in apps.

First off I want to say thank you for this, these gestures are great and make the dock so much more versatile. I'm not familiar with Javascript and am unable to decode a specific portion of the edockpri trigger to make it perform a different action.

	if(N=="Finder"){
		SK("58,55,45")//CMP+OPT+N

I believe this is some javascript key code event to run CMD+OPT+N in Finder, however, I'd like it to run CMD+T instead as currently it just opens multiple Finder windows rather than new tabs, despite my Finder settings set to open folders in new tabs.

Any help would be greatly appreciated.

you can use this codes as reference

Thank you, this is exactly what I needed!

I was able to adjust the behavior to my liking by modifying the section of code to the following:

if(N=="Finder"){
		SK("55,17")//CMD+T