nixos-config/scripts/playerctl-status
2024-08-17 11:47:48 -03:00

11 lines
261 B
Bash
Executable file

#!/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 ""