{"action":"created","issue":{"url":"https://api.github.com/repos/processing/p5.js-editor/issues/252","repository_url":"https://api.github.com/repos/processing/p5.js-editor","labels_url":"https://api.github.com/repos/processing/p5.js-editor/issues/252/labels{/name}","comments_url":"https://api.github.com/repos/processing/p5.js-editor/issues/252/comments","events_url":"https://api.github.com/repos/processing/p5.js-editor/issues/252/events","html_url":"https://github.com/processing/p5.js-editor/issues/252","id":164723709,"number":252,"title":"Include a png/svg for Linux (and Mac?) users to use as an icon","user":{"login":"JobLeonard","id":259840,"avatar_url":"https://avatars.githubusercontent.com/u/259840?v=3","gravatar_id":"","url":"https://api.github.com/users/JobLeonard","html_url":"https://github.com/JobLeonard","followers_url":"https://api.github.com/users/JobLeonard/followers","following_url":"https://api.github.com/users/JobLeonard/following{/other_user}","gists_url":"https://api.github.com/users/JobLeonard/gists{/gist_id}","starred_url":"https://api.github.com/users/JobLeonard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JobLeonard/subscriptions","organizations_url":"https://api.github.com/users/JobLeonard/orgs","repos_url":"https://api.github.com/users/JobLeonard/repos","events_url":"https://api.github.com/users/JobLeonard/events{/privacy}","received_events_url":"https://api.github.com/users/JobLeonard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-10T16:47:59Z","updated_at":"2016-07-18T09:33:55Z","closed_at":null,"body":"At the moment the Linux version (and presumably the Mac version too?) doesn't include an icon. I don't know which image is used for the Windows icon, but if we could include it as an SVG and PNG so users can manually set it, that would be great. If it's possible to export the Node.JS app to include it, even better!\r\n\r\nAt the moment I use the one for hello.p5js[0] myself, adding a white background to fill in the transparancy. I made a quick edit in InkScape and added an exported SVG:\r\n\r\nSee how nice it looks on my desktop? All I did was create a link manually and set it to this image:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/259840/16714756/89f9b052-46cd-11e6-84eb-553583837baf.png)\r\n\r\n![image](https://cloud.githubusercontent.com/assets/259840/16714779/07c4c4ae-46ce-11e6-80f2-808e0b66e38d.png)\r\n\r\nHere are the files, they only add up to 20kb extra.\r\n\r\n- http://blindedcyclops.neocities.org/p5js-icons/p5-sq-reverse-filled.png\r\n- http://blindedcyclops.neocities.org/p5js-icons/p5-sq-reverse-filled.svg\r\n- http://blindedcyclops.neocities.org/p5js-icons/p5-sq-white-background.png\r\n- http://blindedcyclops.neocities.org/p5js-icons/p5-sq-white-background.svg\r\n\r\n[0] http://hello.p5js.org/assets/p5-sq-reverse.svg\r\n"},"comment":{"url":"https://api.github.com/repos/processing/p5.js-editor/issues/comments/233284578","html_url":"https://github.com/processing/p5.js-editor/issues/252#issuecomment-233284578","issue_url":"https://api.github.com/repos/processing/p5.js-editor/issues/252","id":233284578,"user":{"login":"JobLeonard","id":259840,"avatar_url":"https://avatars.githubusercontent.com/u/259840?v=3","gravatar_id":"","url":"https://api.github.com/users/JobLeonard","html_url":"https://github.com/JobLeonard","followers_url":"https://api.github.com/users/JobLeonard/followers","following_url":"https://api.github.com/users/JobLeonard/following{/other_user}","gists_url":"https://api.github.com/users/JobLeonard/gists{/gist_id}","starred_url":"https://api.github.com/users/JobLeonard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JobLeonard/subscriptions","organizations_url":"https://api.github.com/users/JobLeonard/orgs","repos_url":"https://api.github.com/users/JobLeonard/repos","events_url":"https://api.github.com/users/JobLeonard/events{/privacy}","received_events_url":"https://api.github.com/users/JobLeonard/received_events","type":"User","site_admin":false},"created_at":"2016-07-18T09:33:55Z","updated_at":"2016-07-18T09:33:55Z","body":"Ok, so I'm assuming we want to keep it portable (that is, no admin rights needed), so here's what I did:\r\n\r\n- have a `p5js.desktop` \"template\" and a simple bash installation script\r\n- [figure out the full path in bash](http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in)\r\n- use `sed` to take the template, replace `{P5XJSPATH}` in it with the path, and copy the resulting `p5js.desktop` file to the appropriate folder (n most distros this appears to be `~/.local/share/applications`)\r\n\r\nThis also avoids environment variables, so less mess to clean up.\r\n\r\n**p5js.desktop template:** (not sure aboute the WebDevelopment, let me know what you think)\r\n```\r\n[Desktop Entry]\r\nVersion=1.0\r\nName=p5.js\r\nComment=Processing core ideas reinterpreted for today's web.\r\nExec={P5JSPATH}/p5\r\nPath={P5JSPATH}\r\nIcon={P5JSPATH}/icons/p5-sq-reverse-filled.svg\r\nTerminal=false\r\nType=Application\r\nCategories=Education;Development;Art;WebDevelopment;IDE\r\n```\r\n**installation script:**\r\n```\r\n#! /bin/bash\r\n\r\n# get full path of p5js editor\r\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\r\n\r\n# Using question mark as sed delimiter, since it is \r\n# guaranteed to not be used in path names.\r\nsed -e \"s?{P5JSPATH}?$DIR?g\" p5js.desktop > ~/.local/share/applications/p5js.desktop\r\n# make the desktop file executable\r\nchmod +x ~/.local/share/applications/p5js.desktop\r\n```\r\n\r\nI'm not sure if this fits into the existing build process, or where I should change the files in the github repo to include this. All I can say is that it worked for me."}}
{"actor":{"display_login":"JobLeonard"}}