dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 674f8e1a7a17720031ae7ac66051d6c117363bd9
parent 162509777cd501fb7c3245ca2d8ebf6003545967
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Mon,  4 May 2020 17:24:39 -0400

music filter uses ⏸

Diffstat:
M.local/bin/statusbar/music | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git 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/\\&/&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" - } +filter() { mpc | sed "/^volume:/d;s/\\&/&amp;/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