diff options
author | Patrick Spek <p.spek@tyil.nl> | 2022-06-27 09:01:12 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2022-06-27 09:01:12 +0200 |
commit | 802ef6bdb6ab23df72708c39e653d17321530126 (patch) | |
tree | ada343ff520bad8d2aef3bce074e5e7970e40e98 /.local | |
parent | d29d2cf6c9d3ce5e54917c088bc9bf874b1c0775 (diff) |
Check if mpc even exists on the running machine
Diffstat (limited to '.local')
-rw-r--r-- | .local/etc/wrapper.d/mpv.rc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/.local/etc/wrapper.d/mpv.rc b/.local/etc/wrapper.d/mpv.rc index 982eb6b..de66126 100644 --- a/.local/etc/wrapper.d/mpv.rc +++ b/.local/etc/wrapper.d/mpv.rc @@ -1,12 +1,10 @@ #!/bin/sh wrap_before() { - if mpc status | awk 'NR==2 { print }' | grep -iq playing + if command -v mpc > /dev/null && mpc status | awk 'NR==2 { print }' | grep -iq playing then wrap_run mpc pause > /dev/null WRAPPER_X_MPD_PAUSED="yes" - else - mpc status | awk 'NR==2 { print }' | grep -iq playing fi } |