From 71ca28742ac4f93ab2401eaee8e78471c023cd4b Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 7 Nov 2024 11:32:27 +0800 Subject: Update --- X11/mpd/ncmpcpp/cover.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 X11/mpd/ncmpcpp/cover.sh (limited to 'X11/mpd/ncmpcpp/cover.sh') 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 @@ +#!/bin/bash + +source "`ueberzug library`" +COVER="/tmp/album_cover.png" + +function add_cover { + ImageLayer::add [identifier]="img" [x]="2" [y]="1" [path]="$COVER" +} + +ImageLayer 0< <( +if [ ! -f "$COVER" ]; then + cp "$HOME/.ncmpcpp/default_cover.png" "$COVER" +fi +#rerender image when changed +while inotifywait -q -q -e close_write "$COVER"; do + add_cover +done +) -- cgit v1.2.3-70-g09d2