Files
dotfiles/config/scripts/.local/scripts/fzfclip-wrap
2026-02-11 19:59:01 +01:00

15 lines
314 B
Bash
Executable File

#!/usr/bin/env bash
# Description:
# Wrapper for fzfclip to ensure only one instance is
# running and to launch it in terminal.
exec {LOCK_FD}>/tmp/"$(basename "$0")".lock
flock -n "$LOCK_FD" || {
echo "Another instance is running. Exiting." >&2
exit 1
}
wezterm start -- fzfclip "$@" {LOCK_FD}>&-