From bcfda983efdd527f75de54c35f5366f23e774233 Mon Sep 17 00:00:00 2001 From: garhve Date: Mon, 16 Sep 2024 11:47:28 +0800 Subject: initialize --- .config/ncmpcpp/cover.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 .config/ncmpcpp/cover.sh (limited to '.config/ncmpcpp/cover.sh') diff --git a/.config/ncmpcpp/cover.sh b/.config/ncmpcpp/cover.sh new file mode 100755 index 0000000..2a895b4 --- /dev/null +++ b/.config/ncmpcpp/cover.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env sh + +###################################################################### +# @author : pico (pico@$HOSTNAME) +# @file : cover +# @created : Sunday Sep 08, 2024 00:48:44 CST +# +# @description : +###################################################################### + +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/.config/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