Add some scripts

This commit is contained in:
2021-02-16 01:07:53 +01:00
parent 2684fbfae2
commit 7d9c45878f
7 changed files with 120 additions and 0 deletions

18
scripts/tmux/mpd Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
isPlaying() {
if mpc status | grep playing >/dev/null
then
echo -e "▶"
else
echo -e "⏸"
fi
}
while true; do
PLAYING=$(isPlaying)
TITLE=$(mpc --format '[%artist% - ]%title%' | /usr/bin/head -n 1)
TIME=$(mpc | awk '(NR==2){print $3}')
echo -e "$PLAYING $TITLE | [$TIME]"
sleep 1
done