Action dependent on item under the mouse

So what I want to do is have a one-click solution to showing a folder in my dock in Finder. So I put the mouse over the folder in my dock, two-finger click, and it is revealed in Finder.

I'm sure I could figure out the conditions for the trigger and whatnot but where I'm stuck is having that action be aware of which folder I'm clicking. Sorta how when you use a trigger to close a window, it know what window is under your mouse.

I’m currently not on my Mac to test, but I think cmd+click will take you to the folder

Ah actually it's cmd+opt+click to open the hovered folder

@Andreas_Hegenberg nice. Good lookin out. Still, I’m curious if there is a way to create triggers that behave the way I’m describing.