Refactor default image viewer finding
This commit is contained in:
parent
94a2dfcef7
commit
5a6c826ca5
1 changed files with 4 additions and 11 deletions
15
uoeia
15
uoeia
|
@ -86,17 +86,10 @@ dereference() {
|
|||
}
|
||||
|
||||
get_imageviewer() {
|
||||
if command -v nsxiv 1>/dev/null 2>&1; then
|
||||
echo nsxiv
|
||||
elif command -v sxiv 1>/dev/null 2>&1; then
|
||||
echo sxiv
|
||||
elif command -v feh 1>/dev/null 2>&1; then
|
||||
echo feh
|
||||
elif command -v imv 1>/dev/null 2>&1; then
|
||||
echo imv
|
||||
elif command -v vimiv 1>/dev/null 2>&1; then
|
||||
echo vimiv
|
||||
fi
|
||||
for cmd in nsxiv sxiv feh imv vimiv; do
|
||||
if command -v "$cmd" 1>/dev/null 2>&1; then program="$cmd"; break; fi
|
||||
done
|
||||
echo "$program"
|
||||
}
|
||||
|
||||
main() {
|
||||
|
|
Loading…
Reference in a new issue