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.
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
.