GermainZ / xdg-desktop-portal-termfilechooser

xdg-desktop-portal backend for choosing files with your favorite file chooser
MIT License
71 stars 16 forks source link

Don't hardcode kitty & ranger #9

Open nani8ot opened 11 months ago

nani8ot commented 11 months ago

Hardcoding /usr/bin/kitty and /usr/bin/ranger breaks on non-FHS compliant Linux distributions, like NixOS.

This PR uses command -v kitty which is part of POSIX sh and returns the pathname or command executed by the shell. On Arch Linux this'd be /usr/bin/kitty and on my system it's /run/current-system/sw/bin/kitty.