I want to create a script and bind it to a keyboard shortcut which let's me do the following:
- If the focused program displays a
.texfile and open this with an editor
- Do nothing (or display a message) if the file is not a pdf file or the tex file doesn' exist.
My problem is how to get the filename of the file opened in the focused window so that it works with every pdf reader. Any suggestions of how I could do this?
I am using
xmonad if this matters.