Files
cachyos/dot_local/bin/executable_mdcp
T
Prad Nukala ee355bcfd5 Initial import: chezmoi source for CachyOS + Umbriel + Noctalia
Imported from prdlk/dotfiles master (efdd827). Drops the niri, Hyprland/Omarchy,
macOS, and Blume docs-site layers; docs/ is plain Markdown.
2026-11-02 09:14:11 -05:00

18 lines
351 B
Bash
Executable File

#!/bin/sh
# Fetch a URL as markdown, copy to clipboard, preview with mdfried.
url=$1
if [ -z "$url" ]; then
echo "usage: mdcp <url>" >&2
exit 1
fi
if command -v wl-copy >/dev/null 2>&1; then
copy=wl-copy paste=wl-paste
else
echo "mdcp: no clipboard tool (wl-copy) found" >&2
exit 1
fi
curl.md "$url" | "$copy"
"$paste" | mdfried