From e5f7080e094212d2db1c695a5cd8fcc47f4a5bdd Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sat, 24 Sep 2022 22:04:27 +0800 Subject: Add ncmpcpp config --- mpd/ncmpcpp/scripts/ncmpcpp-art | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 mpd/ncmpcpp/scripts/ncmpcpp-art (limited to 'mpd/ncmpcpp/scripts/ncmpcpp-art') diff --git a/mpd/ncmpcpp/scripts/ncmpcpp-art b/mpd/ncmpcpp/scripts/ncmpcpp-art new file mode 100755 index 0000000..38d34c1 --- /dev/null +++ b/mpd/ncmpcpp/scripts/ncmpcpp-art @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +## Copyright (C) 2020-2021 Aditya Shakya +## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 + +export FIFO_UEBERZUG="/tmp/mpd-ueberzug-${PPID}" + +cleanup() { + rm "$FIFO_UEBERZUG" 2>/dev/null + rm /tmp/mpd_cover.jpg 2>/dev/null + pkill -P $$ 2>/dev/null + pkill album-art +} + +pkill -P $$ 2>/dev/null +rm "$FIFO_UEBERZUG" 2>/dev/null +mkfifo "$FIFO_UEBERZUG" >/dev/null +trap cleanup EXIT 2>/dev/null +tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser simple >/dev/null 2>&1 & + +ncmpcpp -c ~/.ncmpcpp/config-art +cleanup -- cgit v1.2.3-70-g09d2