readlink -e /proc/$(xprop -id $(xdotool getactivewindow) _NET_WM_PID | awk '{print $3}')/cwd
Inspired by: https://superuser.com/questions/1116636/open-a-terminal-from-any-direct…