aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11/mpd/ncmpcpp/cover.sh
diff options
context:
space:
mode:
Diffstat (limited to 'X11/mpd/ncmpcpp/cover.sh')
-rwxr-xr-xX11/mpd/ncmpcpp/cover.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/X11/mpd/ncmpcpp/cover.sh b/X11/mpd/ncmpcpp/cover.sh
new file mode 100755
index 0000000..8fe8d4d
--- /dev/null
+++ b/X11/mpd/ncmpcpp/cover.sh
@@ -0,0 +1,18 @@
1#!/bin/bash
2
3source "`ueberzug library`"
4COVER="/tmp/album_cover.png"
5
6function add_cover {
7 ImageLayer::add [identifier]="img" [x]="2" [y]="1" [path]="$COVER"
8}
9
10ImageLayer 0< <(
11if [ ! -f "$COVER" ]; then
12 cp "$HOME/.ncmpcpp/default_cover.png" "$COVER"
13fi
14#rerender image when changed
15while inotifywait -q -q -e close_write "$COVER"; do
16 add_cover
17done
18)