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
|
||||
#
|
||||
options="--app-name=cmus"
|
||||
set -x
|
||||
body=""
|
||||
|
||||
while [ "$#" -ge 2 ]
|
||||
do
|
||||
eval $1='$2'
|
||||
|
@ -11,9 +12,9 @@ do
|
|||
shift
|
||||
done
|
||||
|
||||
filename=${file##*/}
|
||||
filename=${file#*/}
|
||||
image=${file%/*}/cover.jpg
|
||||
[ -f "$image" ] && options="$options -i ${image}"
|
||||
[ -f "$image" ] && options="$options -i \"${image}\""
|
||||
|
||||
title=${title:-$filename}
|
||||
|
||||
|
@ -32,5 +33,5 @@ then
|
|||
body="$body ${date%%-*}"
|
||||
fi
|
||||
body=${body:-'no informations'}
|
||||
|
||||
notify-send $options "$title" "$body"
|
||||
echo "$options" > ~/cmus.txt
|
||||
notify-send --app-name=cmus -i "$image" "$title" "$body" > ~/cmus.txt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue