{"action":"created","issue":{"url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/366","repository_url":"https://api.github.com/repos/bhilburn/powerlevel9k","labels_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/366/labels{/name}","comments_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/366/comments","events_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/366/events","html_url":"https://github.com/bhilburn/powerlevel9k/pull/366","id":196538411,"number":366,"title":"migrated battery segment to use pmset on OSX over ioreg","user":{"login":"rjorgenson","id":44096,"avatar_url":"https://avatars.githubusercontent.com/u/44096?v=3","gravatar_id":"","url":"https://api.github.com/users/rjorgenson","html_url":"https://github.com/rjorgenson","followers_url":"https://api.github.com/users/rjorgenson/followers","following_url":"https://api.github.com/users/rjorgenson/following{/other_user}","gists_url":"https://api.github.com/users/rjorgenson/gists{/gist_id}","starred_url":"https://api.github.com/users/rjorgenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjorgenson/subscriptions","organizations_url":"https://api.github.com/users/rjorgenson/orgs","repos_url":"https://api.github.com/users/rjorgenson/repos","events_url":"https://api.github.com/users/rjorgenson/events{/privacy}","received_events_url":"https://api.github.com/users/rjorgenson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-19T22:35:41Z","updated_at":"2016-12-30T00:32:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bhilburn/powerlevel9k/pulls/366","html_url":"https://github.com/bhilburn/powerlevel9k/pull/366","diff_url":"https://github.com/bhilburn/powerlevel9k/pull/366.diff","patch_url":"https://github.com/bhilburn/powerlevel9k/pull/366.patch"},"body":"Initial rewrite of battery segment to use pmset. Any help testing and finding edge cases will be helpful =]"},"comment":{"url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/comments/269715067","html_url":"https://github.com/bhilburn/powerlevel9k/pull/366#issuecomment-269715067","issue_url":"https://api.github.com/repos/bhilburn/powerlevel9k/issues/366","id":269715067,"user":{"login":"rjorgenson","id":44096,"avatar_url":"https://avatars.githubusercontent.com/u/44096?v=3","gravatar_id":"","url":"https://api.github.com/users/rjorgenson","html_url":"https://github.com/rjorgenson","followers_url":"https://api.github.com/users/rjorgenson/followers","following_url":"https://api.github.com/users/rjorgenson/following{/other_user}","gists_url":"https://api.github.com/users/rjorgenson/gists{/gist_id}","starred_url":"https://api.github.com/users/rjorgenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjorgenson/subscriptions","organizations_url":"https://api.github.com/users/rjorgenson/orgs","repos_url":"https://api.github.com/users/rjorgenson/repos","events_url":"https://api.github.com/users/rjorgenson/events{/privacy}","received_events_url":"https://api.github.com/users/rjorgenson/received_events","type":"User","site_admin":false},"created_at":"2016-12-30T00:32:30Z","updated_at":"2016-12-30T00:32:30Z","body":"So after a little over a week of using this full time I see no issues with it and haven't run into any edge cases. I did some basic speed testing comparing pmset to ioreg and didn't really see any noticeable difference there. The only difference really between the two implementations is that pmset seems to do it's own thing with what information it presents to the user. It's not the same as the data reported by ioreg but it does appear to be the source of data for the OS X system battery status bar menu. You can see in the screenshot both pmset and the system battery report 3:36 as the time remaining with 100% charge. ioreg reports the same time remining but it shows the battery capacity as 4005/4214 which is about 95%(the battery meter in the lower right corner of the screen is using ioreg). This was about 10 minutes after pulling my laptop off the charger and using it to let it discharge a bit so ioreg seems a bit more accurate and pmset seems to do some voodoo on their own to determine battery percentage. The one thing I didn't check was the ioreg capacity levels when it was fully charged. It's possible the MaxCapacity is actually a bit higher than the circuitry actually charges the battery and pmset takes that into account where ioreg does not. Personally I like that pmset shows the same data as the system battery. Even if it's less 'accurate' it wouldn't give users any reason to wonder why they are different if they end up using both. Anyone else have an opinion on that?\r\n\r\n![screen shot 2016-12-29 at 5 23 20 pm](https://cloud.githubusercontent.com/assets/44096/21557603/e8995d6a-cdeb-11e6-9bbd-bfb05609bf83.png)\r\n"}}
{"actor":{"display_login":"rjorgenson"}}