From dfdc8e86b27197ea874929537a8129cc552ff599 Mon Sep 17 00:00:00 2001 From: katherine Date: Sun, 11 Dec 2022 20:56:27 -0700 Subject: update to latest dunst remove forked version and make necessary relevant adjustments --- .config/herbstluftwm/mpc-status.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to '.config/herbstluftwm/mpc-status.sh') diff --git a/.config/herbstluftwm/mpc-status.sh b/.config/herbstluftwm/mpc-status.sh index 6f3f699..31c13f4 100755 --- a/.config/herbstluftwm/mpc-status.sh +++ b/.config/herbstluftwm/mpc-status.sh @@ -1,8 +1,8 @@ -#!/bin/bash +#!/usr/bin/env zsh source $HOME/.config/init/vars -case "$1" in +case $1 in next) mpc next ;; @@ -15,23 +15,20 @@ esac mpc status >/dev/null 2>&1 if [[ $? -ne 0 ]]; then - notify-send -a closeme "mpd disconnected" + dunstify -r 109112100 "mpd disconnected" exit fi -if [[ -z "$(mpc status | grep -E '\[(playing|paused)\]')" ]]; then - notify-send -a closeme "mpd stopped" +if [[ -z $(mpc status | grep -E '\[(playing|paused)\]') ]]; then + dunstify -r 109112100 "mpd stopped" exit fi cd ~/music/ dir=$(dirname "$(mpc current -f %file%)") -# linking is necessary because notify-send can't into icon paths containing commas -cd $tmpdir -ln -sf "$HOME/music/$dir/cover-small.png" mpd-icon.png message="$(mpc current -f '##%track% %title% (%date%)\n%artist% - %album%') $(mpc status | tail -n -2 | sed -re 's/volume.*repeat/\nrepeat/' -e 's/( ){3,4}/\n/g' -e '/volume: /d')" -notify-send -t 4000 -a closeme --icon=$tmpdir/mpd-icon.png "$message" +dunstify -t 4000 -r 109112100 --icon="$HOME/music/$dir/cover-small.png" $message -- cgit v1.2.3