From 02e347dffd0ca14ca5dfc23285e24e2107d51782 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Thu, 15 Oct 2015 00:40:06 -0500 Subject: Create status.sh --- i3/status.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 i3/status.sh diff --git a/i3/status.sh b/i3/status.sh new file mode 100644 index 0000000..ce3c08a --- /dev/null +++ b/i3/status.sh @@ -0,0 +1,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 + + -- cgit v1.2.3