diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2022-09-24 22:04:27 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2022-09-24 22:04:27 +0800 |
| commit | e5f7080e094212d2db1c695a5cd8fcc47f4a5bdd (patch) | |
| tree | fbd5ca682efe051254242a656c32fb2ae923cbba /mpd/ncmpcpp/scripts/ncmpcpp-art | |
| parent | ad1226bbdf7d3f216ea0f939e6f4634b0c4ef627 (diff) | |
Add ncmpcpp config
Diffstat (limited to 'mpd/ncmpcpp/scripts/ncmpcpp-art')
| -rwxr-xr-x | mpd/ncmpcpp/scripts/ncmpcpp-art | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ | |||
| 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 | |||
| 6 | export FIFO_UEBERZUG="/tmp/mpd-ueberzug-${PPID}" | ||
| 7 | |||
| 8 | cleanup() { | ||
| 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 | |||
| 15 | pkill -P $$ 2>/dev/null | ||
| 16 | rm "$FIFO_UEBERZUG" 2>/dev/null | ||
| 17 | mkfifo "$FIFO_UEBERZUG" >/dev/null | ||
| 18 | trap cleanup EXIT 2>/dev/null | ||
| 19 | tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser simple >/dev/null 2>&1 & | ||
| 20 | |||
| 21 | ncmpcpp -c ~/.ncmpcpp/config-art | ||
| 22 | cleanup | ||