From 94321c452caf55f70cb45156e3dea7dce37cc4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=84min=20Baumeler?= Date: Wed, 20 May 2026 13:52:30 +0200 Subject: [PATCH] bugfix: mpv socket accessible and silence mpv output --- src/sh/mpv.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sh/mpv.sh b/src/sh/mpv.sh index f97d7b4..b7a363e 100644 --- a/src/sh/mpv.sh +++ b/src/sh/mpv.sh @@ -78,8 +78,9 @@ mpv_quit() { # Start an mpv instance and bind it to the socket `MPV_SOCKET` mpv_start() { MPV_SOCKET="$(mktemp --suffix=.sock)" + export MPV_SOCKET trap 'mpv_quit >/dev/null; rm -f "$MPV_SOCKET"' EXIT INT - $MPV --no-config --no-terminal --input-ipc-server="$MPV_SOCKET" --idle --no-osc --no-input-default-bindings & + nohup $MPV --no-config --no-terminal --input-ipc-server="$MPV_SOCKET" --idle --no-osc --no-input-default-bindings >/dev/null 2&>1 & } # Play the track at the specified index in the playlist