summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorCharlie39 <charlie39@users.noreply.github.com>2020-04-23 01:45:53 +0530
committerGitHub <noreply@github.com>2020-04-22 16:15:53 -0400
commit18113aad1a0f50f8596486f64332eed859a79813 (patch)
treefec6d9625bf0756cf1e237c5afe872a77da9acc7 /.local/bin
parent933e4149d350f0c73a003a94a6cee45f277a6c17 (diff)
downloadeibhear-18113aad1a0f50f8596486f64332eed859a79813.tar.gz
eibhear-18113aad1a0f50f8596486f64332eed859a79813.tar.zst
eibhear-18113aad1a0f50f8596486f64332eed859a79813.zip
Replaced pgrep with pidof (#592)
* dwm compliant revised PR * replaced pgrep with pidof because it is faster! * Update music
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/statusbar/music3
1 files changed, 2 insertions, 1 deletions
diff --git a/.local/bin/statusbar/music b/.local/bin/statusbar/music
index 1412ae3..1b18776 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/\\&/&amp;/g;s/\\[paused\\].*/<span color=\"gray\" font_style=\"italic\">/g;s/\\[playing\\].*/<span>/g" | tr -d '\n' | sed -e "s/$/<\\/span>\n/g"
+ [ "$(pidof dwmblocks)" ] && sed "/^volume:/d" | tac | sed -e "s/\\&/&amp;/g;s/\\[paused\\].*/\\[paused\\] /g;s/\\[playing\\].*//" | tr -d '\n' | sed -e "s/\..*$//g" \
+ || sed "/^volume:/d" | tac | sed -e "s/\\&/&amp;/g;s/\\[paused\\].*/<span color=\"gray\" font_style=\"italic\">/g;s/\\[playing\\].*/<span>/g" | tr -d '\n' | sed -e "s/$/<\\/span>\n/g"
}
case $BLOCK_BUTTON in