30 lines
666 B
Bash
Executable File
30 lines
666 B
Bash
Executable File
buildClock() {
|
|
echo -n $(date "+%A, %e %B, %k:%M:%S")
|
|
}
|
|
|
|
getVolume() {
|
|
echo -n "$(amixer get Master | cut -d$'\n' -f 5 | cut -d ' ' -f 8) $(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)%%"
|
|
}
|
|
|
|
getMPD(){
|
|
echo -n "♫ "
|
|
if [ "$(mpc | wc -l)" -gt 1 ]; then
|
|
echo -n "$(mpc | cut -d$'\n' -f1) | $(mpc | cut -d$'\n' -f2)"
|
|
fi
|
|
}
|
|
|
|
getNET(){
|
|
echo -n "$(curl -s http://canihazip.com/s)"
|
|
}
|
|
|
|
buildBar () {
|
|
while true
|
|
do
|
|
echo "$(getVolume) $(getMPD) %{c}$(buildClock)%{r}$(getNET)"
|
|
sleep 1
|
|
done
|
|
}
|
|
|
|
buildBar | lemonbar -p -g "1872x20+24+8" -B "#181b20" -F "#9b9081" -f -gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso10646-1
|
|
|