22 lines
562 B
Bash
Executable File
22 lines
562 B
Bash
Executable File
#!/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
|