{"action":"created","comment":{"url":"https://api.github.com/repos/awesomeWM/awesome/pulls/comments/55650115","id":55650115,"diff_hunk":"@@ -87,21 +97,41 @@ function module.infobubble(cr, width, height, corner_radius, arrow_size, arrow_p\n     cr:close_path()\n end\n \n---- A rectangle terminated by an arrow\n+--- A rectangle terminated by an arrow.\n+--\n+-- ![Shape example](@SHAPE_rectangular_tag_SVG@)\n+--\n+-- @SHAPE_rectangular_tag_EXAMPLE@\n+--\n -- @param cr A cairo context\n -- @tparam number width The shape with\n -- @tparam number height The shape height\n-function module.rectangular_tag(cr, width, height)\n-    cr:move_to(0        , height/2)\n-    cr:line_to(height/2 , 0       )\n-    cr:line_to(width    , 0       )\n-    cr:line_to(width    , height  )\n-    cr:line_to(height/2 , height  )\n+-- @tparam[opt=height/2] number arrow_length The length of the arrow part\n+function module.rectangular_tag(cr, width, height, arrow_length)\n+    local arrow_length = arrow_length or height/2\n+    if arrow_length > 0 then\n+        cr:move_to(0            , height/2 )\n+        cr:line_to(arrow_length , 0        )\n+        cr:line_to(width        , 0        )\n+        cr:line_to(width        , height   )\n+        cr:line_to(arrow_length , height   )\n+    else\n+        cr:move_to(0            , 0        )\n+        cr:line_to(-arrow_length, height/2 )\n+        cr:line_to(0            , height   )\n+        cr:line_to(width        , height   )\n+        cr:line_to(width        , 0        )\n+    end","path":"lib/gears/shape.lua","position":68,"original_position":68,"commit_id":"f6c8b5c9ee7be6c3236d67281463d0807ab02a3b","original_commit_id":"f6c8b5c9ee7be6c3236d67281463d0807ab02a3b","user":{"login":"psychon","id":89482,"avatar_url":"https://avatars.githubusercontent.com/u/89482?v=3","gravatar_id":"","url":"https://api.github.com/users/psychon","html_url":"https://github.com/psychon","followers_url":"https://api.github.com/users/psychon/followers","following_url":"https://api.github.com/users/psychon/following{/other_user}","gists_url":"https://api.github.com/users/psychon/gists{/gist_id}","starred_url":"https://api.github.com/users/psychon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psychon/subscriptions","organizations_url":"https://api.github.com/users/psychon/orgs","repos_url":"https://api.github.com/users/psychon/repos","events_url":"https://api.github.com/users/psychon/events{/privacy}","received_events_url":"https://api.github.com/users/psychon/received_events","type":"User","site_admin":false},"body":"Do I understand it correctly that a negative `arrow_length` makes the arrow point to the other direction? If so, should that be mentioned in the docs?","created_at":"2016-03-10T09:01:54Z","updated_at":"2016-03-10T09:01:54Z","html_url":"https://github.com/awesomeWM/awesome/pull/753#discussion_r55650115","pull_request_url":"https://api.github.com/repos/awesomeWM/awesome/pulls/753","_links":{"self":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/comments/55650115"},"html":{"href":"https://github.com/awesomeWM/awesome/pull/753#discussion_r55650115"},"pull_request":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/753"}}},"pull_request":{"url":"https://api.github.com/repos/awesomeWM/awesome/pulls/753","id":62339184,"html_url":"https://github.com/awesomeWM/awesome/pull/753","diff_url":"https://github.com/awesomeWM/awesome/pull/753.diff","patch_url":"https://github.com/awesomeWM/awesome/pull/753.patch","issue_url":"https://api.github.com/repos/awesomeWM/awesome/issues/753","number":753,"state":"open","locked":false,"title":"[WIP] Add shapes","user":{"login":"Elv13","id":340384,"avatar_url":"https://avatars.githubusercontent.com/u/340384?v=3","gravatar_id":"","url":"https://api.github.com/users/Elv13","html_url":"https://github.com/Elv13","followers_url":"https://api.github.com/users/Elv13/followers","following_url":"https://api.github.com/users/Elv13/following{/other_user}","gists_url":"https://api.github.com/users/Elv13/gists{/gist_id}","starred_url":"https://api.github.com/users/Elv13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elv13/subscriptions","organizations_url":"https://api.github.com/users/Elv13/orgs","repos_url":"https://api.github.com/users/Elv13/repos","events_url":"https://api.github.com/users/Elv13/events{/privacy}","received_events_url":"https://api.github.com/users/Elv13/received_events","type":"User","site_admin":false},"body":"This pull request add more `gears.shape`s and add dynamically generated examples\r\n\r\nThis slow down the compilation by 2-3 seconds","created_at":"2016-03-10T04:48:02Z","updated_at":"2016-03-10T09:01:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73490e50a868028ee72497b73f3953453b78d514","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/awesomeWM/awesome/pulls/753/commits","review_comments_url":"https://api.github.com/repos/awesomeWM/awesome/pulls/753/comments","review_comment_url":"https://api.github.com/repos/awesomeWM/awesome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awesomeWM/awesome/issues/753/comments","statuses_url":"https://api.github.com/repos/awesomeWM/awesome/statuses/f6c8b5c9ee7be6c3236d67281463d0807ab02a3b","head":{"label":"Elv13:add_shapes","ref":"add_shapes","sha":"f6c8b5c9ee7be6c3236d67281463d0807ab02a3b","user":{"login":"Elv13","id":340384,"avatar_url":"https://avatars.githubusercontent.com/u/340384?v=3","gravatar_id":"","url":"https://api.github.com/users/Elv13","html_url":"https://github.com/Elv13","followers_url":"https://api.github.com/users/Elv13/followers","following_url":"https://api.github.com/users/Elv13/following{/other_user}","gists_url":"https://api.github.com/users/Elv13/gists{/gist_id}","starred_url":"https://api.github.com/users/Elv13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elv13/subscriptions","organizations_url":"https://api.github.com/users/Elv13/orgs","repos_url":"https://api.github.com/users/Elv13/repos","events_url":"https://api.github.com/users/Elv13/events{/privacy}","received_events_url":"https://api.github.com/users/Elv13/received_events","type":"User","site_admin":false},"repo":{"id":17379398,"name":"awesome-1","full_name":"Elv13/awesome-1","owner":{"login":"Elv13","id":340384,"avatar_url":"https://avatars.githubusercontent.com/u/340384?v=3","gravatar_id":"","url":"https://api.github.com/users/Elv13","html_url":"https://github.com/Elv13","followers_url":"https://api.github.com/users/Elv13/followers","following_url":"https://api.github.com/users/Elv13/following{/other_user}","gists_url":"https://api.github.com/users/Elv13/gists{/gist_id}","starred_url":"https://api.github.com/users/Elv13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elv13/subscriptions","organizations_url":"https://api.github.com/users/Elv13/orgs","repos_url":"https://api.github.com/users/Elv13/repos","events_url":"https://api.github.com/users/Elv13/events{/privacy}","received_events_url":"https://api.github.com/users/Elv13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Elv13/awesome-1","description":"Semi-official mirror of the awesome window manager from git://git.naquadah.org/awesome.git, updated hourly.","fork":true,"url":"https://api.github.com/repos/Elv13/awesome-1","forks_url":"https://api.github.com/repos/Elv13/awesome-1/forks","keys_url":"https://api.github.com/repos/Elv13/awesome-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Elv13/awesome-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Elv13/awesome-1/teams","hooks_url":"https://api.github.com/repos/Elv13/awesome-1/hooks","issue_events_url":"https://api.github.com/repos/Elv13/awesome-1/issues/events{/number}","events_url":"https://api.github.com/repos/Elv13/awesome-1/events","assignees_url":"https://api.github.com/repos/Elv13/awesome-1/assignees{/user}","branches_url":"https://api.github.com/repos/Elv13/awesome-1/branches{/branch}","tags_url":"https://api.github.com/repos/Elv13/awesome-1/tags","blobs_url":"https://api.github.com/repos/Elv13/awesome-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Elv13/awesome-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Elv13/awesome-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/Elv13/awesome-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Elv13/awesome-1/statuses/{sha}","languages_url":"https://api.github.com/repos/Elv13/awesome-1/languages","stargazers_url":"https://api.github.com/repos/Elv13/awesome-1/stargazers","contributors_url":"https://api.github.com/repos/Elv13/awesome-1/contributors","subscribers_url":"https://api.github.com/repos/Elv13/awesome-1/subscribers","subscription_url":"https://api.github.com/repos/Elv13/awesome-1/subscription","commits_url":"https://api.github.com/repos/Elv13/awesome-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/Elv13/awesome-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/Elv13/awesome-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/Elv13/awesome-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/Elv13/awesome-1/contents/{+path}","compare_url":"https://api.github.com/repos/Elv13/awesome-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Elv13/awesome-1/merges","archive_url":"https://api.github.com/repos/Elv13/awesome-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Elv13/awesome-1/downloads","issues_url":"https://api.github.com/repos/Elv13/awesome-1/issues{/number}","pulls_url":"https://api.github.com/repos/Elv13/awesome-1/pulls{/number}","milestones_url":"https://api.github.com/repos/Elv13/awesome-1/milestones{/number}","notifications_url":"https://api.github.com/repos/Elv13/awesome-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Elv13/awesome-1/labels{/name}","releases_url":"https://api.github.com/repos/Elv13/awesome-1/releases{/id}","deployments_url":"https://api.github.com/repos/Elv13/awesome-1/deployments","created_at":"2014-03-03T20:41:58Z","updated_at":"2014-11-01T22:48:43Z","pushed_at":"2016-03-10T05:01:13Z","git_url":"git://github.com/Elv13/awesome-1.git","ssh_url":"git@github.com:Elv13/awesome-1.git","clone_url":"https://github.com/Elv13/awesome-1.git","svn_url":"https://github.com/Elv13/awesome-1","homepage":"https://awesome.naquadah.org/","size":10719,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"awesomeWM:master","ref":"master","sha":"c5526ca336431faceca6c3e741ef1fdd8318a79b","user":{"login":"awesomeWM","id":6843364,"avatar_url":"https://avatars.githubusercontent.com/u/6843364?v=3","gravatar_id":"","url":"https://api.github.com/users/awesomeWM","html_url":"https://github.com/awesomeWM","followers_url":"https://api.github.com/users/awesomeWM/followers","following_url":"https://api.github.com/users/awesomeWM/following{/other_user}","gists_url":"https://api.github.com/users/awesomeWM/gists{/gist_id}","starred_url":"https://api.github.com/users/awesomeWM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awesomeWM/subscriptions","organizations_url":"https://api.github.com/users/awesomeWM/orgs","repos_url":"https://api.github.com/users/awesomeWM/repos","events_url":"https://api.github.com/users/awesomeWM/events{/privacy}","received_events_url":"https://api.github.com/users/awesomeWM/received_events","type":"Organization","site_admin":false},"repo":{"id":17378009,"name":"awesome","full_name":"awesomeWM/awesome","owner":{"login":"awesomeWM","id":6843364,"avatar_url":"https://avatars.githubusercontent.com/u/6843364?v=3","gravatar_id":"","url":"https://api.github.com/users/awesomeWM","html_url":"https://github.com/awesomeWM","followers_url":"https://api.github.com/users/awesomeWM/followers","following_url":"https://api.github.com/users/awesomeWM/following{/other_user}","gists_url":"https://api.github.com/users/awesomeWM/gists{/gist_id}","starred_url":"https://api.github.com/users/awesomeWM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awesomeWM/subscriptions","organizations_url":"https://api.github.com/users/awesomeWM/orgs","repos_url":"https://api.github.com/users/awesomeWM/repos","events_url":"https://api.github.com/users/awesomeWM/events{/privacy}","received_events_url":"https://api.github.com/users/awesomeWM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/awesomeWM/awesome","description":"awesome window manager","fork":false,"url":"https://api.github.com/repos/awesomeWM/awesome","forks_url":"https://api.github.com/repos/awesomeWM/awesome/forks","keys_url":"https://api.github.com/repos/awesomeWM/awesome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awesomeWM/awesome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awesomeWM/awesome/teams","hooks_url":"https://api.github.com/repos/awesomeWM/awesome/hooks","issue_events_url":"https://api.github.com/repos/awesomeWM/awesome/issues/events{/number}","events_url":"https://api.github.com/repos/awesomeWM/awesome/events","assignees_url":"https://api.github.com/repos/awesomeWM/awesome/assignees{/user}","branches_url":"https://api.github.com/repos/awesomeWM/awesome/branches{/branch}","tags_url":"https://api.github.com/repos/awesomeWM/awesome/tags","blobs_url":"https://api.github.com/repos/awesomeWM/awesome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awesomeWM/awesome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awesomeWM/awesome/git/refs{/sha}","trees_url":"https://api.github.com/repos/awesomeWM/awesome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awesomeWM/awesome/statuses/{sha}","languages_url":"https://api.github.com/repos/awesomeWM/awesome/languages","stargazers_url":"https://api.github.com/repos/awesomeWM/awesome/stargazers","contributors_url":"https://api.github.com/repos/awesomeWM/awesome/contributors","subscribers_url":"https://api.github.com/repos/awesomeWM/awesome/subscribers","subscription_url":"https://api.github.com/repos/awesomeWM/awesome/subscription","commits_url":"https://api.github.com/repos/awesomeWM/awesome/commits{/sha}","git_commits_url":"https://api.github.com/repos/awesomeWM/awesome/git/commits{/sha}","comments_url":"https://api.github.com/repos/awesomeWM/awesome/comments{/number}","issue_comment_url":"https://api.github.com/repos/awesomeWM/awesome/issues/comments{/number}","contents_url":"https://api.github.com/repos/awesomeWM/awesome/contents/{+path}","compare_url":"https://api.github.com/repos/awesomeWM/awesome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awesomeWM/awesome/merges","archive_url":"https://api.github.com/repos/awesomeWM/awesome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awesomeWM/awesome/downloads","issues_url":"https://api.github.com/repos/awesomeWM/awesome/issues{/number}","pulls_url":"https://api.github.com/repos/awesomeWM/awesome/pulls{/number}","milestones_url":"https://api.github.com/repos/awesomeWM/awesome/milestones{/number}","notifications_url":"https://api.github.com/repos/awesomeWM/awesome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awesomeWM/awesome/labels{/name}","releases_url":"https://api.github.com/repos/awesomeWM/awesome/releases{/id}","deployments_url":"https://api.github.com/repos/awesomeWM/awesome/deployments","created_at":"2014-03-03T19:56:16Z","updated_at":"2016-03-09T23:41:08Z","pushed_at":"2016-03-10T05:01:14Z","git_url":"git://github.com/awesomeWM/awesome.git","ssh_url":"git@github.com:awesomeWM/awesome.git","clone_url":"https://github.com/awesomeWM/awesome.git","svn_url":"https://github.com/awesomeWM/awesome","homepage":"https://awesomewm.org/","size":17478,"stargazers_count":679,"watchers_count":679,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":102,"mirror_url":null,"open_issues_count":97,"forks":102,"open_issues":97,"watchers":679,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/753"},"html":{"href":"https://github.com/awesomeWM/awesome/pull/753"},"issue":{"href":"https://api.github.com/repos/awesomeWM/awesome/issues/753"},"comments":{"href":"https://api.github.com/repos/awesomeWM/awesome/issues/753/comments"},"review_comments":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/753/comments"},"review_comment":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awesomeWM/awesome/pulls/753/commits"},"statuses":{"href":"https://api.github.com/repos/awesomeWM/awesome/statuses/f6c8b5c9ee7be6c3236d67281463d0807ab02a3b"}}}}