{"action":"created","comment":{"url":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/comments/234829076","pull_request_review_id":176555322,"id":234829076,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDgyOTA3Ng==","diff_hunk":"@@ -0,0 +1,71 @@\n+# vim:ft=zsh ts=2 sw=2 sts=2 et fenc=utf-8\n+################################################################\n+# @title powerlevel9k Segment - Reminder\n+# @source [powerlevel9k](https://github.com/bhilburn/powerlevel9k)\n+##\n+\n+################################################################\n+# Register segment\n+# Parameters:\n+#   segment_name  context  background  foreground  Generic  Flat/Awesome-Patched  Awesome-FontConfig  Awesome-Mapped-FontConfig  NerdFont\n+#                                                                                                                             \n+p9k::register_segment 'REMINDER' '' green \"$DEFAULT_COLOR\" '!!' ''   $'\\UF0A4 '   '\\u'\"${CODEPOINT_OF_AWESOME_HAND_O_RIGHT}\"   $'\\UF0A4'\n+\n+################################################################\n+# @description\n+#   Display the reminder icon/text for the current time interval.\n+##\n+# @args\n+#   $1 string Alignment - left | right\n+#   $2 integer Segment index\n+#   $3 boolean Whether the segment should be joined\n+##\n+prompt_reminder() {\n+\ttypeset -AH __lookup\n+  __lookup=(\n+    \"sun\" 0\n+    \"mon\" 1\n+    \"tue\" 2\n+    \"wed\" 3\n+    \"thu\" 4\n+    \"fri\" 5\n+    \"sat\" 6\n+  )\n+\tlocal dow=$( date +\"%w\" )\n+\tlocal now=$( date +\"%H%M\" )\n+  local segment_content=\"\"\n+\tlocal separator=\"\"\n+\tfor rule in $P9K_REMINDER_RULES; do\n+\t\techo $rule | while read date_exp time_exp icon; do\n+\t\t\ttime_exp=$( echo \"$time_exp\" | sed -e \"s/[:]//g\" )","path":"segments/reminder.p9k","position":40,"original_position":40,"commit_id":"f39800a9e16c3d54de3734fe71b15ed4f0801c69","original_commit_id":"f39800a9e16c3d54de3734fe71b15ed4f0801c69","user":{"login":"dritter","id":1544760,"node_id":"MDQ6VXNlcjE1NDQ3NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/1544760?v=4","gravatar_id":"","url":"https://api.github.com/users/dritter","html_url":"https://github.com/dritter","followers_url":"https://api.github.com/users/dritter/followers","following_url":"https://api.github.com/users/dritter/following{/other_user}","gists_url":"https://api.github.com/users/dritter/gists{/gist_id}","starred_url":"https://api.github.com/users/dritter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dritter/subscriptions","organizations_url":"https://api.github.com/users/dritter/orgs","repos_url":"https://api.github.com/users/dritter/repos","events_url":"https://api.github.com/users/dritter/events{/privacy}","received_events_url":"https://api.github.com/users/dritter/received_events","type":"User","site_admin":false},"body":"This could be done with ZSH itself:\r\n```suggestion\r\n\t\t\ttime_exp=${time_exp//:/}\r\n```","created_at":"2018-11-20T00:12:20Z","updated_at":"2018-11-20T00:37:38Z","html_url":"https://github.com/bhilburn/powerlevel9k/pull/1069#discussion_r234829076","pull_request_url":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/1069","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/comments/234829076"},"html":{"href":"https://github.com/bhilburn/powerlevel9k/pull/1069#discussion_r234829076"},"pull_request":{"href":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/1069"}}},"pull_request":{"url":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/1069","id":231272754,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMjcyNzU0","html_url":"https://github.com/bhilburn/powerlevel9k/pull/1069","diff_url":"https://github.com/bhilburn/powerlevel9k/pull/1069.diff","patch_url":"https://github.com/bhilburn/powerlevel9k/pull/1069.patch","issue_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/1069","number":1069,"state":"open","locked":false,"title":"[New Segment] Added Reminder segment","user":{"login":"bsidhipong","id":1375277,"node_id":"MDQ6VXNlcjEzNzUyNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1375277?v=4","gravatar_id":"","url":"https://api.github.com/users/bsidhipong","html_url":"https://github.com/bsidhipong","followers_url":"https://api.github.com/users/bsidhipong/followers","following_url":"https://api.github.com/users/bsidhipong/following{/other_user}","gists_url":"https://api.github.com/users/bsidhipong/gists{/gist_id}","starred_url":"https://api.github.com/users/bsidhipong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsidhipong/subscriptions","organizations_url":"https://api.github.com/users/bsidhipong/orgs","repos_url":"https://api.github.com/users/bsidhipong/repos","events_url":"https://api.github.com/users/bsidhipong/events{/privacy}","received_events_url":"https://api.github.com/users/bsidhipong/received_events","type":"User","site_admin":false},"body":"#### Reminder segment\r\nA reminder segment named \"reminder\" that evaluates the current time against an array of reminders and display the associated icon(s).\r\n \r\n#### Description\r\nGiven a P9K_REMINDER_RULES array of strings (day, time, and icons separated by space), evaluate the current time of day against the array and output the appropriate icon(s).\r\n\r\nP9K_REMINDER_RULES=(\r\n\t\"mon-sat 08:30-10:00 $P9K_REMINDER_HOT_BEVERAGE\"\r\n\t\"sun 10:00-18:00 $P9K_REMINDER_TEACUP_WITHOUT_HANDLE\"\r\n\t\"* 20:30-23:59 $P9K_REMINDER_SLEEPING_FACE\"\r\n\t\"* 21:30-23:59 $P9K_REMINDER_PERSON_IN_BED\"\r\n)\r\n\r\n![reminder-screenshot](https://user-images.githubusercontent.com/1375277/48569658-f3ba2a00-e8c7-11e8-9127-3824b9a857fe.png)\r\n\r\n#### Questions\r\nIt'd be great if you can have a look and suggest what unit tests might be necessary.\r\n","created_at":"2018-11-15T17:17:37Z","updated_at":"2018-11-20T00:37:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1ed98290202d2d826c21d6f34d10bd0d5473335","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":253147701,"node_id":"MDU6TGFiZWwyNTMxNDc3MDE=","url":"https://api.github.com/repos/bhilburn/powerlevel9k/labels/next","name":"next","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/1069/commits","review_comments_url":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/1069/comments","review_comment_url":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/1069/comments","statuses_url":"https://api.github.com/repos/bhilburn/powerlevel9k/statuses/f39800a9e16c3d54de3734fe71b15ed4f0801c69","head":{"label":"bsidhipong:reminder","ref":"reminder","sha":"f39800a9e16c3d54de3734fe71b15ed4f0801c69","user":{"login":"bsidhipong","id":1375277,"node_id":"MDQ6VXNlcjEzNzUyNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1375277?v=4","gravatar_id":"","url":"https://api.github.com/users/bsidhipong","html_url":"https://github.com/bsidhipong","followers_url":"https://api.github.com/users/bsidhipong/followers","following_url":"https://api.github.com/users/bsidhipong/following{/other_user}","gists_url":"https://api.github.com/users/bsidhipong/gists{/gist_id}","starred_url":"https://api.github.com/users/bsidhipong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsidhipong/subscriptions","organizations_url":"https://api.github.com/users/bsidhipong/orgs","repos_url":"https://api.github.com/users/bsidhipong/repos","events_url":"https://api.github.com/users/bsidhipong/events{/privacy}","received_events_url":"https://api.github.com/users/bsidhipong/received_events","type":"User","site_admin":false},"repo":{"id":157471606,"node_id":"MDEwOlJlcG9zaXRvcnkxNTc0NzE2MDY=","name":"powerlevel9k","full_name":"bsidhipong/powerlevel9k","private":false,"owner":{"login":"bsidhipong","id":1375277,"node_id":"MDQ6VXNlcjEzNzUyNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1375277?v=4","gravatar_id":"","url":"https://api.github.com/users/bsidhipong","html_url":"https://github.com/bsidhipong","followers_url":"https://api.github.com/users/bsidhipong/followers","following_url":"https://api.github.com/users/bsidhipong/following{/other_user}","gists_url":"https://api.github.com/users/bsidhipong/gists{/gist_id}","starred_url":"https://api.github.com/users/bsidhipong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsidhipong/subscriptions","organizations_url":"https://api.github.com/users/bsidhipong/orgs","repos_url":"https://api.github.com/users/bsidhipong/repos","events_url":"https://api.github.com/users/bsidhipong/events{/privacy}","received_events_url":"https://api.github.com/users/bsidhipong/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bsidhipong/powerlevel9k","description":"The most awesome Powerline theme for ZSH around!","fork":true,"url":"https://api.github.com/repos/bsidhipong/powerlevel9k","forks_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/forks","keys_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/teams","hooks_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/hooks","issue_events_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/issues/events{/number}","events_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/events","assignees_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/assignees{/user}","branches_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/branches{/branch}","tags_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/tags","blobs_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/git/refs{/sha}","trees_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/statuses/{sha}","languages_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/languages","stargazers_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/stargazers","contributors_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/contributors","subscribers_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/subscribers","subscription_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/subscription","commits_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/commits{/sha}","git_commits_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/git/commits{/sha}","comments_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/comments{/number}","issue_comment_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/issues/comments{/number}","contents_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/contents/{+path}","compare_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/merges","archive_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/downloads","issues_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/issues{/number}","pulls_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/pulls{/number}","milestones_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/milestones{/number}","notifications_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/labels{/name}","releases_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/releases{/id}","deployments_url":"https://api.github.com/repos/bsidhipong/powerlevel9k/deployments","created_at":"2018-11-14T01:29:40Z","updated_at":"2018-11-14T01:29:42Z","pushed_at":"2018-11-14T04:00:26Z","git_url":"git://github.com/bsidhipong/powerlevel9k.git","ssh_url":"git@github.com:bsidhipong/powerlevel9k.git","clone_url":"https://github.com/bsidhipong/powerlevel9k.git","svn_url":"https://github.com/bsidhipong/powerlevel9k","homepage":"","size":2366,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bhilburn:next","ref":"next","sha":"da65a22c16b06cc062d9c4f6d1e668af7a361625","user":{"login":"bhilburn","id":569571,"node_id":"MDQ6VXNlcjU2OTU3MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/569571?v=4","gravatar_id":"","url":"https://api.github.com/users/bhilburn","html_url":"https://github.com/bhilburn","followers_url":"https://api.github.com/users/bhilburn/followers","following_url":"https://api.github.com/users/bhilburn/following{/other_user}","gists_url":"https://api.github.com/users/bhilburn/gists{/gist_id}","starred_url":"https://api.github.com/users/bhilburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhilburn/subscriptions","organizations_url":"https://api.github.com/users/bhilburn/orgs","repos_url":"https://api.github.com/users/bhilburn/repos","events_url":"https://api.github.com/users/bhilburn/events{/privacy}","received_events_url":"https://api.github.com/users/bhilburn/received_events","type":"User","site_admin":false},"repo":{"id":30003816,"node_id":"MDEwOlJlcG9zaXRvcnkzMDAwMzgxNg==","name":"powerlevel9k","full_name":"bhilburn/powerlevel9k","private":false,"owner":{"login":"bhilburn","id":569571,"node_id":"MDQ6VXNlcjU2OTU3MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/569571?v=4","gravatar_id":"","url":"https://api.github.com/users/bhilburn","html_url":"https://github.com/bhilburn","followers_url":"https://api.github.com/users/bhilburn/followers","following_url":"https://api.github.com/users/bhilburn/following{/other_user}","gists_url":"https://api.github.com/users/bhilburn/gists{/gist_id}","starred_url":"https://api.github.com/users/bhilburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhilburn/subscriptions","organizations_url":"https://api.github.com/users/bhilburn/orgs","repos_url":"https://api.github.com/users/bhilburn/repos","events_url":"https://api.github.com/users/bhilburn/events{/privacy}","received_events_url":"https://api.github.com/users/bhilburn/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bhilburn/powerlevel9k","description":"The most awesome Powerline theme for ZSH around!","fork":false,"url":"https://api.github.com/repos/bhilburn/powerlevel9k","forks_url":"https://api.github.com/repos/bhilburn/powerlevel9k/forks","keys_url":"https://api.github.com/repos/bhilburn/powerlevel9k/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bhilburn/powerlevel9k/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bhilburn/powerlevel9k/teams","hooks_url":"https://api.github.com/repos/bhilburn/powerlevel9k/hooks","issue_events_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/events{/number}","events_url":"https://api.github.com/repos/bhilburn/powerlevel9k/events","assignees_url":"https://api.github.com/repos/bhilburn/powerlevel9k/assignees{/user}","branches_url":"https://api.github.com/repos/bhilburn/powerlevel9k/branches{/branch}","tags_url":"https://api.github.com/repos/bhilburn/powerlevel9k/tags","blobs_url":"https://api.github.com/repos/bhilburn/powerlevel9k/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bhilburn/powerlevel9k/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bhilburn/powerlevel9k/git/refs{/sha}","trees_url":"https://api.github.com/repos/bhilburn/powerlevel9k/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bhilburn/powerlevel9k/statuses/{sha}","languages_url":"https://api.github.com/repos/bhilburn/powerlevel9k/languages","stargazers_url":"https://api.github.com/repos/bhilburn/powerlevel9k/stargazers","contributors_url":"https://api.github.com/repos/bhilburn/powerlevel9k/contributors","subscribers_url":"https://api.github.com/repos/bhilburn/powerlevel9k/subscribers","subscription_url":"https://api.github.com/repos/bhilburn/powerlevel9k/subscription","commits_url":"https://api.github.com/repos/bhilburn/powerlevel9k/commits{/sha}","git_commits_url":"https://api.github.com/repos/bhilburn/powerlevel9k/git/commits{/sha}","comments_url":"https://api.github.com/repos/bhilburn/powerlevel9k/comments{/number}","issue_comment_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/comments{/number}","contents_url":"https://api.github.com/repos/bhilburn/powerlevel9k/contents/{+path}","compare_url":"https://api.github.com/repos/bhilburn/powerlevel9k/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bhilburn/powerlevel9k/merges","archive_url":"https://api.github.com/repos/bhilburn/powerlevel9k/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bhilburn/powerlevel9k/downloads","issues_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues{/number}","pulls_url":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls{/number}","milestones_url":"https://api.github.com/repos/bhilburn/powerlevel9k/milestones{/number}","notifications_url":"https://api.github.com/repos/bhilburn/powerlevel9k/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bhilburn/powerlevel9k/labels{/name}","releases_url":"https://api.github.com/repos/bhilburn/powerlevel9k/releases{/id}","deployments_url":"https://api.github.com/repos/bhilburn/powerlevel9k/deployments","created_at":"2015-01-29T04:36:00Z","updated_at":"2018-11-20T00:20:14Z","pushed_at":"2018-11-19T23:58:56Z","git_url":"git://github.com/bhilburn/powerlevel9k.git","ssh_url":"git@github.com:bhilburn/powerlevel9k.git","clone_url":"https://github.com/bhilburn/powerlevel9k.git","svn_url":"https://github.com/bhilburn/powerlevel9k","homepage":"","size":2434,"stargazers_count":7045,"watchers_count":7045,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":587,"mirror_url":null,"archived":false,"open_issues_count":87,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":587,"open_issues":87,"watchers":7045,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/1069"},"html":{"href":"https://github.com/bhilburn/powerlevel9k/pull/1069"},"issue":{"href":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/1069"},"comments":{"href":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/1069/comments"},"review_comments":{"href":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/1069/comments"},"review_comment":{"href":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/1069/commits"},"statuses":{"href":"https://api.github.com/repos/bhilburn/powerlevel9k/statuses/f39800a9e16c3d54de3734fe71b15ed4f0801c69"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dritter"}}