Since I’m using AwesomeWM as my WM of choice and I try to keep my app list to minimal, I don’t really have graphical PDF client such as Evince. Instead, for my PDF reading requirements Zathura is a perfect fit.

This all works fine when I’m specifying zathura FILENAME either from AwesomeWM Run menu or from command line, but when clicking on PDF file in some XDG respecting app such as Telegram desktop, that meant that PDF would open in GIMP ?

In order to resolve that I had to change XDG mime which was achieved with this super-duper one-liner:

for type in pdf x-pdf fdf xdp xfdf pdx; do xdg-mime default zathura.desktop application/$type; done