summaryrefslogtreecommitdiffstats
path: root/.local/bin/linkview
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/linkview')
-rwxr-xr-x.local/bin/linkview18
1 files changed, 16 insertions, 2 deletions
diff --git a/.local/bin/linkview b/.local/bin/linkview
index d39c116..1141c9d 100755
--- a/.local/bin/linkview
+++ b/.local/bin/linkview
@@ -73,13 +73,20 @@ sub open_link
if (not $pid) {
setsid();
close_io();
+ system(
+ NOTIFYSEND_PATH,
+ '-u', 'low',
+ '-t', '2000',
+ 'playing media',
+ ' playing <b>' . $url . '</b>'
+ );
if (system(MPV_PATH, $url) != 0) {
exec(
NOTIFYSEND_PATH,
'-u', 'critical',
'-t', '10000',
'playback failed',
- ' Failed to open <b>' . $url . '</b>'
+ ' failed to open <b>' . $url . '</b>'
);
}
return;
@@ -145,7 +152,7 @@ sub open_link
if (not $pid2) {
(undef, undef, $ret) = capture {
if ($quality eq 'uncap') {
- system(YTDL_PATH . ' -f \'bestvideo*+bestaudio/best\' --newline --add-metadata ' . $url . ' >' . $tmpfile);
+ system(YTDL_PATH . ' --newline --add-metadata ' . $url . ' >' . $tmpfile);
}
elsif ($quality eq '1440') {
system(YTDL_PATH . " -f '308+140' --newline --add-metadata " . $url . ' >' . $tmpfile);
@@ -357,6 +364,13 @@ sub open_link
exec(COPYQ_PATH, "copy", $url);
}
}
+ system(
+ NOTIFYSEND_PATH,
+ '-u', 'low',
+ '-t', '2000',
+ 'clipped url',
+ ' clipped url'
+ );
return;
}
return;