>>107694841
fzf_preview_wrapper
#!/bin/env bash
# place the following in your shell environment
# export FZF_MPV_PIDFILE="${XDG_CACHE_HOME:-$HOME/.cache}/fzf_mpv_preview.pid"
# Base from environment variable, fallback to default
BASE_PIDFILE="${FZF_MPV_PIDFILE:-${XDG_CACHE_HOME:-$HOME/.cache}/fzf_mpv_preview}"
# Dynamic per-instance PID file ($$ is the PID of this script invocation)
PIDFILE="${BASE_PIDFILE}_$$.pid"
# Ensure cache directory exists
mkdir -p "$(dirname "$BASE_PIDFILE")"
Comment too long. Click here to view the full text.