dotfiles

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

commit c153ac7fb427cf517db6d5e5bff0857ee894d407
parent 7f58bbb22d847ffe93347652e5742b3aac63ebd2
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Tue, 26 May 2020 07:22:06 -0400

mpd-module-update now mpdup

it is autostarted by the music module if not already running

Diffstat:
D.local/bin/mpd-module-update | 8--------
A.local/bin/statusbar/mpdup | 8++++++++
M.local/bin/statusbar/music | 2++
3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/.local/bin/mpd-module-update b/.local/bin/mpd-module-update @@ -1,8 +0,0 @@ -#!/bin/sh - -# This loop will update the mpd statusbar module whenever a command changes the -# music player's status. mpd must be running on X's start for this to work. - -while : ; do - mpc idle >/dev/null && pkill -RTMIN+11 "${STATUSBAR:-dwmblocks}" || break -done diff --git a/.local/bin/statusbar/mpdup b/.local/bin/statusbar/mpdup @@ -0,0 +1,8 @@ +#!/bin/sh + +# This loop will update the mpd statusbar module whenever a command changes the +# music player's status. mpd must be running on X's start for this to work. + +while : ; do + mpc idle >/dev/null && kill -45 "$(pidof "${STATUSBAR:-dwmblocks}")" || break +done diff --git a/.local/bin/statusbar/music b/.local/bin/statusbar/music @@ -2,6 +2,8 @@ filter() { mpc | sed "/^volume:/d;s/\\&/&amp;/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d" | paste -sd ' ';} +pidof -x mpdup >/dev/null 2>&1 || mpdup & + case $BLOCK_BUTTON in 1) mpc status | filter ; setsid "$TERMINAL" -e ncmpcpp & ;; # right click, pause/unpause 2) mpc toggle | filter ;; # right click, pause/unpause