dotfiles/home/default/.local/bin/convert-paste-png.sh
cho 25665457f4 Revert "Revert "add org-download and config""
This reverts commit 617c86d44b7579e5c9c755e57a38933638f4e355.
2023-09-28 20:18:15 +07:00

11 lines
328 B
Bash
Executable File

#!/bin/sh
wl-paste -t image > /tmp/convert-paste-png.data
#convert /tmp/convert-paste-png.data -format png "$1"
case "$(file --dereference --brief --mime-type -- "/tmp/convert-paste-png.data")" in
image/jpg|image/jpeg) convert /tmp/convert-paste-png.data -format png "$1" ;;
image/png) wl-paste -t image/png > "$1" ;;
esac