add wrapper script to open browser or image viewer

This commit is contained in:
Daniel Gultsch 2016-03-28 15:05:40 +02:00
parent e81406b144
commit 285b237606

10
openbrowser.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
URL=$1
BROWSER=firefox
JAVA=/usr/lib/jvm/java-8-openjdk/bin/java
IMAGE_DOWNLOADER=/home/daniel/Projects/ImageDownloader/target/ImageDownloader-0.1.jar
if [ ${URL: -97:1} == "#" ]; then
$JAVA -jar $IMAGE_DOWNLOADER $URL | feh -. -
else
$BROWSER $URL
fi