summaryrefslogtreecommitdiffstats
path: root/.scripts/i3mpd
diff options
context:
space:
mode:
Diffstat (limited to '.scripts/i3mpd')
-rwxr-xr-x.scripts/i3mpd4
1 files changed, 2 insertions, 2 deletions
diff --git a/.scripts/i3mpd b/.scripts/i3mpd
index b2a34bb..7cf473d 100755
--- a/.scripts/i3mpd
+++ b/.scripts/i3mpd
@@ -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