aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11/mpd/ncmpcpp/scripts/ncmpcpp-art
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-11-07 11:32:27 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-11-07 11:32:27 +0800
commit71ca28742ac4f93ab2401eaee8e78471c023cd4b (patch)
treedd7c3921d249151dc3179f015153b9f9833d9d73 /X11/mpd/ncmpcpp/scripts/ncmpcpp-art
parentc7ed81e664a592db8fc9a9a6e8f44843de8024a1 (diff)
Update
Diffstat (limited to 'X11/mpd/ncmpcpp/scripts/ncmpcpp-art')
-rwxr-xr-xX11/mpd/ncmpcpp/scripts/ncmpcpp-art22
1 files changed, 22 insertions, 0 deletions
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 @@
1#!/usr/bin/env bash
2
3## Copyright (C) 2020-2021 Aditya Shakya <adi1090x@gmail.com>
4## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3
5
6export FIFO_UEBERZUG="/tmp/mpd-ueberzug-${PPID}"
7
8cleanup() {
9 rm "$FIFO_UEBERZUG" 2>/dev/null
10 rm /tmp/mpd_cover.jpg 2>/dev/null
11 pkill -P $$ 2>/dev/null
12 pkill album-art
13}
14
15pkill -P $$ 2>/dev/null
16rm "$FIFO_UEBERZUG" 2>/dev/null
17mkfifo "$FIFO_UEBERZUG" >/dev/null
18trap cleanup EXIT 2>/dev/null
19tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser simple >/dev/null 2>&1 &
20
21ncmpcpp -c ~/.ncmpcpp/config-art
22cleanup