summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.local/bin/mpv-view.pl2
-rwxr-xr-x.local/bin/webview.sh10
2 files changed, 8 insertions, 4 deletions
diff --git a/.local/bin/mpv-view.pl b/.local/bin/mpv-view.pl
index 3e17dd7..a66a75b 100755
--- a/.local/bin/mpv-view.pl
+++ b/.local/bin/mpv-view.pl
@@ -53,6 +53,7 @@ sub main
}
$size = get_size();
if ($size != 0) {
+ print 'mpv --ytdl-format=[height<=' . $size . '] ' . $ARGV[0] . "\n";
exec(
'mpv',
'--ytdl-format=[height<=' . $size . ']',
@@ -60,6 +61,7 @@ sub main
);
}
else {
+ print 'mpv ' . $ARGV[0] . "\n";
exec(
'mpv',
$ARGV[0]
diff --git a/.local/bin/webview.sh b/.local/bin/webview.sh
index 6975853..62cec30 100755
--- a/.local/bin/webview.sh
+++ b/.local/bin/webview.sh
@@ -1,8 +1,8 @@
#!/usr/local/bin/dash
ext="${1##*.}"
-mpvFiles="mkv mp4 gif"
-sxivFiles="png jpg jpeg jpe"
+mpvFiles="mkv mp4 gif"
+sxivFiles="png jpg jpeg jpe xpm"
wgetFiles="flac mp3 mp3?source=feed opus pdf doc docx"
cd ~/Downloads || exit
@@ -12,7 +12,9 @@ if echo "$sxivFiles" | grep -w "$ext" > /dev/null; then
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 &
+ clear
+ fetch "$1"
else
- nohup qutebrowser "$1" > /dev/null &
+ clear
+ mpv-view.pl "$1"
fi