Show running apps and quit one using Stream Deck

I am setting up my Stream Deck using BetterTouchTool.

I want to create a button. If I click the button, I want Stream Deck to show icons of all the apps currently run on my Mac. If I click on any of those app icons, that particular app should quit and I should get a notification on the mac that the app has been quit.

Will this ever be possible using BTT?

I know that I can get a list of currently running apps using this script:

#!/bin/bash
osascript -e 'tell application "System Events" to get the name of every process whose background only is false'

Then use this to quit an app:

#!/bin/bash
osascript -e 'tell application "'$1'" to quit'

But not very sure how to tie them all together :man_shrugging:t4: