#!/bin/bash # Comprobar si hay algún reproductor activo status=$(playerctl status 2>/dev/null) if [[ $? -ne 0 ]]; then echo "" # No mostrar nada si no hay reproductor exit 0 fi # Obtener metadatos artist=$(playerctl metadata artist 2>/dev/null) title=$(playerctl metadata title 2>/dev/null) playback_status=$(playerctl status) # Iconos según el estado if [[ "$playback_status" == "Playing" ]]; then play_icon=" " else play_icon="" fi # Botones echo "{\"text\": \" $play_icon  \", \"tooltip\": \"$artist - $title\"}"