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() {
|
get_imageviewer() {
|
||||||
if command -v nsxiv 1>/dev/null 2>&1; then
|
for cmd in nsxiv sxiv feh imv vimiv; do
|
||||||
echo nsxiv
|
if command -v "$cmd" 1>/dev/null 2>&1; then program="$cmd"; break; fi
|
||||||
elif command -v sxiv 1>/dev/null 2>&1; then
|
done
|
||||||
echo sxiv
|
echo "$program"
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
Loading…
Reference in a new issue