diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-18 15:45:02 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-07-18 15:45:02 +0200 |
commit | 054955db38bb571c294b5d86c78639e3b1091031 (patch) | |
tree | 6dd4b42405c4693cd35ad6b7d07b163cfcb584f5 /.local/bin/webview.sh | |
parent | Added emacs config (diff) | |
download | dotfiles-bsd-054955db38bb571c294b5d86c78639e3b1091031.tar.gz dotfiles-bsd-054955db38bb571c294b5d86c78639e3b1091031.tar.bz2 dotfiles-bsd-054955db38bb571c294b5d86c78639e3b1091031.tar.xz dotfiles-bsd-054955db38bb571c294b5d86c78639e3b1091031.tar.zst dotfiles-bsd-054955db38bb571c294b5d86c78639e3b1091031.zip |
Added scripts
Diffstat (limited to '')
-rwxr-xr-x | .local/bin/webview.sh | 18 |
1 files changed, 18 insertions, 0 deletions
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 |