Cover with path in filename cause notification not displayed
This commit is contained in:
parent
d59f31a62b
commit
aca00a2e6c
1 changed files with 6 additions and 5 deletions
|
@ -2,8 +2,9 @@
|
||||||
#
|
#
|
||||||
#CMUS notification
|
#CMUS notification
|
||||||
#
|
#
|
||||||
options="--app-name=cmus"
|
set -x
|
||||||
body=""
|
body=""
|
||||||
|
|
||||||
while [ "$#" -ge 2 ]
|
while [ "$#" -ge 2 ]
|
||||||
do
|
do
|
||||||
eval $1='$2'
|
eval $1='$2'
|
||||||
|
@ -11,9 +12,9 @@ do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
filename=${file##*/}
|
filename=${file#*/}
|
||||||
image=${file%/*}/cover.jpg
|
image=${file%/*}/cover.jpg
|
||||||
[ -f "$image" ] && options="$options -i ${image}"
|
[ -f "$image" ] && options="$options -i \"${image}\""
|
||||||
|
|
||||||
title=${title:-$filename}
|
title=${title:-$filename}
|
||||||
|
|
||||||
|
@ -32,5 +33,5 @@ then
|
||||||
body="$body ${date%%-*}"
|
body="$body ${date%%-*}"
|
||||||
fi
|
fi
|
||||||
body=${body:-'no informations'}
|
body=${body:-'no informations'}
|
||||||
|
echo "$options" > ~/cmus.txt
|
||||||
notify-send $options "$title" "$body"
|
notify-send --app-name=cmus -i "$image" "$title" "$body" > ~/cmus.txt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue