diff options
| author | Robert Günzler <r@gnzler.io> | 2021-07-29 23:49:44 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-07-29 23:50:00 +0200 |
| commit | e3a498bad8f10bd2b9ea576edeb906ba23b3fcbb (patch) | |
| tree | 886464835540faaf817a839baff1619522a1cc24 /bin/mpvplay | |
| parent | 71eac60b33bb68eb6849cb4f0a04f172376bde4d (diff) | |
bin/mpvplay: show notification if mpv fails
Diffstat (limited to 'bin/mpvplay')
| -rwxr-xr-x | bin/mpvplay | 9 |
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 |