From 054955db38bb571c294b5d86c78639e3b1091031 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 18 Jul 2020 15:45:02 +0200 Subject: Added scripts --- .local/bin/webview.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 .local/bin/webview.sh (limited to '.local/bin/webview.sh') diff --git a/.local/bin/webview.sh b/.local/bin/webview.sh new file mode 100755 index 0000000..6975853 --- /dev/null +++ b/.local/bin/webview.sh @@ -0,0 +1,18 @@ +#!/usr/local/bin/dash + +ext="${1##*.}" +mpvFiles="mkv mp4 gif" +sxivFiles="png jpg jpeg jpe" +wgetFiles="flac mp3 mp3?source=feed opus pdf doc docx" + +cd ~/Downloads || exit + +if echo "$sxivFiles" | grep -w "$ext" > /dev/null; then + nohup sxiv "$1" > /dev/null & +elif echo "$mpvFiles" | grep -w "$ext" > /dev/null; then + nohup mpv --loop --quiet "$1" > /dev/null & +elif echo "$wgetFiles" | grep -w "$ext" > /dev/null; then + nohup st -e wget "$1" > /dev/null & +else + nohup qutebrowser "$1" > /dev/null & +fi -- cgit v1.2.3