summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2021-07-29 23:49:44 +0200
committerRobert Günzler <r@gnzler.io>2021-07-29 23:50:00 +0200
commite3a498bad8f10bd2b9ea576edeb906ba23b3fcbb (patch)
tree886464835540faaf817a839baff1619522a1cc24
parent71eac60b33bb68eb6849cb4f0a04f172376bde4d (diff)
bin/mpvplay: show notification if mpv fails
Diffstat (limited to '')
-rwxr-xr-xbin/mpvplay9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/mpvplay b/bin/mpvplay
index 9c92516..c8078c5 100755
--- a/bin/mpvplay
+++ b/bin/mpvplay
@@ -16,4 +16,11 @@ notify-send \
 # fi
 
 # exec xap add -n "${uri}"
-exec mpv "${uri}"
+if ! mpv "${uri}"; then
+	notify-send \
+		-i "$(iconez -n mpv | grep 32)" \
+		-a mpv \
+		-c error \
+		'failed' \
+		"${uri}"
+fi