{"action":"created","comment":{"url":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/comments/81195873","pull_request_review_id":2193913,"id":81195873,"diff_hunk":"@@ -20,9 +20,18 @@ pmset_battery_remaining_time() {\n print_battery_remain() {\n \tif command_exists \"pmset\"; then\n \t\tpmset_battery_remaining_time\n+    echo \"HELLL\"\n \telif command_exists \"upower\"; then\n \t\tbattery=$(upower -e | grep battery | head -1)\n-\t\tupower -i $battery | grep remain | awk '{print $4}'\n+    if is_chrome; then\n+      if battery_discharging; then\n+        upower -i $battery | grep 'time to empty' | awk '{printf \"- %s %s left\", $4, $5}'\n+      else\n+        upower -i $battery | grep 'time to full' | awk '{printf \"- %s %s till full\", $4, $5}'\n+      fi\n+    else\n+      upower -i $battery | grep remain | awk '{print $4}'\n+    fi","path":"scripts/battery_remain.sh","position":null,"original_position":16,"commit_id":"7b2131d7f432d4309bd764b79f65241f9362135c","original_commit_id":"5470a9e7e6512fc026f6d7b23f445e7dc307f83e","user":{"login":"forkjoseph","id":12002307,"avatar_url":"https://avatars.githubusercontent.com/u/12002307?v=3","gravatar_id":"","url":"https://api.github.com/users/forkjoseph","html_url":"https://github.com/forkjoseph","followers_url":"https://api.github.com/users/forkjoseph/followers","following_url":"https://api.github.com/users/forkjoseph/following{/other_user}","gists_url":"https://api.github.com/users/forkjoseph/gists{/gist_id}","starred_url":"https://api.github.com/users/forkjoseph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkjoseph/subscriptions","organizations_url":"https://api.github.com/users/forkjoseph/orgs","repos_url":"https://api.github.com/users/forkjoseph/repos","events_url":"https://api.github.com/users/forkjoseph/events{/privacy}","received_events_url":"https://api.github.com/users/forkjoseph/received_events","type":"User","site_admin":false},"body":"Not sure it worked....","created_at":"2016-09-29T17:53:48Z","updated_at":"2016-09-29T17:53:49Z","html_url":"https://github.com/tmux-plugins/tmux-battery/pull/22#discussion_r81195873","pull_request_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/comments/81195873"},"html":{"href":"https://github.com/tmux-plugins/tmux-battery/pull/22#discussion_r81195873"},"pull_request":{"href":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/22","id":58967860,"html_url":"https://github.com/tmux-plugins/tmux-battery/pull/22","diff_url":"https://github.com/tmux-plugins/tmux-battery/pull/22.diff","patch_url":"https://github.com/tmux-plugins/tmux-battery/pull/22.patch","issue_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/issues/22","number":22,"state":"open","locked":false,"title":"Chromebook Support for battery stat","user":{"login":"forkjoseph","id":12002307,"avatar_url":"https://avatars.githubusercontent.com/u/12002307?v=3","gravatar_id":"","url":"https://api.github.com/users/forkjoseph","html_url":"https://github.com/forkjoseph","followers_url":"https://api.github.com/users/forkjoseph/followers","following_url":"https://api.github.com/users/forkjoseph/following{/other_user}","gists_url":"https://api.github.com/users/forkjoseph/gists{/gist_id}","starred_url":"https://api.github.com/users/forkjoseph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkjoseph/subscriptions","organizations_url":"https://api.github.com/users/forkjoseph/orgs","repos_url":"https://api.github.com/users/forkjoseph/repos","events_url":"https://api.github.com/users/forkjoseph/events{/privacy}","received_events_url":"https://api.github.com/users/forkjoseph/received_events","type":"User","site_admin":false},"body":"Chromebook with crouton mounts its stateful Ubuntu to /home/.shadow partition. \r\n\r\nAlso, its upower has unique printf format. \r\n\r\nThe script was tested on Asus C300 and Samsung 2 XE500C12I (former with Intel and later with ARM).\r\n\r\nIt should work seamlessly with other Chromebooks. ","created_at":"2016-02-10T22:54:52Z","updated_at":"2016-09-29T17:53:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbadc4a6e7a2ca20de4cc0a87c1925ce85e2e9f7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/22/commits","review_comments_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/22/comments","review_comment_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/issues/22/comments","statuses_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/statuses/7b2131d7f432d4309bd764b79f65241f9362135c","head":{"label":"forkjoseph:master","ref":"master","sha":"7b2131d7f432d4309bd764b79f65241f9362135c","user":{"login":"forkjoseph","id":12002307,"avatar_url":"https://avatars.githubusercontent.com/u/12002307?v=3","gravatar_id":"","url":"https://api.github.com/users/forkjoseph","html_url":"https://github.com/forkjoseph","followers_url":"https://api.github.com/users/forkjoseph/followers","following_url":"https://api.github.com/users/forkjoseph/following{/other_user}","gists_url":"https://api.github.com/users/forkjoseph/gists{/gist_id}","starred_url":"https://api.github.com/users/forkjoseph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkjoseph/subscriptions","organizations_url":"https://api.github.com/users/forkjoseph/orgs","repos_url":"https://api.github.com/users/forkjoseph/repos","events_url":"https://api.github.com/users/forkjoseph/events{/privacy}","received_events_url":"https://api.github.com/users/forkjoseph/received_events","type":"User","site_admin":false},"repo":{"id":51478345,"name":"tmux-battery","full_name":"forkjoseph/tmux-battery","owner":{"login":"forkjoseph","id":12002307,"avatar_url":"https://avatars.githubusercontent.com/u/12002307?v=3","gravatar_id":"","url":"https://api.github.com/users/forkjoseph","html_url":"https://github.com/forkjoseph","followers_url":"https://api.github.com/users/forkjoseph/followers","following_url":"https://api.github.com/users/forkjoseph/following{/other_user}","gists_url":"https://api.github.com/users/forkjoseph/gists{/gist_id}","starred_url":"https://api.github.com/users/forkjoseph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forkjoseph/subscriptions","organizations_url":"https://api.github.com/users/forkjoseph/orgs","repos_url":"https://api.github.com/users/forkjoseph/repos","events_url":"https://api.github.com/users/forkjoseph/events{/privacy}","received_events_url":"https://api.github.com/users/forkjoseph/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/forkjoseph/tmux-battery","description":"Plug and play battery percentage and icon indicator for Tmux.","fork":true,"url":"https://api.github.com/repos/forkjoseph/tmux-battery","forks_url":"https://api.github.com/repos/forkjoseph/tmux-battery/forks","keys_url":"https://api.github.com/repos/forkjoseph/tmux-battery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/forkjoseph/tmux-battery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/forkjoseph/tmux-battery/teams","hooks_url":"https://api.github.com/repos/forkjoseph/tmux-battery/hooks","issue_events_url":"https://api.github.com/repos/forkjoseph/tmux-battery/issues/events{/number}","events_url":"https://api.github.com/repos/forkjoseph/tmux-battery/events","assignees_url":"https://api.github.com/repos/forkjoseph/tmux-battery/assignees{/user}","branches_url":"https://api.github.com/repos/forkjoseph/tmux-battery/branches{/branch}","tags_url":"https://api.github.com/repos/forkjoseph/tmux-battery/tags","blobs_url":"https://api.github.com/repos/forkjoseph/tmux-battery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/forkjoseph/tmux-battery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/forkjoseph/tmux-battery/git/refs{/sha}","trees_url":"https://api.github.com/repos/forkjoseph/tmux-battery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/forkjoseph/tmux-battery/statuses/{sha}","languages_url":"https://api.github.com/repos/forkjoseph/tmux-battery/languages","stargazers_url":"https://api.github.com/repos/forkjoseph/tmux-battery/stargazers","contributors_url":"https://api.github.com/repos/forkjoseph/tmux-battery/contributors","subscribers_url":"https://api.github.com/repos/forkjoseph/tmux-battery/subscribers","subscription_url":"https://api.github.com/repos/forkjoseph/tmux-battery/subscription","commits_url":"https://api.github.com/repos/forkjoseph/tmux-battery/commits{/sha}","git_commits_url":"https://api.github.com/repos/forkjoseph/tmux-battery/git/commits{/sha}","comments_url":"https://api.github.com/repos/forkjoseph/tmux-battery/comments{/number}","issue_comment_url":"https://api.github.com/repos/forkjoseph/tmux-battery/issues/comments{/number}","contents_url":"https://api.github.com/repos/forkjoseph/tmux-battery/contents/{+path}","compare_url":"https://api.github.com/repos/forkjoseph/tmux-battery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/forkjoseph/tmux-battery/merges","archive_url":"https://api.github.com/repos/forkjoseph/tmux-battery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/forkjoseph/tmux-battery/downloads","issues_url":"https://api.github.com/repos/forkjoseph/tmux-battery/issues{/number}","pulls_url":"https://api.github.com/repos/forkjoseph/tmux-battery/pulls{/number}","milestones_url":"https://api.github.com/repos/forkjoseph/tmux-battery/milestones{/number}","notifications_url":"https://api.github.com/repos/forkjoseph/tmux-battery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/forkjoseph/tmux-battery/labels{/name}","releases_url":"https://api.github.com/repos/forkjoseph/tmux-battery/releases{/id}","deployments_url":"https://api.github.com/repos/forkjoseph/tmux-battery/deployments","created_at":"2016-02-10T22:48:03Z","updated_at":"2016-02-10T22:48:04Z","pushed_at":"2016-09-29T17:52:48Z","git_url":"git://github.com/forkjoseph/tmux-battery.git","ssh_url":"git@github.com:forkjoseph/tmux-battery.git","clone_url":"https://github.com/forkjoseph/tmux-battery.git","svn_url":"https://github.com/forkjoseph/tmux-battery","homepage":null,"size":89,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"tmux-plugins:master","ref":"master","sha":"d2e7f7bc28196ba3110164658a61c22697a9f9ec","user":{"login":"tmux-plugins","id":8289877,"avatar_url":"https://avatars.githubusercontent.com/u/8289877?v=3","gravatar_id":"","url":"https://api.github.com/users/tmux-plugins","html_url":"https://github.com/tmux-plugins","followers_url":"https://api.github.com/users/tmux-plugins/followers","following_url":"https://api.github.com/users/tmux-plugins/following{/other_user}","gists_url":"https://api.github.com/users/tmux-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/tmux-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmux-plugins/subscriptions","organizations_url":"https://api.github.com/users/tmux-plugins/orgs","repos_url":"https://api.github.com/users/tmux-plugins/repos","events_url":"https://api.github.com/users/tmux-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/tmux-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":19939610,"name":"tmux-battery","full_name":"tmux-plugins/tmux-battery","owner":{"login":"tmux-plugins","id":8289877,"avatar_url":"https://avatars.githubusercontent.com/u/8289877?v=3","gravatar_id":"","url":"https://api.github.com/users/tmux-plugins","html_url":"https://github.com/tmux-plugins","followers_url":"https://api.github.com/users/tmux-plugins/followers","following_url":"https://api.github.com/users/tmux-plugins/following{/other_user}","gists_url":"https://api.github.com/users/tmux-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/tmux-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmux-plugins/subscriptions","organizations_url":"https://api.github.com/users/tmux-plugins/orgs","repos_url":"https://api.github.com/users/tmux-plugins/repos","events_url":"https://api.github.com/users/tmux-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/tmux-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tmux-plugins/tmux-battery","description":"Plug and play battery percentage and icon indicator for Tmux.","fork":false,"url":"https://api.github.com/repos/tmux-plugins/tmux-battery","forks_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/forks","keys_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/teams","hooks_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/hooks","issue_events_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/issues/events{/number}","events_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/events","assignees_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/assignees{/user}","branches_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/branches{/branch}","tags_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/tags","blobs_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/statuses/{sha}","languages_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/languages","stargazers_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/stargazers","contributors_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/contributors","subscribers_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/subscribers","subscription_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/subscription","commits_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/contents/{+path}","compare_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/merges","archive_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/downloads","issues_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/issues{/number}","pulls_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls{/number}","milestones_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/milestones{/number}","notifications_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/labels{/name}","releases_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/releases{/id}","deployments_url":"https://api.github.com/repos/tmux-plugins/tmux-battery/deployments","created_at":"2014-05-19T11:40:55Z","updated_at":"2016-09-26T13:27:54Z","pushed_at":"2016-09-29T17:52:49Z","git_url":"git://github.com/tmux-plugins/tmux-battery.git","ssh_url":"git@github.com:tmux-plugins/tmux-battery.git","clone_url":"https://github.com/tmux-plugins/tmux-battery.git","svn_url":"https://github.com/tmux-plugins/tmux-battery","homepage":null,"size":151,"stargazers_count":98,"watchers_count":98,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":9,"forks":28,"open_issues":9,"watchers":98,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/22"},"html":{"href":"https://github.com/tmux-plugins/tmux-battery/pull/22"},"issue":{"href":"https://api.github.com/repos/tmux-plugins/tmux-battery/issues/22"},"comments":{"href":"https://api.github.com/repos/tmux-plugins/tmux-battery/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmux-plugins/tmux-battery/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/tmux-plugins/tmux-battery/statuses/7b2131d7f432d4309bd764b79f65241f9362135c"}}}}
{"actor":{"display_login":"forkjoseph"}}