From dc74f2ae7cba9697afd15a935c6403521ad2b497 Mon Sep 17 00:00:00 2001 From: Charlie39 Date: Tue, 21 Apr 2020 18:03:04 +0530 Subject: [PATCH] making it dwm compliant A simple display to print the current song playing (or paused) in simple style in dwm without any style. I guess this is the only way i could think of right now to make it usable in dwm. --- .local/bin/statusbar/music | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.local/bin/statusbar/music b/.local/bin/statusbar/music index 1412ae33..989d65f7 100755 --- a/.local/bin/statusbar/music +++ b/.local/bin/statusbar/music @@ -1,7 +1,8 @@ #!/bin/sh filter() { - sed "/^volume:/d" | tac | sed -e "s/\\&/&/g;s/\\[paused\\].*//g;s/\\[playing\\].*//g" | tr -d '\n' | sed -e "s/$/<\\/span>\n/g" + [ "$LARBSWM" = "dwm" ] && 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" } case $BLOCK_BUTTON in