summaryrefslogtreecommitdiff
path: root/i3/status.sh
blob: ce3c08a9aacbea2f14a3f0786f6f024845a40496 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# shell script to prepend i3status with more stuff

i3status | while :
do
	read line
	MPCSTAT=`mpc | grep -v '^volume:'`
	if [ -z "${MPCSTAT}" ]; then
		echo "$line" || exit 1
	else
		MPCSTAT=`echo "${MPCSTAT}" | sed 's,  *, ,g; 1h;1d;2G' | paste -d' ' -s -`
		echo "${MPCSTAT} | $line" || exit 1
	fi
done