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/scripts/ncmpcpp-art | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 X11/mpd/ncmpcpp/scripts/ncmpcpp-art (limited to 'X11/mpd/ncmpcpp/scripts/ncmpcpp-art') diff --git a/X11/mpd/ncmpcpp/scripts/ncmpcpp-art b/X11/mpd/ncmpcpp/scripts/ncmpcpp-art new file mode 100755 index 0000000..38d34c1 --- /dev/null +++ b/X11/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