{"action":"closed","issue":{"url":"https://api.github.com/repos/ptpb/pb/issues/162","repository_url":"https://api.github.com/repos/ptpb/pb","labels_url":"https://api.github.com/repos/ptpb/pb/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/ptpb/pb/issues/162/comments","events_url":"https://api.github.com/repos/ptpb/pb/issues/162/events","html_url":"https://github.com/ptpb/pb/issues/162","id":144518138,"number":162,"title":"Script for taking a screenshot, uploading, and copying the URL to clipboard.","user":{"login":"krompus","id":12161878,"avatar_url":"https://avatars.githubusercontent.com/u/12161878?v=3","gravatar_id":"","url":"https://api.github.com/users/krompus","html_url":"https://github.com/krompus","followers_url":"https://api.github.com/users/krompus/followers","following_url":"https://api.github.com/users/krompus/following{/other_user}","gists_url":"https://api.github.com/users/krompus/gists{/gist_id}","starred_url":"https://api.github.com/users/krompus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krompus/subscriptions","organizations_url":"https://api.github.com/users/krompus/orgs","repos_url":"https://api.github.com/users/krompus/repos","events_url":"https://api.github.com/users/krompus/events{/privacy}","received_events_url":"https://api.github.com/users/krompus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-30T09:32:07Z","updated_at":"2016-03-30T13:57:14Z","closed_at":"2016-03-30T13:57:14Z","body":"I currently use this script, bound to a keybind, to quickly upload and share scrots:\r\n\r\n    #!/bin/bash\r\n    img=$(date '+/tmp/%N.png')\r\n    scrot -z \"$@\" $img >/dev/null 2>&1 || exit\r\n    res=$(curl -F c=@$img https://ptpb.pw | awk -F'url:' '{print $2}') && (printf $res | xclip; printf \"\\a\")\r\n    notify-send `echo $res`\r\n\r\nIt works very well, and I highly recommend using it! I'm wondering if anyone could suggest a way to modify it to copy to the clipboard (secondary selection) rather than primary selection; I keep losing the URL when I accidentally highlight things before pasting."}}