Skip to content

Commit

Permalink
Show "Open From Clipboard" only if img on clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-pennyworth committed May 31, 2021
1 parent df0616d commit 683b495
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions items.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ cat <<EOF
},
"uid": "capture-window"
},
EOF

imgpath="$(mktemp)"
if ./pngpaste "$imgpath"; then
cat <<EOF
{
"title": "Open From Clipboard",
"subtitle": "Open screenshot that is currently in the clipboard.",
Expand All @@ -48,6 +53,10 @@ cat <<EOF
},
"uid": "open-from-clipboard"
},
EOF
fi

cat <<EOF
{
"title": "Annotate Image",
"subtitle": "Annotate and edit an image.",
Expand Down

0 comments on commit 683b495

Please sign in to comment.