mpd, weather and mail blocks improved

This commit is contained in:
Luke Smith
2018-06-15 21:44:52 -04:00
parent e85bf27495
commit 748e984985
4 changed files with 14 additions and 10 deletions

View File

@@ -6,8 +6,8 @@ if [[ -n $BLOCK_INSTANCE ]]; then
fi
filter() {
tr '\n' ' ' | grep -Po '.*(?= \[playing\])|paused' | tr -d '\n'
}
sed 2q | tac | sed -e "/volume:/d;s/\[paused\].*/<span color=\"gray\">/g;s/\[playing\].*/<span>/g" | tr -d '\n' | sed -e "s/$/<\/span>/g"
}
case $BLOCK_BUTTON in
1) mpc $password status | filter && $TERMINAL -e ncmpcpp & disown ;; # right click, pause/unpause