update music

This commit is contained in:
NaiJi ✨ 2024-03-10 18:58:05 +04:00
parent 01c7c5624e
commit 7affbff404
1 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,10 @@
while : while :
do do
echo "$(mpc current | awk '{ if ( length($0) > 80 ) { printf substr($0, 1, 80); print "..." } else { print $0; }}') " >/home/naiji/.local/share/i3status/now-playing current="$(mpc current)"
sleep 1 if [ -n "$current" ]
then
echo "$(echo "$current" | awk '{ if ( length($0) > 80 ) { printf substr($0, 1, 80); print "..." } else { print $0; }}') " >/home/naiji/.local/share/i3status/now-playing
sleep 1
fi
done done