diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2020-05-04 17:24:39 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2020-05-04 17:24:39 -0400 |
| commit | 674f8e1a7a17720031ae7ac66051d6c117363bd9 (patch) | |
| tree | 86c794ecdec8215fbd91f3b1e2b80e8e69dbb6fb /.local/bin | |
| parent | 162509777cd501fb7c3245ca2d8ebf6003545967 (diff) | |
| download | eibhear-674f8e1a7a17720031ae7ac66051d6c117363bd9.tar.gz eibhear-674f8e1a7a17720031ae7ac66051d6c117363bd9.tar.zst eibhear-674f8e1a7a17720031ae7ac66051d6c117363bd9.zip | |
music filter uses ⏸
Diffstat (limited to '.local/bin')
| -rwxr-xr-x | .local/bin/statusbar/music | 7 |
1 files 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\\].*/<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/\\&/&/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 |
