From b08ac49ef0f837a83304e2314b840f5ccbd37d04 Mon Sep 17 00:00:00 2001 From: jon Date: Sat, 23 Feb 2019 14:34:48 -0600 Subject: [PATCH] Initial commit, just added the play/pause mpc stuff --- jstat | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 jstat diff --git a/jstat b/jstat new file mode 100755 index 0000000..e741300 --- /dev/null +++ b/jstat @@ -0,0 +1,21 @@ +#!/bin/bash + +xsetroot -name "Loading ..." + +while (true); do + #set date: 04.03 15:22 + #mem=$(free -m | grep Mem | awk '{print $7}') + #loadavg=$(cat /proc/loadavg | awk '{print $1 " " $2 " " $3}') + #xsetroot -name "$mem | $loadavg | $timedate" + check_play=$(mpc status | grep "playing") + if [ ! -z "$check_play" ]; then + play=$(mpc status | head -n 1) + vol="[$(mpc vol | cut -c 8-)]" + else + vol="" + play="" + fi + timedate=$(date +"%m.%d %H:%M") + xsetroot -name "$vol $play | $timedate" + sleep 0.5; +done