From 13aef30648f3b6b0c6758c3ed4d2c3d9cab800f2 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Tue, 24 Nov 2015 18:10:46 +0100 Subject: [PATCH] hey rifle handles image urls the right way --- config/ranger/rifle.conf | 1 + local/bin/open.sh | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/config/ranger/rifle.conf b/config/ranger/rifle.conf index 5381d34..19f9ad6 100644 --- a/config/ranger/rifle.conf +++ b/config/ranger/rifle.conf @@ -162,6 +162,7 @@ ext djvu, has atril, X, flag f = atril -- "$@" #------------------------------------------- # Image Viewing: #------------------------------------------- +mime gif$, has mpv, X, flag f = mpv -loop -- "$@" mime ^image, has sxiv, X, flag f = sxiv -- "$@" mime ^image, has feh, X, flag f = feh -- "$@" mime ^image, has mirage, X, flag f = mirage -- "$@" diff --git a/local/bin/open.sh b/local/bin/open.sh index 28ce2de..b7932fe 100755 --- a/local/bin/open.sh +++ b/local/bin/open.sh @@ -1,5 +1,2 @@ #!/bin/bash -curl -IL $1 \ - | grep Content-Type \ - | tail -n 1 \ - | grep image && feh $1 || xdg-open $1 +rifle "$1" | grep 'cannot open' && xdg-open "$1"