Fail clean if playerctl not installed

This commit is contained in:
2021-09-15 19:18:49 +02:00
parent 4572645217
commit cdbd5b1c66

View File

@@ -1,5 +1,9 @@
#!/bin/sh
if ! command -v playerctl; then
return 1
fi
playing=$(playerctl -a metadata --format='{{status}}:{{artist}} - {{title}}' | grep 'Playing' | sed -e "s/^Playing://")
if [ -n "$playing" ]; then