diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-12-12 00:10:31 +0100 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-12-12 00:10:31 +0100 | 
| commit | 94c9b362faa414e7068f60184e3d01a47b96b823 (patch) | |
| tree | 6bb680bf79ccbf2e74954fc9d74bac8538aba863 | |
| parent | a365e6c8dc75825c993f0bc7b14734032e57096e (diff) | |
added handling file:// scheme
| -rwxr-xr-x | bin/guiscripts/linkhandler | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/guiscripts/linkhandler b/bin/guiscripts/linkhandler index aeec202..fb5a3ea 100755 --- a/bin/guiscripts/linkhandler +++ b/bin/guiscripts/linkhandler @@ -11,6 +11,12 @@ test -z "${url:=$1}" &&  dunstify "linkhandler" "<b>handling</b> $url"  case "$url" in +    file://*) file="${url##file:/}" +        case "$(file -bi "$file" | cut -f1 -d'/')" in +            audio|video) mpv "$file" ;; +            image) imv "$file" ;; +	    *) xdg-open "$file" ;; +        esac ;;  	*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtube.com/shorts*|*youtu.be*|*hooktube.com*|*bitchute.com*|*videos.lukesmith.xyz*|*odysee.com*)  		setsid -f mpv --quiet --ytdl --ytdl-raw-options="format-sort=res:720" "$url" > /dev/null 2>&1 ;;  	*png|*jpg|*jpe|*jpeg|*gif)  | 
