Binary package “xcwd” in ubuntu jammy
print the current working directory of the focused window
xcwd is a simple tool which prints the current working directory of the
focused window. It's useful for launching applications directly into the
same directory as the focused application.