This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-dotfiles/user/configs/wayland/eww/config/scripts/mpd_current_song.sh

19 lines
344 B
Bash
Raw Normal View History

2024-01-11 03:47:13 +00:00
#!/usr/bin/env bash
currentsong=""
state=""
while true; do
state=$(mpc status %state%)
current_song=$(mpc current)
if [[ $state == "playing" ]]; then
echo "$current_song"
elif [[ $state == "paused" && $current_song ]]; then
echo "󰏤 $current_song"
else
echo " stopped"
fi
mpc idle player &> /dev/null
done