Hey, I'm Sindre. I make things and work on open source full-time.
In December last year, Apple pushed out macOS Sierra 10.12.2 which removed the time remaining estimate from the battery icon menu. I quite liked being able to see approximately how much time I have left, as I often sit in coffee shops using only battery. So I decided to do something about it. I had never done macOS development before nor used Swift, so this was an exciting learning experience.
In the app, you can choose to either show the remaining battery time or percentage in the menu bar icon, the other value is shown in the menu.
Tip: You can hide the system battery icon by dragging the icon out of the menu bar while pressing the Command key.
@sindresorhus That sounds quite useful! I remember even contacting Apple Support to ask why am I not being able to view the time remaining (yes, that was stupid - should have read update log of the current update...).
Well, also, how much time did it take you to learn Swift programming as well as get an idea of development on Mac and macOS APIs, and then to create this?
@abhib I started developing the app some days during Christmas, and then got busy until the end of January, when I decided to finish it. I didn't read anything upfront. I just started working on the app and learned as I went. I was surprised how easy Swift was to pick up. I got productive very quickly. Creating a menu bar app is also fairly straightforward, but it got complicated by the need for a dynamic icon with text inside. I spent so much time getting that text to stay perfectly in the middle of the icon. In general, the Cocoa APIs were the obstacle, not Swift. It didn't help that Swift 3 renamed all the things, so pretty much all examples and docs out there didn't compile or apply.
@vallieres I guess I could just hardcode Chrome 😝. Seriously though, I'm considering it, but would like to solve it in a better way than just a list of apps, like the default battery menu, which is not very actionable. I think https://www.producthunt.com/post... is a cool idea. Maybe I can borrow some ideas from it.
Scratchpad
Scratchpad
Forge
RGB – #6: Rule Them All... Maybe Not
Scratchpad
RGB – #6: Rule Them All... Maybe Not