mirror of
https://github.com/HerrCraziDev/dotfiles.git
synced 2025-12-16 02:46:17 +01:00
Fail clean if playerctl not installed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user