From 674f8e1a7a17720031ae7ac66051d6c117363bd9 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 4 May 2020 17:24:39 -0400 Subject: [PATCH] =?UTF-8?q?music=20filter=20uses=20=E2=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .local/bin/statusbar/music | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.local/bin/statusbar/music b/.local/bin/statusbar/music index 1b18776..0cb9730 100755 --- a/.local/bin/statusbar/music +++ b/.local/bin/statusbar/music @@ -1,9 +1,6 @@ #!/bin/sh -filter() { - [ "$(pidof dwmblocks)" ] && sed "/^volume:/d" | tac | sed -e "s/\\&/&/g;s/\\[paused\\].*/\\[paused\\] /g;s/\\[playing\\].*//" | tr -d '\n' | sed -e "s/\..*$//g" \ - || sed "/^volume:/d" | tac | sed -e "s/\\&/&/g;s/\\[paused\\].*//g;s/\\[playing\\].*//g" | tr -d '\n' | sed -e "s/$/<\\/span>\n/g" - } +filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d" | tr '\n' ' ' | sed 's/ $//' ;} case $BLOCK_BUTTON in 1) mpc status | filter && setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause @@ -16,4 +13,4 @@ case $BLOCK_BUTTON in 4) mpc prev | filter ;; # scroll up, previous 5) mpc next | filter ;; # scroll down, next *) mpc status | filter ;; -esac; exit +esac