summaryrefslogtreecommitdiff
path: root/desktop/.local/share/barmodules/qmmp.sh
blob: bb7f8496333469090c5422f894755dc9ec33f54c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
pidof qmmp 2> /dev/null > /dev/null
if [ $? -eq 0 ]; then
	echo -n "  |  "
	nowplaying=$(qmmp --nowplaying '%p - %a: %t')
	if [ ${#nowplaying} -gt 80 ]; then
		echo -n "${nowplaying:0:77}... "
	else
		echo -n "$nowplaying"
	fi
	echo -n "$(qmmp --status | head -1)"
fi