Longpress on apps to quit apps when the dock widget is opened in the Touch Bar


Is there a way to use the long press action on the "dock Touch Bar" to quit the app rather than to show the app's expose?

Thank you in advance!

id like this too...


@Andreas_Hegenberg ???

1 Like


1 Like

Unfortunately it is not possible, afaik, to quit an app using the Dock Widget through a long press. Long press functions are basically named triggers set in the Named & Other Triggers that are activated through a long press. These can be defined for the App Switcher Widget though.

I use the Dock widget with a modifier key inside a group. All the other actions do not care about modifiers at all, whereas the default widget brings up the app I chose (displayed if no modifier key is used). No special behaviour regarding the modifier keys for this widget. I have therefor set a second widget with the same specifications in displayed apps and size, but it shows up only when the modifier key is hit. This way none of the other buttons in the group dis/appear, but the widget changes it behaviour (the widget that brings up the selected app disappears, whereas the "quit app Widget" appears - but as they are the same in terms of size and app behaviour, they do not change visually (- unless the amount of displayed apps is larger than the chosen size of the widget, but this is a detail).
The actions to quit the app you hit are the following:

And the script to quit the app:

tell application (path to frontmost application as text)
end tell

I added a small red/green vertical line before the widget to get a visual feedback of what function is active.

1 Like