Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Gadominas

macrumors newbie
Original poster
Dec 18, 2014
8
0
Hello to all,

Just recently I have released a small utility which I have build for my self just to track the battery charge level based on battery amperage at my menubar. Simply because OSX tells a little lie about the your fully charged battery level.

So - http://ec2-54-149-58-132.us-west-2.compute.amazonaws.com/. It cost nothing and it’s very simple and easy to use.

In case you can extract the information you need with shell script then you can track it on your OSX menubar.

Simple how it works:
howitworks.jpg


Video guidelines how to configure this little tool.

Out of the box I have build few scripts just to demonstrate what you can achieve with it:

bloombergview_preface.jpg

Stock market trend indicators from Bloomberg.com
Currency exchange rates, stock selling prices, metal and everything else from bloomberg.com on your OSX system statusbar.

preface_gmail_inbox.jpg

Keep an eye on your GMail inboxes by tracking unread emails.
Single or multiple GMail inboxes can be put under surveillance by tracking unread emails in your inboxes.

preface_battery.jpg

Don't trust OSX on your battery charge level as it says little lie about it.
Real battery charge level can be accurately calculated based on battery current and designed amperage.

weather_preface.jpg

Keep an eye on current weather conditions on single or multiple locations.
Temperature and cloud coverage information for your preconfigured location.

preface_facebook.jpg

Keep an eye on your facebook account unseen notification.
Facebook unseen notification counter at your OSX StatusBar

cyclecount_preface.jpg

Batteries have a limited amount of charge cycles before they are considered to be consumed.
Are you aware of remaining number? Keep an eye on this counter and maybe turn-on the ECO mode.

If you will find this useful or you will start some interesting scripts for this little tool share with me your experience :)

Enjoy!
 
Last edited:

Partron22

macrumors 68030
Apr 13, 2011
2,655
808
Yes
This is quite nice.
I think I'll connect it up to my Arduino driven barometric pressure gauge.
A little iTunes Current track display should be easy to work out too.
 
Last edited:

Gadominas

macrumors newbie
Original poster
Dec 18, 2014
8
0
This is quite nice.
I think I'll connect it up to my Arduino driven barometric pressure gauge.
A little iTunes Current track display should be easy to work out too.

That should be straightforward - http://stackoverflow.com/questions/3918032/bash-serial-i-o-and-arduino

I will try to add the example on reading the data from Arduino to existing script toolbox, but if you will come up with something sharable, let me know.

----------

This is quite nice.
I think I'll connect it up to my Arduino driven barometric pressure gauge.
A little iTunes Current track display should be easy to work out too.

Code:
#!/bin/bash

currentTrack() {	
	currenTrack=$(osascript -e 'tell application "iTunes" to if player state is playing then "" & name of current track & " - " & artist of current track' )

	if [ ! -z "$currenTrack" -a "$currenTrack"!=" " ];
		then {
			printf "#$currenTrack"			
		} else
			printf "#"
	fi	
}

run() {
	currentTrack
}

run
 

Partron22

macrumors 68030
Apr 13, 2011
2,655
808
Yes
Got both iTunes track info and barometer data showing in the menu bar with a single simple script:

2ptb729.jpg


(hPa is hectoPascal of atmospheric pressure. It updates every six seconds )
The iTunes Artist track is nice and unobtrusive. Out of the way, yet instantly available when I wonder what I'm listening to, I've tried a lot of these things over the years, and I like this home rolled solution best.

Used (open source c) https://github.com/todbot/arduino-serial/ for Arduino USB serial rather than the old SerialPort X OSAX. That greatly eased serial communication through Bash:
Code:
curPress=$(arduino-serial -q -b 115200 -p /dev/cu.usbserial-A9007LXq -d 1000 -s p -d 100 -r)
(p triggers my Arduino to print current pressure).

Of course in addition to being useful, ShellWrangler may be hideously abused for purposes of self-aggrandizement:
24ys1o0.jpg


Emoji is wonderful for this purpose.
 

Gadominas

macrumors newbie
Original poster
Dec 18, 2014
8
0
The iTunes Artist track is nice and unobtrusive. Out of the way, yet instantly available when I wonder what I'm listening to, I've tried a lot of these things over the years, and I like this home rolled solution best.
It’s very nice to hear that from a happy user!

Of course in addition to being useful, ShellWrangler may be hideously abused for purposes of self-aggrandizement:
Image
desc "hideously abused for purposes of self-aggrandizement" :)

Emoji is wonderful for this purpose.
Indeed. I found this by accident playing with unicode characters and then jumped to Emoji.

p.s. thanks for iTunes idea - http://ec2-54-149-58-132.us-west-2.compute.amazonaws.com/blog/itunesear.html (all credits are yours)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.