update ncspot notification
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
notify=false
|
notify=true
|
||||||
|
|
||||||
[notification_format]
|
[notification_format]
|
||||||
body = "%album\n%artists"
|
body = "%album\n%artists"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
killall -q playerctl
|
killall -q playerctl
|
||||||
# delete all the copied image files first
|
# delete all the copied image files first
|
||||||
find "$HOME/.cache/ncspot/" -type f -exec sh -c 'file -b --mime-type "$0" | grep -q "^image/" && rm "$0"' {} \;
|
find "$HOME/.config/ncspot/" -type f -exec sh -c 'file -b --mime-type "$0" | grep -q "^image/" && rm "$0"' {} \;
|
||||||
playerctl metadata --follow --format '{{ mpris:trackid }}' | while read -r line; do
|
playerctl metadata --follow --format '{{ mpris:trackid }}' | while read -r line; do
|
||||||
title=$(playerctl metadata title)
|
title=$(playerctl metadata title)
|
||||||
album=$(playerctl metadata album)
|
album=$(playerctl metadata album)
|
||||||
@@ -11,8 +11,14 @@ playerctl metadata --follow --format '{{ mpris:trackid }}' | while read -r line;
|
|||||||
if [[ -n $ap ]]; then
|
if [[ -n $ap ]]; then
|
||||||
cfp="$HOME/.cache/ncspot/covers/$ap"
|
cfp="$HOME/.cache/ncspot/covers/$ap"
|
||||||
|
|
||||||
|
# should have a timeout
|
||||||
|
counter=0
|
||||||
until [ -e $cfp ]; do
|
until [ -e $cfp ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
|
# counter=$((counter + 1))
|
||||||
|
# if [ "$counter" -eq 60 ]; then
|
||||||
|
# break
|
||||||
|
# fi
|
||||||
done
|
done
|
||||||
MIME_TYPE=$(file -b --mime-type "$cfp")
|
MIME_TYPE=$(file -b --mime-type "$cfp")
|
||||||
SUB_TYPE=$(echo "$MIME_TYPE" | cut -d'/' -f2)
|
SUB_TYPE=$(echo "$MIME_TYPE" | cut -d'/' -f2)
|
||||||
|
|||||||
+2
-2
@@ -3887,12 +3887,12 @@
|
|||||||
render_criteria: [And ([Note ("volume")])]
|
render_criteria: [And ([Note ("volume")])]
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
max_notifications: 10,
|
max_notifications: 1,
|
||||||
min_window_height: 24,
|
min_window_height: 24,
|
||||||
min_window_width: 24,
|
min_window_width: 24,
|
||||||
poll_interval: 6,
|
poll_interval: 6,
|
||||||
replacing_enabled: true,
|
replacing_enabled: true,
|
||||||
replacing_resets_timeout: true,
|
replacing_resets_timeout: true,
|
||||||
shortcuts: ShortcutsConfig (notification_action1: 3, notification_close: 2, notification_interact: 1, notification_pause: 1),
|
shortcuts: ShortcutsConfig (notification_action1: 3, notification_close: 2, notification_interact: 1, notification_pause: 1),
|
||||||
timeout: 10000
|
timeout: 3000
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user