{"action":"created","comment":{"url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/comments/31602247","id":31602247,"diff_hunk":"@@ -39,18 +51,42 @@\n \t\tconsole.log('Allowing browser to handle: ' + JSON.stringify(openRequest));\n \t});\n \n-\tvar isMinimized = false;\n+\tvar isHidden = false;\n+\n+\twin.on('hide', function () {\n+\t\tisHidden = true;\n+\t});\n \twin.on('minimize', function () {\n-\t\tisMinimized = true;\n+\t\tisHidden = true;\n+\t});\n+\twin.on('show', function () {\n+\t\tisHidden = false;\n \t});\n \twin.on('restore', function () {\n-\t\tisMinimized = false;\n+\t\tisHidden = false;\n \t});\n+\n+\tvar windowShowCommand = program.minimizeToTray ? 'show' : 'restore';\n+\tvar windowHideCommand = program.minimizeToTray ? 'hide' : 'minimize';\n+\n+\tfunction showWindow() {\n+\t\twin[windowShowCommand]();\n+\t\tisHidden = false;\n+\t};\n+\tfunction hideWindow() {\n+\t\twin[windowHideCommand]();\n+\t\tisHidden = true;\n+\t};\n+\n+  gui.App.on('open', function (cmdline) {\n+\t\tshowWindow();\n+  });","path":"app/js/index.js","position":70,"original_position":70,"commit_id":"4a06d46a9120839e72becbf3590317bc56893e87","original_commit_id":"4a06d46a9120839e72becbf3590317bc56893e87","user":{"login":"twolfson","id":902488,"avatar_url":"https://avatars.githubusercontent.com/u/902488?v=3","gravatar_id":"","url":"https://api.github.com/users/twolfson","html_url":"https://github.com/twolfson","followers_url":"https://api.github.com/users/twolfson/followers","following_url":"https://api.github.com/users/twolfson/following{/other_user}","gists_url":"https://api.github.com/users/twolfson/gists{/gist_id}","starred_url":"https://api.github.com/users/twolfson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twolfson/subscriptions","organizations_url":"https://api.github.com/users/twolfson/orgs","repos_url":"https://api.github.com/users/twolfson/repos","events_url":"https://api.github.com/users/twolfson/events{/privacy}","received_events_url":"https://api.github.com/users/twolfson/received_events","type":"User","site_admin":false},"body":"Ah, k. I am starting to warm up to the idea but would like to run it by @wlaurance as well. Can we relocate it to another PR so we can land this one without that being a blocker?","created_at":"2015-06-03T08:20:34Z","updated_at":"2015-06-03T08:20:34Z","html_url":"https://github.com/slack-for-linux/slack-for-linux/pull/68#discussion_r31602247","pull_request_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/68","_links":{"self":{"href":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/comments/31602247"},"html":{"href":"https://github.com/slack-for-linux/slack-for-linux/pull/68#discussion_r31602247"},"pull_request":{"href":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/68","id":36715819,"html_url":"https://github.com/slack-for-linux/slack-for-linux/pull/68","diff_url":"https://github.com/slack-for-linux/slack-for-linux/pull/68.diff","patch_url":"https://github.com/slack-for-linux/slack-for-linux/pull/68.patch","issue_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/issues/68","number":68,"state":"open","locked":false,"title":"Added the --minimize-to-tray command line option.","user":{"login":"LuckyThirteen","id":405732,"avatar_url":"https://avatars.githubusercontent.com/u/405732?v=3","gravatar_id":"","url":"https://api.github.com/users/LuckyThirteen","html_url":"https://github.com/LuckyThirteen","followers_url":"https://api.github.com/users/LuckyThirteen/followers","following_url":"https://api.github.com/users/LuckyThirteen/following{/other_user}","gists_url":"https://api.github.com/users/LuckyThirteen/gists{/gist_id}","starred_url":"https://api.github.com/users/LuckyThirteen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuckyThirteen/subscriptions","organizations_url":"https://api.github.com/users/LuckyThirteen/orgs","repos_url":"https://api.github.com/users/LuckyThirteen/repos","events_url":"https://api.github.com/users/LuckyThirteen/events{/privacy}","received_events_url":"https://api.github.com/users/LuckyThirteen/received_events","type":"User","site_admin":false},"body":"If the `--minimize-to-tray` option is set, clicking on the tray icon will toggle `hide` / `show` thus the minimized window won't be visible in the task bar / window list.","created_at":"2015-06-02T10:51:14Z","updated_at":"2015-06-03T08:20:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d461405f9a2214933564381c30ad912ff7938851","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/68/commits","review_comments_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/68/comments","review_comment_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/issues/68/comments","statuses_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/statuses/4a06d46a9120839e72becbf3590317bc56893e87","head":{"label":"LuckyThirteen:allow.cli.info.sqwished/hide.or.minimize","ref":"allow.cli.info.sqwished/hide.or.minimize","sha":"4a06d46a9120839e72becbf3590317bc56893e87","user":{"login":"LuckyThirteen","id":405732,"avatar_url":"https://avatars.githubusercontent.com/u/405732?v=3","gravatar_id":"","url":"https://api.github.com/users/LuckyThirteen","html_url":"https://github.com/LuckyThirteen","followers_url":"https://api.github.com/users/LuckyThirteen/followers","following_url":"https://api.github.com/users/LuckyThirteen/following{/other_user}","gists_url":"https://api.github.com/users/LuckyThirteen/gists{/gist_id}","starred_url":"https://api.github.com/users/LuckyThirteen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuckyThirteen/subscriptions","organizations_url":"https://api.github.com/users/LuckyThirteen/orgs","repos_url":"https://api.github.com/users/LuckyThirteen/repos","events_url":"https://api.github.com/users/LuckyThirteen/events{/privacy}","received_events_url":"https://api.github.com/users/LuckyThirteen/received_events","type":"User","site_admin":false},"repo":{"id":35152922,"name":"slack-for-linux","full_name":"LuckyThirteen/slack-for-linux","owner":{"login":"LuckyThirteen","id":405732,"avatar_url":"https://avatars.githubusercontent.com/u/405732?v=3","gravatar_id":"","url":"https://api.github.com/users/LuckyThirteen","html_url":"https://github.com/LuckyThirteen","followers_url":"https://api.github.com/users/LuckyThirteen/followers","following_url":"https://api.github.com/users/LuckyThirteen/following{/other_user}","gists_url":"https://api.github.com/users/LuckyThirteen/gists{/gist_id}","starred_url":"https://api.github.com/users/LuckyThirteen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuckyThirteen/subscriptions","organizations_url":"https://api.github.com/users/LuckyThirteen/orgs","repos_url":"https://api.github.com/users/LuckyThirteen/repos","events_url":"https://api.github.com/users/LuckyThirteen/events{/privacy}","received_events_url":"https://api.github.com/users/LuckyThirteen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LuckyThirteen/slack-for-linux","description":"Slack client for linux. Install with npm. Works with Ubuntu, Fedora, Mint, CentOS, Debian etc","fork":true,"url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux","forks_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/forks","keys_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/teams","hooks_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/hooks","issue_events_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/issues/events{/number}","events_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/events","assignees_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/assignees{/user}","branches_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/branches{/branch}","tags_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/tags","blobs_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/git/refs{/sha}","trees_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/statuses/{sha}","languages_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/languages","stargazers_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/stargazers","contributors_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/contributors","subscribers_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/subscribers","subscription_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/subscription","commits_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/commits{/sha}","git_commits_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/git/commits{/sha}","comments_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/comments{/number}","issue_comment_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/issues/comments{/number}","contents_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/contents/{+path}","compare_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/merges","archive_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/downloads","issues_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/issues{/number}","pulls_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/pulls{/number}","milestones_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/milestones{/number}","notifications_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/labels{/name}","releases_url":"https://api.github.com/repos/LuckyThirteen/slack-for-linux/releases{/id}","created_at":"2015-05-06T10:14:01Z","updated_at":"2015-05-06T10:14:01Z","pushed_at":"2015-06-02T19:52:00Z","git_url":"git://github.com/LuckyThirteen/slack-for-linux.git","ssh_url":"git@github.com:LuckyThirteen/slack-for-linux.git","clone_url":"https://github.com/LuckyThirteen/slack-for-linux.git","svn_url":"https://github.com/LuckyThirteen/slack-for-linux","homepage":"","size":73805,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"slack-for-linux:master","ref":"master","sha":"10b2b917de3bc56c211366e04feb7f72e2a7fa05","user":{"login":"slack-for-linux","id":12647569,"avatar_url":"https://avatars.githubusercontent.com/u/12647569?v=3","gravatar_id":"","url":"https://api.github.com/users/slack-for-linux","html_url":"https://github.com/slack-for-linux","followers_url":"https://api.github.com/users/slack-for-linux/followers","following_url":"https://api.github.com/users/slack-for-linux/following{/other_user}","gists_url":"https://api.github.com/users/slack-for-linux/gists{/gist_id}","starred_url":"https://api.github.com/users/slack-for-linux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slack-for-linux/subscriptions","organizations_url":"https://api.github.com/users/slack-for-linux/orgs","repos_url":"https://api.github.com/users/slack-for-linux/repos","events_url":"https://api.github.com/users/slack-for-linux/events{/privacy}","received_events_url":"https://api.github.com/users/slack-for-linux/received_events","type":"Organization","site_admin":false},"repo":{"id":28045658,"name":"slack-for-linux","full_name":"slack-for-linux/slack-for-linux","owner":{"login":"slack-for-linux","id":12647569,"avatar_url":"https://avatars.githubusercontent.com/u/12647569?v=3","gravatar_id":"","url":"https://api.github.com/users/slack-for-linux","html_url":"https://github.com/slack-for-linux","followers_url":"https://api.github.com/users/slack-for-linux/followers","following_url":"https://api.github.com/users/slack-for-linux/following{/other_user}","gists_url":"https://api.github.com/users/slack-for-linux/gists{/gist_id}","starred_url":"https://api.github.com/users/slack-for-linux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slack-for-linux/subscriptions","organizations_url":"https://api.github.com/users/slack-for-linux/orgs","repos_url":"https://api.github.com/users/slack-for-linux/repos","events_url":"https://api.github.com/users/slack-for-linux/events{/privacy}","received_events_url":"https://api.github.com/users/slack-for-linux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slack-for-linux/slack-for-linux","description":"Slack client for linux. Install with npm. Works with Ubuntu, Fedora, Mint, CentOS, Debian etc","fork":false,"url":"https://api.github.com/repos/slack-for-linux/slack-for-linux","forks_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/forks","keys_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/teams","hooks_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/hooks","issue_events_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/issues/events{/number}","events_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/events","assignees_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/assignees{/user}","branches_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/branches{/branch}","tags_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/tags","blobs_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/git/refs{/sha}","trees_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/statuses/{sha}","languages_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/languages","stargazers_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/stargazers","contributors_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/contributors","subscribers_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/subscribers","subscription_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/subscription","commits_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/commits{/sha}","git_commits_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/git/commits{/sha}","comments_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/comments{/number}","issue_comment_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/issues/comments{/number}","contents_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/contents/{+path}","compare_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/merges","archive_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/downloads","issues_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/issues{/number}","pulls_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls{/number}","milestones_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/milestones{/number}","notifications_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/labels{/name}","releases_url":"https://api.github.com/repos/slack-for-linux/slack-for-linux/releases{/id}","created_at":"2014-12-15T16:37:37Z","updated_at":"2015-06-03T05:35:17Z","pushed_at":"2015-06-03T05:25:48Z","git_url":"git://github.com/slack-for-linux/slack-for-linux.git","ssh_url":"git@github.com:slack-for-linux/slack-for-linux.git","clone_url":"https://github.com/slack-for-linux/slack-for-linux.git","svn_url":"https://github.com/slack-for-linux/slack-for-linux","homepage":"","size":75092,"stargazers_count":207,"watchers_count":207,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":17,"forks":16,"open_issues":17,"watchers":207,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/68"},"html":{"href":"https://github.com/slack-for-linux/slack-for-linux/pull/68"},"issue":{"href":"https://api.github.com/repos/slack-for-linux/slack-for-linux/issues/68"},"comments":{"href":"https://api.github.com/repos/slack-for-linux/slack-for-linux/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slack-for-linux/slack-for-linux/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/slack-for-linux/slack-for-linux/statuses/4a06d46a9120839e72becbf3590317bc56893e87"}}}}