nixos-config/scripts/playerctl-status
2023-09-12 00:43:56 -03:00

11 lines
261 B
Bash

#!/bin/sh
PLAYERCTL="playerctl --ignore-player=mpd"
test "$(LC_ALL=C $PLAYERCTL status)" = "Playing" \
&& printf " %s" "$($PLAYERCTL metadata title)" \
&& test -n "$($PLAYERCTL metadata artist)" \
&& printf " - %s" "$($PLAYERCTL metadata artist)"
echo ""