Battery + System Stats widgets development thread

Proof that I'm working on it! Real-time battery status with optional percentage display:

The battery icon has states for charging and not charging, with graphics for every 10% increment. You'll be able to long-press on the battery icon to get details system stats such as time to charge completion, CPU and memory stats, and more! But I haven't built that part yet, haha.

There's a bit more work to go here which is why I wanted to start a thread about it :slight_smile:

Here's a suite of battery icons I just finished making!

%3C10
10
20
30
40
50
60
70
80
90
100

%3C10-charging
10-charging
20-charging
30-charging
40-charging
50-charging
60-charging
70-charging
80-charging
90-charging
100-charging

@Andreas_Hegenberg I've been writing my own battery widget to support all these states, but feel free to update the built-in one with the ability to support all these different graphics (a la weather) and I'll use that instead! Lack of more detailed customization is what's kept me from using it :slight_smile:

2 Likes

Update - battery widget is now fully functional! Screenshot of my battery being a little bit lower than full:

It's a bit slow, though. I have a feeling this script is not very efficient. @Andreas_Hegenberg any advice?

Here's the current script! (Note that there are some other variables saved in there that will be split out into other scripts later, so don't mind that stuff)

on returnNumbersInString(inputString)
	set s to quoted form of inputString
	do shell script "sed s/[a-zA-Z\\']//g <<< " & s
	set dx to the result
	set numlist to {}
	repeat with i from 1 to count of words in dx
		set this_item to word i of dx
		try
			set this_item to this_item as number
			set the end of numlist to this_item
		end try
	end repeat
	return numlist
end returnNumbersInString

do shell script "pmset -g everything | grep Cycles"
set x to the result

set charger to word 2 of x
if charger contains "Not" then
	set charging to true
else
	set charging to false
end if

if word 1 of x is "AC" then
	set _t to "Time to Full: "
	set pwr to "AC"
else
	set _t to "Time Remaining: "
	set pwr to "Batt"
	set charger to ""
end if

set nums to returnNumbersInString(x)
set percentage to item 1 of nums as integer

if item 5 of nums = 0 then
	set hrmins to " mins"
else if item 5 of nums = 1 then
	set hrmins to " hr"
else
	set hrmins to " hrs"
end if
if item 5 of nums is greater than 4 then
	if pwr is "AC" then
		set t to "Calculating time remaining..."
	end if
else
	if item 6 of nums is less than 10 then
		set theMins to item 6 of nums as string
		set theMins to "0" & theMins as string
	else
		set theMins to item 6 of nums as integer
	end if
	set t to item 5 of nums & ":" & theMins & hrmins
end if

set FCC to item 3 of nums as integer
set designCap to item 4 of nums as integer
set battHealth to (FCC / (designCap / 100))
set battHealth to round (battHealth)
set battHealth to battHealth & "%"

set cycles to item -3 of nums

if charging is true then
	if percentage is greater than or equal to 96 and percentage is less than or equal to 100 then
		set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACNUlEQVR4Ae2YA8xdQRBGa7dRbTOorbA24tq2jahRjai2bds2gtq2Jsn5k6m22btb/jvJedz57nm6u/vifPr06Z8kiAfxIP5HCeJBPIjnF+YIt4QPgkudVAcoLqTi9mPBWBz7Ji75fyaeg1AfdUooQnh7YYIQj/vvbYJwymkSn8vAFbyI+DzpQmkyi1r2xcdhBf1zTeK3GJTdVRiSkHfEISMrGTcN4nyneadrXmi1S/hkyTgVeoS84uR1scjZRUZ8Mj4YxCkeiCC9XgUuIOsyWTlt81QW9WvETwmJ6R2pstqT1fRvFD8nFKKvhaArJVknPYo/EZYIeVzEHwiV6ako6JpEThoNj5UX1kUUj6lHQr6o4o0Zn0N4pzI+ciqMYwL5SOLUkijiPdVp74ZOQ/yqcFu4o+H5URxjoKP4M1vx4Spof4RZNbHzO07ZiG9XIRstpS8KcclvQd5vEx/FmIGMfyE8VzzjK/HxkyoeT0d2c53p/6tifsdNlNDiX82gVYXXFuJef5zbhfKMSyoki4H+oYKuBowtIVzTWY6nw/w+pvwb9CYQXqq8vuSlFU55mICeMgHl87VW6UZvY5U1TeXt/uvWKlCM3kPkbFFZM/xM+f6XtaMJykXGNSU9xEYYdpuXtf43EmvJSK8f97+RMG/d4lkeJCf9dTwIxzNv3fxslpsSMkYYzO2Mwilzm6fNMjfy8+pu6QnEUM/pSyaUU4FbHWU/CrdwKRD+yQriQTyIB/EgHsR98RnUoDZULQx7fQAAAABJRU5ErkJggg=="
	else if percentage is greater than or equal to 86 and percentage is less than or equal to 95 then
		set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACNUlEQVR4Ae2YA8xdQRBGa7dRbTOorbA24tq2jahRjai2bds2gtp2eztJzkumutzy30nOj/d2vj3XiOc4zj+JFbfiVvyPYsWtuBUvKMwT7gifhCh1Wk1QUkjD30+9Gpn7Ni4FvcRzEWqizgjFCO8oTBIS8P/HIEE45XYTn8/AVSxEQgObsiyZxQP2JcRhFf3z3cTvMChnVGFIRt6xCBnZybjtIs4+zZqufanNHsEJyAQVeoy8kuR18+jd85M1zz7/U3GKD0JIb1SBi8i6SlZuPxk/kaN+jfgZISm9o1VWR7Ka/43iF4Qi9LUSdKUm67RB8WfCMiFfFPFHQlV6Kgu6ppCTTsNnFYUNIcVj9UQoEFa8KeNzCR9UxmdOhfHcQD6UOLUsjHhvddq7pdMQvy7cFe5p+H4McwyOKP4iqPhIFXQwxFU1qaE17gQR36lCNgeUvizEJ78Veb9NfAxjBjP+lfBS8YJd4rOjis8zkN1S5f2uXYU17k6pH4iXJLe68Fbl/daDc6dQkXHJhRQx6B8u6GrE2FLCDZUT9XRY0MQl/xa9iYTXKq8/eemFMwYuQM+5ABUwda/Sg96mKmuGytv7192rQAl6j5CzTWXNMnPJN39bO5agPGTcUNLDfGbsDXBba/xBYj0ZGfXn5h8k3B/dEgScJDf99QwIJ3B5dDP2sNyckHHCUP7OzKU9cuGU28/rifnsNp99hL6kL4VQQQVujyj7GYf5QiH7JssUVtyKW3ErbsWt+Bcm6kxE9j1EfAAAAABJRU5ErkJggg=="
	else if percentage is greater than or equal to 76 and percentage is less than or equal to 85 then
		set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACOElEQVR4Ae2YA8xcQRSFa7dRbTOorbA24tq2jahRjai2bds2gtq2ziZnk1u9ybw7bX/MTb4fu3PPfM9I8O3bt1iJF/fiXvy/4sW9uBcvDBaAe+AL0NRZMUFpkI5/Pzc1cu67dClsEs/DUBd1DpRgeGcwBSTi/59tguiUN0h8IQeu4UIk5pcayjOzpGVfYjqsYf/CIPF7HJRbK0xSMO+EIiMnM+4GiHOf5pque6XdPvDNkkki9ATzSjOvB8dI9hnXPPf5AHEWPwghvVkELmHWdWbl/VOfea2z/pL4OZCcvWNFVmdmtYyJ4pdAMfa1AbLSMuusQ/EXYAUooBF/AqqzpyqQNY05GST8rDLYFFI8Ws9AobDizTk+D/gkMr6C8iapiHxYcdaKMOJ9xWnvjkyj+E1wHzyQ8PtxnGOoUvyVrfhoEXQ4xFU1uXqNs2zEd4uQrZbSV0FC5rcB3/6l+DiOGcrxb8BrwSvuEl+BrFcgE7NbM0sr/sp6jRso8xvx0sytCd4rxFUH525QmeNSglRR2D8SyGrCsWXALZGjPR0WdnHJv8PeJOCtyBvIvIzgnIML0EtegAq5ulfpxd7mImuWyNsf4+5VSCn2HmPODpE1x80l3/1t7XgG5WPGLSE9IqBvv+K21umDxEZmZFZkGB4kzI9uiSwnycv+Bg6EE5kf3fQPyy0ZMgEM599ZwTmLDNXDcoTCYCF3m6/AVK/ZlwpUEoE7lbJf6bAQFPFvsry4F/fiXtyLe3FXfAeAdGI06MOmAgAAAABJRU5ErkJggg=="
	else if percentage is greater than or equal to 66 and percentage is less than or equal to 75 then
		set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACGElEQVR4Ae2YA4xeURCFa7dRbTOorRg149q2jahRjai2bds2gnpt42xy/mSiu7nvzfpO8i1nzv89o1BaWlqexIk7cSeeozhxJ+7Em4J94A9IAX7qtfiAtqACfw4HxuJn/6ZL08zE6zFUo96AVgyfCDaBIvw92SaITvVN4vvZeIoLUZT/9ENHZra2nCtKh1Oc328S/8Omukr7XynmPfORUZsZvw3i3Ke5pnt/GnMHpFmyQYQ+Y15b5k0Dd6zXPPd5gziLf/AgfVEEHmLWV2bVZw/zrWApi5M3oCRnV4usicwanhvFP4AWnBsFZJVn1mtF8QhwDDTyIx4CenKmO5C1hTmVJArigQoDTbyKD2V/PZAkMlJBR7OQP3HWMS/is8Vp7xdnpfh38Bf8k/D/a5TEo2zFV4qghx6uqiWVxNNsxG+KkMuW0p9BYc5mu/ga9ixmfwyIFkRxl0gFsqJAFeV9PMp+jZtpJ8VZbXPDwXkTdGVfaVAmAOeXA1mD2NtO+XTYVOOS/4uzxUCsyJvPvMrgjYJ4JC9ATbTuVWZwdqjI2iHy7ua6exXShrNPmHNNZO3SueTr39auZVADZvwQ0stE313921qdB4nzzKhq6FF4kDA/uhWx/JD6nO+nIFzE/Oim87A8nCHrwFL+XB28MY/pPSxn0JRL90deQAwVzbkyoIsIvO5TNhX8oUsz9ybLiTtxJ+7EnbgT1yId5lN9u+XAf4cAAAAASUVORK5CYII="
	else if percentage is greater than or equal to 56 and percentage is less than or equal to 65 then
		set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB/klEQVR4Ae2YA4xdURRFa7dRbTOorRg145pRbStqVCNOatu2bQY1xvaeZP/kjO5/OON7kvV5z37rGSVSU1MLJVbcilvxfMWKW3Er3hrsBj9BMvBTL8QEOoNq/BwWrJHT/kGX1sHEmzBUo16CDgyfDjaDUvye5CaITk1N4ns48DhnorTCquzOzI4u+0rT4Tj795jEf3JQY6XtrwLzHvvIaMiMHwZxbtNc0gPfT7oJUl2yUYQ+Zl5nH+KlmZFsEGfxBw/S50TgfmZ9UlhzrNwRfwnKs3eNyJpekMXfgnbsmwBkVc0F8XBwGLTwI/4f9GdPXyBrK3NqKIsHKhS08io+muObgESRkQK6SwFtcdZhL+JzxGHvu0yj+BfwC/yW8P+1SuKRbsVXiaB7Hs6q5ZXEU92IXxMhF1xKfwAl2Zvn4oHVvITjo0GUIJKbRErm1QpqKW/jke6XuJku2Yh3Lgg75zXQm+MqgkoB2L8CyBqRS4fD1hqn/O/sLQNiRN4C5cNhBE9ArbSuVWayd7TI2lmgr1VIJ/Y+ZM5l/ROQ/mXtOgY1Y8ZXsQDG61/W6t9InGFGbfm7/o2E+datlMuJNGX/EAXhUuZbN52b5bEMWQ+W8XNd8NLcpneznE5rsIebTYqD0Cj2VQK9ROAVn7IpdNgD2tgnWVbciltxK27FrbgWafY8kPNLpbfPAAAAAElFTkSuQmCC"
	else if percentage is greater than or equal to 46 and percentage is less than or equal to 55 then
		set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB+0lEQVR4Ae2YA6wdURRFa7dxbSOorRg145pRbStqVCNOatu2bQblt639k/2S8zUvd+bM5z3JerxnzxqjXGZmZonEiltxK16kWHErbsXbg/3gL0gHXuqNmEB3UIefo4I1ctp/6NI+mHgLhmrUW9CF4bPBdlCB39NMgujU0kn8AAee5kxUVFiVvZnZ1bCvIh1Os/+Ak/hfDmqutP1VY95zDxlNmfHHQZzbNJf00M/T7oJMQ7aK0OfM6+5BvCIz0h3EWfzBhfQlEXiYWd8U1hzLH/G3oCp7N4is2cVZ/CPoxL4pQFZtH8SjwXHQxot4OBjMnoFA1k7+ri0eqEjQzq34eI5vAVJFRgbo7ac467gb8QXisPebvVL8B/gH/kv4/0Yl8VhT8XUi6JGLs2pVJfFME/FbIuSKofQXUJ69hS4eWM0rOD4exAliuUlkAFmxoJ7yNh5rvsSd6ZGPePfisHPeAv05rjqoEYD9a4CsMT4dDttrnPJ/s7cSSBB5S5QPhzE8AbXTulaZy97xImtvsb5WId3Y+5Q51/VPQPqXtZsY1IoZP2W4/mWt/o3EBWbUVxEXNxImt24VDCfSkv0jFIQrON+66dwsT2TIZrCKnxuCt85tejfL2bQHB7jZZIBgFce+GqCfCLzhUTaDDgdAB/sky4pbcStuxa24FdciC4Vak2WaD0PuAAAAAElFTkSuQmCC"
	else if percentage is greater than or equal to 36 and percentage is less than or equal to 45 then
		set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB/UlEQVR4Ae2YA6wcURSGa7dxbSOorRg145pRbStqXDdOatu2bQbFs+1/k3+T8zT77s6Zx3uSb3nPP98YlbKzs8skVtyKW/ESxYpbcSveGRwE/0EmcFPvxAR6gwb8HBOokdP+R5fOgcTbMFSj3oMeDJ8PdoIq/J5hEkSntk7ihzjwLGeiqsKq7M/MnoZ9Velwlv2HnMT/c1Brpe2vFvNeushoyYx/DuLcprmkR36ddR9kG3A/T+hL5vV2IV6VGZkO4iz+YCJNrojAo8z6obDmWN6Ivwc12btFZM0vzeKfQTf2zQCy6nsgHgtOgg5uxCPBcPYMBbJ2SwFFcX9Fg07Bik/m+DYgXWRkgf5eirNOBiO+RBz2/so0iv8CISBUwv+3KonHm4pvEkFPgjir1lQSzzYRvyNCrhlKfwOV2Vvs4v7VvIbjE0GCIJ6bRFbe1QoaKW/j8eZL3Jk+BYj3Lg075x0wmONqgzo+RPgGIGuCR4fDzhqn/L/srQaSRN4K5cNhHE9AnbSuVRayd7LI2l+qr1VIL/Y+Z85N/ROQ/mXtNga1Y8ZvGa5/Wat/I3GJGY1VxOWNhMGtWxXDibRl/xgF4SrOt246N8tTGbIdrOPnpuC9c5vezbKPzuAQN5usIoQmsK8OGCQCb7mUzaLDIdDFPsmy4lbciltxK27FtcgBcRuVdY4fggcAAAAASUVORK5CYII="
	else if percentage is greater than or equal to 26 and percentage is less than or equal to 35 then
		set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB6ElEQVR4Ae2YAURDQRjHa4sSBVBC2pK9AGUxSgAgQgwgEgxACElSQAAJAdAjDIMQZSxEBgVKCrQVUrUV1N71xX98pu65ve+pcR8/XnX3v1/vbu/erU0p1ZJYcStuxf8UK27FrbhD7BFloqaC1TkbIEn04vqZ0BbGLsHF8ROPIVSiLogxhGeIbSKCnz9NguAU14m7aJjDPxEVmMoUMscN+0XhkEN/VydeRqMhofXXhbxigIxBZJQ04ljTuNMzl4sFQvlQ0AxaRF4ygHgUGTWNOAq/gJgvvwTuI+taYOZQ4YtvsKxMq4gvELx6QhB/IbLESBDxRxY4TfDa4QKC4vV6IhLNiqfRPkZ8sAyPSIUpjso2I77EHnt3PA3iN8Q98cDB3zeFxCum4uss6LSJXbVTSFyZiOdZyKGh9BXRbiAtKl6f5hW0fyOqjAqWhNc4rUSf8BqvmN9xPRM/iCf/w4czT0xpBlsjeM2F9Dh0JHfODuKd5S0LPw5fsQElpLf8NMvabaV3lTPkHMlvQHKvtScNQcPIuNXLyL7WShwkDpDRLyHODxImR7eI4SBx9J8VEI7oj24yh+V5hGwRq7gewNauL6HD8jcO4WLZeMq/qujXTUyywOOAsh4cXGLUfpNlxa24FbfiVtyKS/EFcCypERicPW8AAAAASUVORK5CYII="
	else if percentage is greater than or equal to 16 and percentage is less than or equal to 25 then
		set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB0ElEQVR4Ae2YAUQDURjHa4smCqCEtCVbgLIYEQCIEAFEggGAkIQCAkgIgI4wDEIULEQGBUoKtBWo2gpq9/rwxyd51+195xzfx4/rde//ftu93bt3PcaYRKLiKq7isaLiKq7iBeKQaBId41ZXbIAiMYTj16COGLsBl0KQeBahEnVNTCO8TOwRKfz9HSYITjmbuIcTq/gQaYFLWULmTMh+aThU0d+ziTdx0rjQ/Msgr+6QMYaMhkUccxrf9MLNWo0wv6iFGLSOvKKDeBoZHYs4Cg1cmPPPAY+QdSdw5VDRi2+zrHJSxFcJXoMRiL8RFWJSSnye4LWPdmlxg3oh8q7iWeKLZfhEKUpxVMVFPEM88jSI3xNPxDMH/98REm+5iF90sar2C4mbbsVPQkrfEr3oG5v4Bs7/INqMFqaEb1ihfZhLxTZVLMz+IV6M/8cZzBbBaymi22FBUryP+GR568K3w3csQHnpJX+ZZR0k6VnlEjmn4guQw2PtecAgE8h44O3yj7XyG4ljZIzwdvmNhH3rlgo5SA79FwWEU5atm9hmeQUhu8QmjkextEsUNsvBryc8TBvfBFcb/QaIORZ45ijrw8EjpvRNloqruIqruIqruBQ/L0HEIEhS4cAAAAAASUVORK5CYII="
	else if percentage is greater than or equal to 10 and percentage is less than or equal to 15 then
		set batte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d4lkeJCf9dTwIxzNv3fxslpsSMkYYzO2Mwilzm6fNMjfy8+pu6QnEUM/pSyaUU4FbHWU/CrdwKRD+yQriQTyIB/EgHsR98RnUoDZULQx7fQAAAABJRU5ErkJggg=="
		set percentage to "100"
	else if pwr is "Batt" then
		if percentage is greater than or equal to 96 and percentage is less than or equal to 100 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAs0lEQVR42u2WQQrDIBBFh3iP0hRK7MHjLoucIT1LXCZt1uZ1FaglOx2o4NsIs3jgCP8rUqlU/hosPZ5ACoGZHvurblnJxcotljtgpMUk3d7QMgIuHnvgmmW9F2CORwEwIkxJC5lEMECI5cBxpvDtKlfOi4G7lhxgodOTw6Ap3zTlFCvfCn3QBasjfzPQlZ0teSL3eR65qmVx1FyTJG7Oa06zoEWwODx7knbH43jUj1qlUg4fxZ8lasabhQ4AAAAASUVORK5CYII="
		else if percentage is greater than or equal to 86 and percentage is less than or equal to 95 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2WQQqDMBBFg96jNIVienCzy8Iz2LOYpbau4+tKaGzpwjjQQN4mMItHMgPzo1ShUPhrMLR4AikEBlrMVq2ZOIqJSyy3QIemTnp9jaYDbFz2wPmQ9p6AIS4FoFaKfmcr+rfbQ4jlwHru49OVr5wHjquUHGCkkZODk5TPknKylc+ZDnTEyMifOJq8d0vqyr3/WrmiYbHGXJUkrr7HnGRAK4XB4lmStAsey6181AqFfHgB7SnFu8OCs/4AAAAASUVORK5CYII="
		else if percentage is greater than or equal to 76 and percentage is less than or equal to 85 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAuElEQVR42u2WQQqDMBBFg96jNIVienCzc+EZ7FnMUlvX8XXlIioUGwcayNsEZvGYTGB+lMpkMn8NhhqHJwZPT41ZqzUjZzFyC+UWaNGUUbcv0bSADcsOuJ4y3gvQhyUPlErRHR5Ct+kefFgClvMom97XteTkvGi4S8kBBio5OTSS8klSTrLyKdEHHTAy8jcNVdq75feV+/y+ckXDYom5Ikpc7MecZEArhcHimKO0Mw7LI3/UMpl0+ADW1WYbk5lWXgAAAABJRU5ErkJggg=="
		else if percentage is greater than or equal to 66 and percentage is less than or equal to 75 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAuElEQVR42u2WQQrDIBBFJblHqYUSe/C4yyJnSM8Sl0mbtXldZWFowGIGKvg2wgiPUWG+ShUKhb8GQ4vDk4JnpMXs1ZqZs5i5hXIL9GjqpNPXaHrAhmUHXE+53gswhiUP1EoxRB9+OOwefFgCtjWWw973e9nJedFxl5IDTDRycugk5YuknGzlS6YPOmFk5G86mrxny+8j9xk/ckXDYou5KklcfY85yYBWCoPFsSZpVxyWR/moFQr58AGRs+aMzl3kdAAAAABJRU5ErkJggg=="
		else if percentage is greater than or equal to 56 and percentage is less than or equal to 65 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAuElEQVR42u2WQQrDIBBFJd6j1EKJPXjcZZEzpGeJy6TN2ryusjAU0mAGKvg2wiCPUWG+ShUKhb8GS4MnkEJgoMFu1YaJs5i4xXIHdBh00uk1hg5wcdkD11Ou9wIMcSkAWin6H47d73QPIS4B67rPTu/bHdnJedFyl5IDjNRycmgl5bOknGzlc6YPOmJl5G9a6rxny5GR+zw6ckXDYo25KklcfY85yYBWCovDsyRpFzyOR/moFQr58AFAVIbsiXp9RAAAAABJRU5ErkJggg=="
		else if percentage is greater than or equal to 46 and percentage is less than or equal to 55 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XXlIlJEGgcayNsEhvCYSWC+SCaT+WswNDg8MXgGGsxWXTFxFhO3UG6BjooyavqSig6wYdkB11Oe9wIMYckDpQj97sD9oe7BhyVgPfc41Pv2XnJyXrTcteQAI7WeHFpN+awpJ1n5nOiHjhgd+ZuWOu3dcmzlPn9buaphscZcESUuvsecZkCLYLA4lijtgsPykEwmkwwfsQgnTIxdnPMAAAAASUVORK5CYII="
		else if percentage is greater than or equal to 36 and percentage is less than or equal to 45 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XXlImIpEgcayNsEhvCYSWC+SCaT+WswNDg8MXgGGsxWXTFxFhO3UG6BjooyavqSig6wYdkB11Oe9wIMYckDpQj9l1H7A92DD0vAeu5zoPft7eTkvGi5a8kBRmo9ObSa8llTTrLyOdEPHTE68jctddq75dfKfcasXNWwWGOuiBIX+zGnGdAiGCyOJUq74LA8JJPJJMMH497HnQsmWpMAAAAASUVORK5CYII="
		else if percentage is greater than or equal to 26 and percentage is less than or equal to 35 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XXlItouJA40kLcJDOQxk8B8kUwm89dgaHB4YvAMNJitumLiLCZuodwCHRVl1PQlFR1gw7IDrqc87wUYwpIHShH63ZD94e7BhyVgPbcc7n17Jzk5L1ruWnKAkVpPDq2mfNaUk6x8TvRDR4yO/E1LnfZu+b1yn/ErVzUs1pgrosTF95jTDGgRDBbHEqVdcFgekslkkuED2NZn/WdIKR8AAAAASUVORK5CYII="
		else if percentage is greater than or equal to 16 and percentage is less than or equal to 25 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtUlEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XVlIdqVcaCBvE1gII+ZBOaLZDKZvwZDg8MTg2egwWzVFRNnMXEL5RboqCijpi+p6AAblh1wPeV5L8AQljxQitB/h+sPdw8+LAHruXK49+3d5OS8aLlryQFGaj05tJryWVNOsvI50Q8dMTryNy112rtlv3Kf561c1bBYY66IEhe/Y04zoEUwWBxLlHbBYXlIJpNJhg+ixOhuQfsw9wAAAABJRU5ErkJggg=="
		else if percentage is greater than or equal to 10 and percentage is less than or equal to 15 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtElEQVR42u2VvQqDMBRGL/oepSkU0wc3m4PPYJ/FjNo6x9OhCI24xQsN5CwJ33DID9xPpFAo/DVYWjyBFAIjLXavNsycxcwtljugx1An3b7G0AMujj1wPeV5L8AYRwGoRRiAIfH0EOII2NbvLkG/N2Qn50XHXUsOMNHoyaHTlC+acrKVL5l+6ITVkb/paPKeLb8j93n2yFUti63mqiRxdVxzmgUtgsXhWZO0Kx7HQwqFQjZ8AFyxiM55BDSUAAAAAElFTkSuQmCC"
		else if percentage is less than 10 then
			set batteryIcon to "iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAA10lEQVR4Ae3YMQ6CQBCFYQL3MGpiWE9g6WndjoLjWNpAiWq9jFM82rGcHfMm+RMLik8zBpZGREJGOOGEu0Y44YQn7abNWhG/KdoES/oFP2hPqWxgOlrwjAtHfInOcQU6GEaYsgWfcdG+oh3ewTQZcOw0fun79fKoAN7BVCz4Ng3g+OwehnA3+EsbtFM0+DaL1oeDY4ao8E9UuPwxnKvCP+eipUjwN25APW/5XvCwj7WBDhL20a11BLf20S3iYdl4PZGxNqsjdoUha2e+ySKc8AARTjjhQfoCLEebqfw1Zu4AAAAASUVORK5CYII="
		end if
	end if
end if

return "{\"text\":\"" & percentage & "%\", \"icon_data\":\"" & batteryIcon & "\"}"

Working on the system info modal that you get when you long press on the battery widget :slight_smile:

Can't wait! One suggestion: Android offers the option to put the number inside the battery icon, any chance of doing the same?

Edit: Found a good screenshot of how "BatteryPercent12" on iOS handles this behaviour in multiple style options. When charging, the number is replaced with the lightning bolt.:

2 Likes

Looks nice, but when plugged in, immediately displays 100%. I haven't looked at the error yet, but I think I see it in your AC command.

Oh, I’ve since fixed that! I’ve also added a catch for when the battery is finished charging (it’ll show as “not charging” but still connected to AC). If you turn on the percentage display, it’ll hide the number when it’s done charging.

I’ll have a new experimental version with the finished battery script out today :slight_smile: the system information modal won’t be complete though.

Sounds perfect, looking forward to see it!

Settings switches aren't ready yet, so here's the full updated battery menu bar widget JSON for you to copy into BTT :slight_smile:

I added an icon to the widget so that it doesn't appear empty while it loads:

loading

And when the battery is done charging, the icon changes from green to white and the percent display (if enabled) will hide.

100-charging
100-charged

[
  {
    "BTTWidgetName" : "​",
    "BTTTriggerType" : 639,
    "BTTTriggerTypeDescription" : "Apple Script Widget",
    "BTTTriggerClass" : "BTTTriggerTypeTouchBar",
    "BTTPredefinedActionType" : -1,
    "BTTPredefinedActionName" : "No Action",
    "BTTEnabled2" : 1,
    "BTTAlternateModifierKeys" : -1,
    "BTTUUID" : "2A0FEBA5-32AC-4B11-9921-F8DC3F5535B3",
    "BTTNotesInsteadOfDescription" : 0,
    "BTTEnabled" : 1,
    "BTTModifierMode" : 3,
    "BTTOrder" : 34,
    "BTTDisplayOrder" : 107,
    "BTTMergeIntoTouchBarGroups" : 1,
    "BTTIconData" : "TU0AKgAAD9gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0r_3__9_______________________________________________________________________________________9_9__SgAAAAAAAAAAAAAAAAAA_z7__v_________________________________________________________________________________________________+_z8AAAAAAAAAAAAAAAD_4P___+f_Pv8GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAP84_____QAAAAAAAAAAAAAAAP_g____5_8+_wQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD_BP8+_+f____gAAAAAAAAAAAAAAAA_z7__v_________________________________________________________________________________________________+_z8AAAAAAAAAAAAAAAAAAP9K_+D__f_______________________________________________________________________________________f_g_0sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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c3qLfKd+v4DbgveFE4cziU+Lb42Pj6+Rz5PzlhOYN5pbnH+ep6DLovOlG6dDqW+rl63Dr++yG7RHtnO4o7rTvQO_M8Fjw5fFy8f_yjPMZ86f0NPTC9VD13vZt9vv3ivgZ+Kj5OPnH+lf65_t3_Af8mP0p_br+S_7c_23__w==",
    "BTTTriggerConfig" : {
      "BTTTouchBarHideRecentlyUsedEmoji" : false,
      "BTTTouchBarAppleScriptString" : "do shell script \"pmset -g everything | grep Cycles\"\rset x to the result\r\rif word 1 of x is \"AC\" then\r\tset pwr to \"AC\"\relse\r\tset pwr to \"Batt\"\rend if\r\rif x contains \"Not Charging\" then\r\tset charging to false\relse\r\tset charging to true\rend if\n\r\non returnNumbersInString(inputString)\r\tset s to quoted form of inputString\r\tdo shell script \"sed s\/[a-zA-Z\\\\']\/\/g <<< \" & s\r\tset dx to the result\r\tset numlist to {}\r\trepeat with i from 1 to count of words in dx\r\t\tset this_item to word i of dx\r\t\ttry\r\t\t\tset this_item to this_item as number\r\t\t\tset the end of numlist to this_item\r\t\tend try\r\tend repeat\r\treturn numlist\rend returnNumbersInString\rset nums to returnNumbersInString(x)\n\rset percentage to item 1 of nums as integer\r\rif charging is true then\r\tif percentage is greater than or equal to 96 and percentage is less than or equal to 100 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACNUlEQVR4Ae2YA8xdQRBGa7dRbTOorbA24tq2jahRjai2bds2gtq2Jsn5k6m22btb\/jvJedz57nm6u\/vifPr06Z8kiAfxIP5HCeJBPIjnF+YIt4QPgkudVAcoLqTi9mPBWBz7Ji75fyaeg1AfdUooQnh7YYIQj\/vvbYJwymkSn8vAFbyI+DzpQmkyi1r2xcdhBf1zTeK3GJTdVRiSkHfEISMrGTcN4nyneadrXmi1S\/hkyTgVeoS84uR1scjZRUZ8Mj4YxCkeiCC9XgUuIOsyWTlt81QW9WvETwmJ6R2pstqT1fRvFD8nFKKvhaArJVknPYo\/EZYIeVzEHwiV6ako6JpEThoNj5UX1kUUj6lHQr6o4o0Zn0N4pzI+ciqMYwL5SOLUkijiPdVp74ZOQ\/yqcFu4o+H5URxjoKP4M1vx4Spof4RZNbHzO07ZiG9XIRstpS8KcclvQd5vEx\/FmIGMfyE8VzzjK\/HxkyoeT0d2c53p\/6tifsdNlNDiX82gVYXXFuJef5zbhfKMSyoki4H+oYKuBowtIVzTWY6nw\/w+pvwb9CYQXqq8vuSlFU55mICeMgHl87VW6UZvY5U1TeXt\/uvWKlCM3kPkbFFZM\/xM+f6XtaMJykXGNSU9xEYYdpuXtf43EmvJSK8f97+RMG\/d4lkeJCf9dTwIxzNv3fxslpsSMkYYzO2Mwilzm6fNMjfy8+pu6QnEUM\/pSyaUU4FbHWU\/CrdwKRD+yQriQTyIB\/EgHsR98RnUoDZULQx7fQAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 86 and percentage is less than or equal to 95 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACNUlEQVR4Ae2YA8xdQRBGa7dRbTOorbA24tq2jahRjai2bds2gtp2eztJzkumutzy30nOj\/d2vj3XiOc4zj+JFbfiVvyPYsWtuBUvKMwT7gifhCh1Wk1QUkjD30+9Gpn7Ni4FvcRzEWqizgjFCO8oTBIS8P\/HIEE45XYTn8\/AVSxEQgObsiyZxQP2JcRhFf3z3cTvMChnVGFIRt6xCBnZybjtIs4+zZqufanNHsEJyAQVeoy8kuR18+jd85M1zz7\/U3GKD0JIb1SBi8i6SlZuPxk\/kaN+jfgZISm9o1VWR7Ka\/43iF4Qi9LUSdKUm67RB8WfCMiFfFPFHQlV6Kgu6ppCTTsNnFYUNIcVj9UQoEFa8KeNzCR9UxmdOhfHcQD6UOLUsjHhvddq7pdMQvy7cFe5p+H4McwyOKP4iqPhIFXQwxFU1qaE17gQR36lCNgeUvizEJ78Veb9NfAxjBjP+lfBS8YJd4rOjis8zkN1S5f2uXYU17k6pH4iXJLe68Fbl\/daDc6dQkXHJhRQx6B8u6GrE2FLCDZUT9XRY0MQl\/xa9iYTXKq8\/eemFMwYuQM+5ABUwda\/Sg96mKmuGytv7192rQAl6j5CzTWXNMnPJN39bO5agPGTcUNLDfGbsDXBba\/xBYj0ZGfXn5h8k3B\/dEgScJDf99QwIJ3B5dDP2sNyckHHCUP7OzKU9cuGU28\/rifnsNp99hL6kL4VQQQVujyj7GYf5QiH7JssUVtyKW3ErbsWt+Bcm6kxE9j1EfAAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 76 and percentage is less than or equal to 85 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACOElEQVR4Ae2YA8xcQRSFa7dRbTOorbA24tq2jahRjai2bds2gtq2ziZnk1u9ybw7bX\/MTb4fu3PPfM9I8O3bt1iJF\/fiXvy\/4sW9uBcvDBaAe+AL0NRZMUFpkI5\/Pzc1cu67dClsEs\/DUBd1DpRgeGcwBSTi\/59tguiUN0h8IQeu4UIk5pcayjOzpGVfYjqsYf\/CIPF7HJRbK0xSMO+EIiMnM+4GiHOf5pque6XdPvDNkkki9ATzSjOvB8dI9hnXPPf5AHEWPwghvVkELmHWdWbl\/VOfea2z\/pL4OZCcvWNFVmdmtYyJ4pdAMfa1AbLSMuusQ\/EXYAUooBF\/AqqzpyqQNY05GST8rDLYFFI8Ws9AobDizTk+D\/gkMr6C8iapiHxYcdaKMOJ9xWnvjkyj+E1wHzyQ8PtxnGOoUvyVrfhoEXQ4xFU1uXqNs2zEd4uQrZbSV0FC5rcB3\/6l+DiOGcrxb8BrwSvuEl+BrFcgE7NbM0sr\/sp6jRso8xvx0sytCd4rxFUH525QmeNSglRR2D8SyGrCsWXALZGjPR0WdnHJv8PeJOCtyBvIvIzgnIML0EtegAq5ulfpxd7mImuWyNsf4+5VSCn2HmPODpE1x80l3\/1t7XgG5WPGLSE9IqBvv+K21umDxEZmZFZkGB4kzI9uiSwnycv+Bg6EE5kf3fQPyy0ZMgEM599ZwTmLDNXDcoTCYCF3m6\/AVK\/ZlwpUEoE7lbJf6bAQFPFvsry4F\/fiXtyLe3FXfAeAdGI06MOmAgAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 66 and percentage is less than or equal to 75 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACGElEQVR4Ae2YA4xeURCFa7dRbTOorRg149q2jahRjai2bds2gnpt42xy\/mSiu7nvzfpO8i1nzv89o1BaWlqexIk7cSeeozhxJ+7Em4J94A9IAX7qtfiAtqACfw4HxuJn\/6ZL08zE6zFUo96AVgyfCDaBIvw92SaITvVN4vvZeIoLUZT\/9ENHZra2nCtKh1Oc328S\/8Omukr7XynmPfORUZsZvw3i3Ke5pnt\/GnMHpFmyQYQ+Y15b5k0Dd6zXPPd5gziLf\/AgfVEEHmLWV2bVZw\/zrWApi5M3oCRnV4usicwanhvFP4AWnBsFZJVn1mtF8QhwDDTyIx4CenKmO5C1hTmVJArigQoDTbyKD2V\/PZAkMlJBR7OQP3HWMS\/is8Vp7xdnpfh38Bf8k\/D\/a5TEo2zFV4qghx6uqiWVxNNsxG+KkMuW0p9BYc5mu\/ga9ixmfwyIFkRxl0gFsqJAFeV9PMp+jZtpJ8VZbXPDwXkTdGVfaVAmAOeXA1mD2NtO+XTYVOOS\/4uzxUCsyJvPvMrgjYJ4JC9ATbTuVWZwdqjI2iHy7ua6exXShrNPmHNNZO3SueTr39auZVADZvwQ0stE313921qdB4nzzKhq6FF4kDA\/uhWx\/JD6nO+nIFzE\/Oim87A8nCHrwFL+XB28MY\/pPSxn0JRL90deQAwVzbkyoIsIvO5TNhX8oUsz9ybLiTtxJ+7EnbgT1yId5lN9u+XAf4cAAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 56 and percentage is less than or equal to 65 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB\/klEQVR4Ae2YA4xdURRFa7dRbTOorRg145pRbStqVCNOatu2bQY1xvaeZP\/kjO5\/OON7kvV5z37rGSVSU1MLJVbcilvxfMWKW3Er3hrsBj9BMvBTL8QEOoNq\/BwWrJHT\/kGX1sHEmzBUo16CDgyfDjaDUvye5CaITk1N4ns48DhnorTCquzOzI4u+0rT4Tj795jEf3JQY6XtrwLzHvvIaMiMHwZxbtNc0gPfT7oJUl2yUYQ+Zl5nH+KlmZFsEGfxBw\/S50TgfmZ9UlhzrNwRfwnKs3eNyJpekMXfgnbsmwBkVc0F8XBwGLTwI\/4f9GdPXyBrK3NqKIsHKhS08io+muObgESRkQK6SwFtcdZhL+JzxGHvu0yj+BfwC\/yW8P+1SuKRbsVXiaB7Hs6q5ZXEU92IXxMhF1xKfwAl2Zvn4oHVvITjo0GUIJKbRErm1QpqKW\/jke6XuJku2Yh3Lgg75zXQm+MqgkoB2L8CyBqRS4fD1hqn\/O\/sLQNiRN4C5cNhBE9ArbSuVWayd7TI2lmgr1VIJ\/Y+ZM5l\/ROQ\/mXtOgY1Y8ZXsQDG61\/W6t9InGFGbfm7\/o2E+datlMuJNGX\/EAXhUuZbN52b5bEMWQ+W8XNd8NLcpneznE5rsIebTYqD0Cj2VQK9ROAVn7IpdNgD2tgnWVbciltxK27FrbgWafY8kPNLpbfPAAAAAElFTkSuQmCC\"\r\telse if percentage is greater than or equal to 46 and percentage is less than or equal to 55 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB+0lEQVR4Ae2YA6wdURRFa7dxbSOorRg145pRbStqVCNOatu2bQblt639k\/2S8zUvd+bM5z3JerxnzxqjXGZmZonEiltxK16kWHErbsXbg\/3gL0gHXuqNmEB3UIefo4I1ctp\/6NI+mHgLhmrUW9CF4bPBdlCB39NMgujU0kn8AAee5kxUVFiVvZnZ1bCvIh1Os\/+Ak\/hfDmqutP1VY95zDxlNmfHHQZzbNJf00M\/T7oJMQ7aK0OfM6+5BvCIz0h3EWfzBhfQlEXiYWd8U1hzLH\/G3oCp7N4is2cVZ\/CPoxL4pQFZtH8SjwXHQxot4OBjMnoFA1k7+ri0eqEjQzq34eI5vAVJFRgbo7ac467gb8QXisPebvVL8B\/gH\/kv4\/0Yl8VhT8XUi6JGLs2pVJfFME\/FbIuSKofQXUJ69hS4eWM0rOD4exAliuUlkAFmxoJ7yNh5rvsSd6ZGPePfisHPeAv05rjqoEYD9a4CsMT4dDttrnPJ\/s7cSSBB5S5QPhzE8AbXTulaZy97xImtvsb5WId3Y+5Q51\/VPQPqXtZsY1IoZP2W4\/mWt\/o3EBWbUVxEXNxImt24VDCfSkv0jFIQrON+66dwsT2TIZrCKnxuCt85tejfL2bQHB7jZZIBgFce+GqCfCLzhUTaDDgdAB\/sky4pbcStuxa24FdciC4Vak2WaD0PuAAAAAElFTkSuQmCC\"\r\telse if percentage is greater than or equal to 36 and percentage is less than or equal to 45 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB\/UlEQVR4Ae2YA6wcURSGa7dxbSOorRg145pRbStqXDdOatu2bQbFs+1\/k3+T8zT77s6Zx3uSb3nPP98YlbKzs8skVtyKW\/ESxYpbcSveGRwE\/0EmcFPvxAR6gwb8HBOokdP+R5fOgcTbMFSj3oMeDJ8PdoIq\/J5hEkSntk7ihzjwLGeiqsKq7M\/MnoZ9Velwlv2HnMT\/c1Brpe2vFvNeushoyYx\/DuLcprmkR36ddR9kG3A\/T+hL5vV2IV6VGZkO4iz+YCJNrojAo8z6obDmWN6Ivwc12btFZM0vzeKfQTf2zQCy6nsgHgtOgg5uxCPBcPYMBbJ2SwFFcX9Fg07Bik\/m+DYgXWRkgf5eirNOBiO+RBz2\/so0iv8CISBUwv+3KonHm4pvEkFPgjir1lQSzzYRvyNCrhlKfwOV2Vvs4v7VvIbjE0GCIJ6bRFbe1QoaKW\/j8eZL3Jk+BYj3Lg075x0wmONqgzo+RPgGIGuCR4fDzhqn\/L\/srQaSRN4K5cNhHE9AnbSuVRayd7LI2l+qr1VIL\/Y+Z85N\/ROQ\/mXtNga1Y8ZvGa5\/Wat\/I3GJGY1VxOWNhMGtWxXDibRl\/xgF4SrOt246N8tTGbIdrOPnpuC9c5vezbKPzuAQN5usIoQmsK8OGCQCb7mUzaLDIdDFPsmy4lbciltxK27FtcgBcRuVdY4fggcAAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 26 and percentage is less than or equal to 35 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB6ElEQVR4Ae2YAURDQRjHa4sSBVBC2pK9AGUxSgAgQgwgEgxACElSQAAJAdAjDIMQZSxEBgVKCrQVUrUV1N71xX98pu65ve+pcR8\/XnX3v1\/vbu\/erU0p1ZJYcStuxf8UK27FrbhD7BFloqaC1TkbIEn04vqZ0BbGLsHF8ROPIVSiLogxhGeIbSKCnz9NguAU14m7aJjDPxEVmMoUMscN+0XhkEN\/VydeRqMhofXXhbxigIxBZJQ04ljTuNMzl4sFQvlQ0AxaRF4ygHgUGTWNOAq\/gJgvvwTuI+taYOZQ4YtvsKxMq4gvELx6QhB\/IbLESBDxRxY4TfDa4QKC4vV6IhLNiqfRPkZ8sAyPSIUpjso2I77EHnt3PA3iN8Q98cDB3zeFxCum4uss6LSJXbVTSFyZiOdZyKGh9BXRbiAtKl6f5hW0fyOqjAqWhNc4rUSf8BqvmN9xPRM\/iCf\/w4czT0xpBlsjeM2F9Dh0JHfODuKd5S0LPw5fsQElpLf8NMvabaV3lTPkHMlvQHKvtScNQcPIuNXLyL7WShwkDpDRLyHODxImR7eI4SBx9J8VEI7oj24yh+V5hGwRq7gewNauL6HD8jcO4WLZeMq\/qujXTUyywOOAsh4cXGLUfpNlxa24FbfiVtyKS\/EFcCypERicPW8AAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 16 and percentage is less than or equal to 25 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB0ElEQVR4Ae2YAUQDURjHa4smCqCEtCVbgLIYEQCIEAFEggGAkIQCAkgIgI4wDEIULEQGBUoKtBWo2gpq9\/rwxyd51+195xzfx4\/rde\/\/ftu93bt3PcaYRKLiKq7isaLiKq7iBeKQaBId41ZXbIAiMYTj16COGLsBl0KQeBahEnVNTCO8TOwRKfz9HSYITjmbuIcTq\/gQaYFLWULmTMh+aThU0d+ziTdx0rjQ\/Msgr+6QMYaMhkUccxrf9MLNWo0wv6iFGLSOvKKDeBoZHYs4Cg1cmPPPAY+QdSdw5VDRi2+zrHJSxFcJXoMRiL8RFWJSSnye4LWPdmlxg3oh8q7iWeKLZfhEKUpxVMVFPEM88jSI3xNPxDMH\/98REm+5iF90sar2C4mbbsVPQkrfEr3oG5v4Bs7\/INqMFqaEb1ihfZhLxTZVLMz+IV6M\/8cZzBbBaymi22FBUryP+GR568K3w3csQHnpJX+ZZR0k6VnlEjmn4guQw2PtecAgE8h44O3yj7XyG4ljZIzwdvmNhH3rlgo5SA79FwWEU5atm9hmeQUhu8QmjkextEsUNsvBryc8TBvfBFcb\/QaIORZ45ijrw8EjpvRNloqruIqruIqruBQ\/L0HEIEhS4cAAAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 10 and percentage is less than or equal to 15 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB0ElEQVR4Ae2YAUR7QRzH\/\/8tmiiAEtKW7AUoixEBgAgRQCQYAAhJKCCAhABohGEQomAhMihQUqCtQNVWUHvXV7445Obe\/Z5n3JcP29u7733KtXvXP6VUT+LFvbgXTxQv7sW9eAAOQRN0lFuutAkKYIivX4ExnLtBl6CbeJalErkG0ywvgT2Q4vtvZRE65UziZd5Y5Q+R5ocuFNk5YzkuTYcqx5dN4k3eNO4qTDLsqzt0jLGjYRDnmuZveuFmrQYU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TwcPTLsnWVo4cSfuxJ24E3fiv3yS6WMKPcrpAAAAAElFTkSuQmCC\"\r\tend if\relse if charging is false then\r\tif pwr is \"AC\" then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAB8UlEQVR42u2WP2hTURSHP5JBzVBcFHUQE5BGdPEfCBapm5ubWymKi4MiOIqCoFMHQZwFh8YpQ5dWEGqgWV0awVEQbBb\/VFtRWl8+h6QxMe++94QOCu93h8e577yPe88995wHuXLl+qdl1VnbRiZrGcBTjoGrI28jV5y1+ie6HOM6qpbHwWs+tgD+DHitWhmG19Q5yxZTd3hGPRF4V7TsnFobnm6rhzIEb6f6KtHjoLoyPBWpRXApGJJHAH5Tp8AbsT5LYFGNhuHq1jNWzwF8p26AlZDbICsrvOWO\/q6egdPbB3\/jUfBJz9oPLmeB+8W6h5PhH50Er\/es1+Ce7gAnXEiAq352PAl+CTzXt66OZMdCIlzrYfgtcPfAddk06g9tgrdT4Gsh+D0A1wIB\/u5YhpUbD28A+CGA3rAAXkmJeRB+H3wxYHcGylrHY+DlxGxJDEtj5PB+5\/cUeMEfGeDBA204Ae6yZMkS+LI3PwOe9m1KnndTsZp+\/d\/3ipbqPLjXVuol+mrd8Sy15Sb4sHtfAWxuX23Rk+C6+gnAp39XW5JL7gPwvLoJ4N3gEprxJTe1WTiv7svQTmKaxVabKwQ+qagXU8GF+DaX1KCnwRnvgAficySlQYNVa7btjLiugyXPAriYgu3YtuaR\/EctV67\/R78ArOuEoxggnn4AAAAASUVORK5CYII=\"\r\t\tset percentage to \"​\"\r\telse if pwr is \"Batt\" then\r\t\tif percentage is greater than or equal to 96 and percentage is less than or equal to 100 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAs0lEQVR42u2WQQrDIBBFh3iP0hRK7MHjLoucIT1LXCZt1uZ1FaglOx2o4NsIs3jgCP8rUqlU\/hosPZ5ACoGZHvurblnJxcotljtgpMUk3d7QMgIuHnvgmmW9F2CORwEwIkxJC5lEMECI5cBxpvDtKlfOi4G7lhxgodOTw6Ap3zTlFCvfCn3QBasjfzPQlZ0teSL3eR65qmVx1FyTJG7Oa06zoEWwODx7knbH43jUj1qlUg4fxZ8lasabhQ4AAAAASUVORK5CYII=\"\r\t\telse if percentage is greater than or equal to 86 and percentage is less than or equal to 95 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2WQQqDMBBFg96jNIVienCzy8Iz2LOYpbau4+tKaGzpwjjQQN4mMItHMgPzo1ShUPhrMLR4AikEBlrMVq2ZOIqJSyy3QIemTnp9jaYDbFz2wPmQ9p6AIS4FoFaKfmcr+rfbQ4jlwHru49OVr5wHjquUHGCkkZODk5TPknKylc+ZDnTEyMifOJq8d0vqyr3\/WrmiYbHGXJUkrr7HnGRAK4XB4lmStAsey6181AqFfHgB7SnFu8OCs\/4AAAAASUVORK5CYII=\"\r\t\telse if percentage is greater than or equal to 76 and percentage is less than or equal to 85 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAuElEQVR42u2WQQqDMBBFg96jNIVienCzc+EZ7FnMUlvX8XXlIioUGwcayNsEZvGYTGB+lMpkMn8NhhqHJwZPT41ZqzUjZzFyC+UWaNGUUbcv0bSADcsOuJ4y3gvQhyUPlErRHR5Ct+kefFgClvMom97XteTkvGi4S8kBBio5OTSS8klSTrLyKdEHHTAy8jcNVdq75feV+\/y+ckXDYom5Ikpc7MecZEArhcHimKO0Mw7LI3\/UMpl0+ADW1WYbk5lWXgAAAABJRU5ErkJggg==\"\r\t\telse if percentage is greater than or equal to 66 and percentage is less than or equal to 75 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAuElEQVR42u2WQQrDIBBFJblHqYUSe\/C4yyJnSM8Sl0mbtXldZWFowGIGKvg2wgiPUWG+ShUKhb8GQ4vDk4JnpMXs1ZqZs5i5hXIL9GjqpNPXaHrAhmUHXE+53gswhiUP1EoxRB9+OOwefFgCtjWWw973e9nJedFxl5IDTDRycugk5YuknGzlS6YPOmFk5G86mrxny+8j9xk\/ckXDYou5KklcfY85yYBWCoPFsSZpVxyWR\/moFQr58AGRs+aMzl3kdAAAAABJRU5ErkJggg==\"\r\t\telse if percentage is greater than or equal to 56 and percentage is less than or equal to 65 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAuElEQVR42u2WQQrDIBBFJd6j1EKJPXjcZZEzpGeJy6TN2ryusjAU0mAGKvg2wiCPUWG+ShUKhb8GS4MnkEJgoMFu1YaJs5i4xXIHdBh00uk1hg5wcdkD11Ou9wIMcSkAWin6H47d73QPIS4B67rPTu\/bHdnJedFyl5IDjNRycmgl5bOknGzlc6YPOmJl5G9a6rxny5GR+zw6ckXDYo25KklcfY85yYBWCovDsyRpFzyOR\/moFQr58AFAVIbsiXp9RAAAAABJRU5ErkJggg==\"\r\t\telse if percentage is greater than or equal to 46 and percentage is less than or equal to 55 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XXlIlJEGgcayNsEhvCYSWC+SCaT+WswNDg8MXgGGsxWXTFxFhO3UG6BjooyavqSig6wYdkB11Oe9wIMYckDpQj97sD9oe7BhyVgPfc41Pv2XnJyXrTcteQAI7WeHFpN+awpJ1n5nOiHjhgd+ZuWOu3dcmzlPn9buaphscZcESUuvsecZkCLYLA4lijtgsPykEwmkwwfsQgnTIxdnPMAAAAASUVORK5CYII=\"\r\t\telse if percentage is greater than or equal to 36 and percentage is less than or equal to 45 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XXlImIpEgcayNsEhvCYSWC+SCaT+WswNDg8MXgGGsxWXTFxFhO3UG6BjooyavqSig6wYdkB11Oe9wIMYckDpQj9l1H7A92DD0vAeu5zoPft7eTkvGi5a8kBRmo9ObSa8llTTrLyOdEPHTE68jctddq75dfKfcasXNWwWGOuiBIX+zGnGdAiGCyOJUq74LA8JJPJJMMH497HnQsmWpMAAAAASUVORK5CYII=\"\r\t\telse if percentage is greater than or equal to 26 and percentage is less than or equal to 35 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XXlItouJA40kLcJDOQxk8B8kUwm89dgaHB4YvAMNJitumLiLCZuodwCHRVl1PQlFR1gw7IDrqc87wUYwpIHShH63ZD94e7BhyVgPbcc7n17Jzk5L1ruWnKAkVpPDq2mfNaUk6x8TvRDR4yO\/E1LnfZu+b1yn\/ErVzUs1pgrosTF95jTDGgRDBbHEqVdcFgekslkkuED2NZn\/WdIKR8AAAAASUVORK5CYII=\"\r\t\telse if percentage is greater than or equal to 16 and percentage is less than or equal to 25 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtUlEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XVlIdqVcaCBvE1gII+ZBOaLZDKZvwZDg8MTg2egwWzVFRNnMXEL5RboqCijpi+p6AAblh1wPeV5L8AQljxQitB\/h+sPdw8+LAHruXK49+3d5OS8aLlryQFGaj05tJryWVNOsvI50Q8dMTryNy112rtlv3Kf561c1bBYY66IEhe\/Y04zoEUwWBxLlHbBYXlIJpNJhg+ixOhuQfsw9wAAAABJRU5ErkJggg==\"\r\t\telse if percentage is greater than or equal to 10 and percentage is less than or equal to 15 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtElEQVR42u2VvQqDMBRGL\/oepSkU0wc3m4PPYJ\/FjNo6x9OhCI24xQsN5CwJ33DID9xPpFAo\/DVYWjyBFAIjLXavNsycxcwtljugx1An3b7G0AMujj1wPeV5L8AYRwGoRRiAIfH0EOII2NbvLkG\/N2Qn50XHXUsOMNHoyaHTlC+acrKVL5l+6ITVkb\/paPKeLb8j93n2yFUti63mqiRxdVxzmgUtgsXhWZO0Kx7HQwqFQjZ8AFyxiM55BDSUAAAAAElFTkSuQmCC\"\r\t\telse if percentage is less than 10 then\r\t\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAA10lEQVR4Ae3YMQ6CQBCFYQL3MGpiWE9g6WndjoLjWNpAiWq9jFM82rGcHfMm+RMLik8zBpZGREJGOOGEu0Y44YQn7abNWhG\/KdoES\/oFP2hPqWxgOlrwjAtHfInOcQU6GEaYsgWfcdG+oh3ewTQZcOw0fun79fKoAN7BVCz4Ng3g+OwehnA3+EsbtFM0+DaL1oeDY4ao8E9UuPwxnKvCP+eipUjwN25APW\/5XvCwj7WBDhL20a11BLf20S3iYdl4PZGxNqsjdoUha2e+ySKc8AARTjjhQfoCLEebqfw1Zu4AAAAASUVORK5CYII=\"\r\t\tend if\r\tend if\rend if\r\rif charging is false and pwr is \"AC\" then\r\treturn \"{\\\"text\\\":\\\"\" & percentage & \"\\\", \\\"icon_data\\\":\\\"\" & batteryIcon & \"\\\"}\"\relse\r\treturn \"{\\\"text\\\":\\\"\" & percentage & \"%\\\", \\\"icon_data\\\":\\\"\" & batteryIcon & \"\\\"}\"\rend if",
      "BTTTouchBarOnlyShowIcon" : false,
      "BTTTouchBarBringPlayerToFront" : 0,
      "BTTTouchBarButtonColor" : "0.000000, 0.000000, 0.000000, 255.000000",
      "BTTTouchBarEmojiHideBackButton" : false,
      "BTTTouchBarItemPlacement" : 2,
      "BTTTouchBarAppleScriptStringRunOnInit" : false,
      "BTTTouchBarAlwaysShowButton" : false,
      "BTTTouchBarHideWhenPaused" : 0,
      "BTTScriptType" : 0,
      "BTTTouchBarScriptUpdateInterval" : 10,
      "BTTTouchBarItemIconHeight" : 22,
      "BTTTouchBarBatteryHideOnCharging" : false,
      "BTTTouchBarButtonTextAlignment" : 0,
      "BTTTouchBarAlternateBackgroundColor" : "75.323769, 75.323769, 75.323769, 255.000000",
      "BTTTouchBarAppleScriptUsePath" : 0,
      "BTTTBWidgetWidth" : 400,
      "BTTTouchBarDefaultPlayer" : 0,
      "BTTTouchBarItemIconWidth" : 23,
      "BTTTouchBarLongPressActionName" : "Show System Information",
      "BTTTouchBarButtonName" : "​",
      "BTTTouchBarHideWhenNoPlayer" : false,
      "BTTTouchBarButtonFontSize" : 15,
      "BTTTouchBarHideCover" : 0,
      "BTTTouchBarFreeSpaceAfterButton" : 2,
      "BTTTouchBarItemPadding" : -14
    }
  }
]

Thank you! Looks great! Nice work!

1 Like

Bonus peek of the in-progress battery settings :smiley: (red is because the variables don't exist yet)

I really like your settings panel. Makes it a no brainer for so many!

I did end up changing the battery code to display the 100% when on AC. Nice job!

1 Like

One thing about the battery value. You are pulling from a different value then being reported by OS and other utilities I have? Might be a more accurate value, but I think people are going to find this value wrong since Im looking at 100% on Apple Menu for 10 minutes, and 96% in the TouchBar. I think you will save yourself a lot of Preset support questions by using the value that matches Mac OS.

1 Like

It is definitely more accurate, but there’s also definitely a reason macOS obscures the true percentage. My guess it has to do with the OS not constantly charging the battery to preserve battery health; instead, it seems to cycle between 95-100%, turning on and off the charging intermittently.

I thought this was actually neat to see, so I included different states to reveal a little more battery info - such as when it’s truly charging vs in the idle, not charging state.

However, I get that could be confusing, so maybe I’ll just match the system. This means you basically lose the ability to see percentages above 95%.

I’ll give this some more thought before I release the experimental version!

It’s interesting, maybe save for a more battery info, but as the main battery view, I can only imagine it being a thorn in your side from everyone using your preset.

1 Like

I'm rewriting how the battery widget gets its percentage - turns out there's a different terminal command I can use to get what the menu bar outputs, and it's a lot faster too. After this update it should match the system perfectly, and it'll be able to run every second for instant charging feedback.

Alright, here we go - new version that matches system status. This one is a million times better than the last one, it's so much faster:

[
  {
    "BTTWidgetName" : "​",
    "BTTTriggerType" : 639,
    "BTTTriggerTypeDescription" : "Apple Script Widget",
    "BTTTriggerClass" : "BTTTriggerTypeTouchBar",
    "BTTPredefinedActionType" : -1,
    "BTTPredefinedActionName" : "No Action",
    "BTTEnabled2" : 1,
    "BTTAlternateModifierKeys" : -1,
    "BTTUUID" : "7AA20903-4782-4C21-9076-8B7AA8531AEF",
    "BTTNotesInsteadOfDescription" : 0,
    "BTTEnabled" : 1,
    "BTTModifierMode" : 3,
    "BTTOrder" : 1,
    "BTTDisplayOrder" : 0,
    "BTTMergeIntoTouchBarGroups" : 1,
    "BTTIconData" : "TU0AKgAAD9gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0r_3__9_______________________________________________________________________________________9_9__SgAAAAAAAAAAAAAAAAAA_z7__v_________________________________________________________________________________________________+_z8AAAAAAAAAAAAAAAD_4P___+f_Pv8GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_wb_Pv_n____4AAAAAAAAAAAAAAAAP_9____PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_zj____9AAAAAAAAAAAAAAAA______8GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAP____8AAAAA__________7_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_____wAAAAD_________5f____8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD_____AAAAAP_______v9K_____wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP____8AAAAA__7_5f9IAAD_____AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_____wAAAAAAAAAAAAAAAP____8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD_____AAAAAAAAAAAAAAAA______8GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD_Bv____8AAAAAAAAAAAAAAAD__f___zwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP84_____QAAAAAAAAAAAAAAAP_g____5_8+_wQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD_BP8+_+f____gAAAAAAAAAAAAAAAA_z7__v_________________________________________________________________________________________________+_z8AAAAAAAAAAAAAAAAAAP9K_+D__f_______________________________________________________________________________________f_g_0sAAAAAAAAA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5Vw1XIZc1l0nXXhdyV4aXmxevV8PX2Ffs2AFYFdgqmD8YU9homH1YklinGLwY0Njl2PrZEBklGTpZT1lkmXnZj1mkmboZz1nk2fpaD9olmjsaUNpmmnxakhqn2r3a09rp2v_bFdsr20IbWBtuW4SbmtuxG8eb3hv0XArcIZw4HE6cZVx8HJLcqZzAXNdc7h0FHRwdMx1KHWFdeF2Pnabdvh3VnezeBF4bnjMeSp5iXnnekZ6pXsEe2N7wnwhfIF84X1BfaF+AX5ifsJ_I3+Ef+WAR4CogQqBa4HNgjCCkoL0g1eDuoQdhICE44VHhauGDoZyhteHO4efiASIaYjOiTOJmYn+imSKyoswi5aL_IxjjMqNMY2Yjf+OZo7OjzaPnpAGkG6Q1pE_kaiSEZJ6kuOTTZO2lCCUipT0lV+VyZY0lp+XCpd1l+CYTJi4mSSZkJn8mmia1ZtCm6+cHJyJnPedZJ3SnkCerp8dn4uf+qBpoNihR6G2oiailqMGo3aj5qRWpMelOKWpphqmi6b9p26n4KhSqMSpN6mpqhyqj6sCq3Wr6axcrNCtRK24ri2uoa8Wr4uwALB1sOqxYLHWskuywrM4s660JbSctRO1irYBtnm28Ldot+C4WbjRuUq5wro7urW7LrunvCG8m70VvY++Cr6Evv+_er_1wHDA7MFnwePCX8Lbw1jD1MRRxM7FS8XIxkbGw8dBx7_IPci8yTrJuco4yrfLNsu2zDXMtc01zbXONs62zzfPuNA50LrRPNG+0j_SwdNE08bUSdTL1U7V0dZV1tjXXNfg2GTY6Nls2fHadtr724DcBdyK3RDdlt4c3qLfKd+v4DbgveFE4cziU+Lb42Pj6+Rz5PzlhOYN5pbnH+ep6DLovOlG6dDqW+rl63Dr++yG7RHtnO4o7rTvQO_M8Fjw5fFy8f_yjPMZ86f0NPTC9VD13vZt9vv3ivgZ+Kj5OPnH+lf65_t3_Af8mP0p_br+S_7c_23__w==",
    "BTTTriggerConfig" : {
      "BTTTouchBarHideRecentlyUsedEmoji" : false,
      "BTTTouchBarOnlyShowIcon" : false,
      "BTTTouchBarFreeSpaceAfterButton" : 1,
      "BTTTouchBarBringPlayerToFront" : 0,
      "BTTTouchBarItemPadding" : -10,
      "BTTTouchBarButtonColor" : "75.323769, 75.323769, 75.323769, 255.000000",
      "BTTTouchBarEmojiHideBackButton" : false,
      "BTTTouchBarItemPlacement" : 0,
      "BTTTouchBarAppleScriptStringRunOnInit" : true,
      "BTTTouchBarAlwaysShowButton" : false,
      "BTTTouchBarApplyCornerRadiusTo" : 1,
      "BTTTouchBarHideWhenPaused" : 0,
      "BTTScriptType" : 0,
      "BTTTouchBarScriptUpdateInterval" : 60,
      "BTTTouchBarItemIconHeight" : 22,
      "BTTTouchBarBatteryHideOnCharging" : false,
      "BTTTouchBarButtonTextAlignment" : 0,
      "BTTTouchBarAlternateBackgroundColor" : "75.323769, 75.323769, 75.323769, 255.000000",
      "BTTTouchBarAppleScriptUsePath" : 0,
      "BTTTBWidgetWidth" : 400,
      "BTTTouchBarDefaultPlayer" : 0,
      "BTTTouchBarItemIconWidth" : 23,
      "BTTTouchBarButtonName" : "​",
      "BTTTouchBarHideWhenNoPlayer" : false,
      "BTTTouchBarButtonFontSize" : 15,
      "BTTTouchBarAppleScriptString" : "set batteryStatus to do shell script \"pmset -g batt\"\rset powerSource to word 4 of batteryStatus\rset percentage to word 11 of batteryStatus as integer\rset charging to word 12 of batteryStatus\r\rif charging is \"discharging\" then\r\tif percentage is greater than or equal to 96 and percentage is less than or equal to 100 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAs0lEQVR42u2WQQrDIBBFh3iP0hRK7MHjLoucIT1LXCZt1uZ1FaglOx2o4NsIs3jgCP8rUqlU\/hosPZ5ACoGZHvurblnJxcotljtgpMUk3d7QMgIuHnvgmmW9F2CORwEwIkxJC5lEMECI5cBxpvDtKlfOi4G7lhxgodOTw6Ap3zTlFCvfCn3QBasjfzPQlZ0teSL3eR65qmVx1FyTJG7Oa06zoEWwODx7knbH43jUj1qlUg4fxZ8lasabhQ4AAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 86 and percentage is less than or equal to 95 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2WQQqDMBBFg96jNIVienCzy8Iz2LOYpbau4+tKaGzpwjjQQN4mMItHMgPzo1ShUPhrMLR4AikEBlrMVq2ZOIqJSyy3QIemTnp9jaYDbFz2wPmQ9p6AIS4FoFaKfmcr+rfbQ4jlwHru49OVr5wHjquUHGCkkZODk5TPknKylc+ZDnTEyMifOJq8d0vqyr3\/WrmiYbHGXJUkrr7HnGRAK4XB4lmStAsey6181AqFfHgB7SnFu8OCs\/4AAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 76 and percentage is less than or equal to 85 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAuElEQVR42u2WQQqDMBBFg96jNIVienCzc+EZ7FnMUlvX8XXlIioUGwcayNsEZvGYTGB+lMpkMn8NhhqHJwZPT41ZqzUjZzFyC+UWaNGUUbcv0bSADcsOuJ4y3gvQhyUPlErRHR5Ct+kefFgClvMom97XteTkvGi4S8kBBio5OTSS8klSTrLyKdEHHTAy8jcNVdq75feV+\/y+ckXDYom5Ikpc7MecZEArhcHimKO0Mw7LI3\/UMpl0+ADW1WYbk5lWXgAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 66 and percentage is less than or equal to 75 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAuElEQVR42u2WQQrDIBBFJblHqYUSe\/C4yyJnSM8Sl0mbtXldZWFowGIGKvg2wgiPUWG+ShUKhb8GQ4vDk4JnpMXs1ZqZs5i5hXIL9GjqpNPXaHrAhmUHXE+53gswhiUP1EoxRB9+OOwefFgCtjWWw973e9nJedFxl5IDTDRycugk5YuknGzlS6YPOmFk5G86mrxny+8j9xk\/ckXDYou5KklcfY85yYBWCoPFsSZpVxyWR\/moFQr58AGRs+aMzl3kdAAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 56 and percentage is less than or equal to 65 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAuElEQVR42u2WQQrDIBBFJd6j1EKJPXjcZZEzpGeJy6TN2ryusjAU0mAGKvg2wiCPUWG+ShUKhb8GS4MnkEJgoMFu1YaJs5i4xXIHdBh00uk1hg5wcdkD11Ou9wIMcSkAWin6H47d73QPIS4B67rPTu\/bHdnJedFyl5IDjNRycmgl5bOknGzlc6YPOmJl5G9a6rxny5GR+zw6ckXDYo25KklcfY85yYBWCovDsyRpFzyOR\/moFQr58AFAVIbsiXp9RAAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 46 and percentage is less than or equal to 55 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XXlIlJEGgcayNsEhvCYSWC+SCaT+WswNDg8MXgGGsxWXTFxFhO3UG6BjooyavqSig6wYdkB11Oe9wIMYckDpQj97sD9oe7BhyVgPfc41Pv2XnJyXrTcteQAI7WeHFpN+awpJ1n5nOiHjhgd+ZuWOu3dcmzlPn9buaphscZcESUuvsecZkCLYLA4lijtgsPykEwmkwwfsQgnTIxdnPMAAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 36 and percentage is less than or equal to 45 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XXlImIpEgcayNsEhvCYSWC+SCaT+WswNDg8MXgGGsxWXTFxFhO3UG6BjooyavqSig6wYdkB11Oe9wIMYckDpQj9l1H7A92DD0vAeu5zoPft7eTkvGi5a8kBRmo9ObSa8llTTrLyOdEPHTE68jctddq75dfKfcasXNWwWGOuiBIX+zGnGdAiGCyOJUq74LA8JJPJJMMH497HnQsmWpMAAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 26 and percentage is less than or equal to 35 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtklEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XXlItouJA40kLcJDOQxk8B8kUwm89dgaHB4YvAMNJitumLiLCZuodwCHRVl1PQlFR1gw7IDrqc87wUYwpIHShH63ZD94e7BhyVgPbcc7n17Jzk5L1ruWnKAkVpPDq2mfNaUk6x8TvRDR4yO\/E1LnfZu+b1yn\/ErVzUs1pgrosTF95jTDGgRDBbHEqVdcFgekslkkuED2NZn\/WdIKR8AAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 16 and percentage is less than or equal to 25 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtUlEQVR42u2VQQqDMBBFB71HqYVienCzc+EZ7FnMUlvX8XVlIdqVcaCBvE1gII+ZBOaLZDKZvwZDg8MTg2egwWzVFRNnMXEL5RboqCijpi+p6AAblh1wPeV5L8AQljxQitB\/h+sPdw8+LAHruXK49+3d5OS8aLlryQFGaj05tJryWVNOsvI50Q8dMTryNy112rtlv3Kf561c1bBYY66IEhe\/Y04zoEUwWBxLlHbBYXlIJpNJhg+ixOhuQfsw9wAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 10 and percentage is less than or equal to 15 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAAtElEQVR42u2VvQqDMBRGL\/oepSkU0wc3m4PPYJ\/FjNo6x9OhCI24xQsN5CwJ33DID9xPpFAo\/DVYWjyBFAIjLXavNsycxcwtljugx1An3b7G0AMujj1wPeV5L8AYRwGoRRiAIfH0EOII2NbvLkG\/N2Qn50XHXUsOMNHoyaHTlC+acrKVL5l+6ITVkb\/paPKeLb8j93n2yFUti63mqiRxdVxzmgUtgsXhWZO0Kx7HQwqFQjZ8AFyxiM55BDSUAAAAAElFTkSuQmCC\"\r\telse if percentage is less than 10 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAA10lEQVR4Ae3YMQ6CQBCFYQL3MGpiWE9g6WndjoLjWNpAiWq9jFM82rGcHfMm+RMLik8zBpZGREJGOOGEu0Y44YQn7abNWhG\/KdoES\/oFP2hPqWxgOlrwjAtHfInOcQU6GEaYsgWfcdG+oh3ewTQZcOw0fun79fKoAN7BVCz4Ng3g+OwehnA3+EsbtFM0+DaL1oeDY4ao8E9UuPwxnKvCP+eipUjwN25APW\/5XvCwj7WBDhL20a11BLf20S3iYdl4PZGxNqsjdoUha2e+ySKc8AARTjjhQfoCLEebqfw1Zu4AAAAASUVORK5CYII=\"\r\tend if\relse if charging is \"charging\" or charging is \"AC\" then\r\tif percentage is greater than or equal to 96 and percentage is less than or equal to 100 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACNUlEQVR4Ae2YA8xdQRBGa7dRbTOorbA24tq2jahRjai2bds2gtq2Jsn5k6m22btb\/jvJedz57nm6u\/vifPr06Z8kiAfxIP5HCeJBPIjnF+YIt4QPgkudVAcoLqTi9mPBWBz7Ji75fyaeg1AfdUooQnh7YYIQj\/vvbYJwymkSn8vAFbyI+DzpQmkyi1r2xcdhBf1zTeK3GJTdVRiSkHfEISMrGTcN4nyneadrXmi1S\/hkyTgVeoS84uR1scjZRUZ8Mj4YxCkeiCC9XgUuIOsyWTlt81QW9WvETwmJ6R2pstqT1fRvFD8nFKKvhaArJVknPYo\/EZYIeVzEHwiV6ako6JpEThoNj5UX1kUUj6lHQr6o4o0Zn0N4pzI+ciqMYwL5SOLUkijiPdVp74ZOQ\/yqcFu4o+H5URxjoKP4M1vx4Spof4RZNbHzO07ZiG9XIRstpS8KcclvQd5vEx\/FmIGMfyE8VzzjK\/HxkyoeT0d2c53p\/6tifsdNlNDiX82gVYXXFuJef5zbhfKMSyoki4H+oYKuBowtIVzTWY6nw\/w+pvwb9CYQXqq8vuSlFU55mICeMgHl87VW6UZvY5U1TeXt\/uvWKlCM3kPkbFFZM\/xM+f6XtaMJykXGNSU9xEYYdpuXtf43EmvJSK8f97+RMG\/d4lkeJCf9dTwIxzNv3fxslpsSMkYYzO2Mwilzm6fNMjfy8+pu6QnEUM\/pSyaUU4FbHWU\/CrdwKRD+yQriQTyIB\/EgHsR98RnUoDZULQx7fQAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 86 and percentage is less than or equal to 95 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACNUlEQVR4Ae2YA8xdQRBGa7dRbTOorbA24tq2jahRjai2bds2gtp2eztJzkumutzy30nOj\/d2vj3XiOc4zj+JFbfiVvyPYsWtuBUvKMwT7gifhCh1Wk1QUkjD30+9Gpn7Ni4FvcRzEWqizgjFCO8oTBIS8P\/HIEE45XYTn8\/AVSxEQgObsiyZxQP2JcRhFf3z3cTvMChnVGFIRt6xCBnZybjtIs4+zZqufanNHsEJyAQVeoy8kuR18+jd85M1zz7\/U3GKD0JIb1SBi8i6SlZuPxk\/kaN+jfgZISm9o1VWR7Ka\/43iF4Qi9LUSdKUm67RB8WfCMiFfFPFHQlV6Kgu6ppCTTsNnFYUNIcVj9UQoEFa8KeNzCR9UxmdOhfHcQD6UOLUsjHhvddq7pdMQvy7cFe5p+H4McwyOKP4iqPhIFXQwxFU1qaE17gQR36lCNgeUvizEJ78Veb9NfAxjBjP+lfBS8YJd4rOjis8zkN1S5f2uXYU17k6pH4iXJLe68Fbl\/daDc6dQkXHJhRQx6B8u6GrE2FLCDZUT9XRY0MQl\/xa9iYTXKq8\/eemFMwYuQM+5ABUwda\/Sg96mKmuGytv7192rQAl6j5CzTWXNMnPJN39bO5agPGTcUNLDfGbsDXBba\/xBYj0ZGfXn5h8k3B\/dEgScJDf99QwIJ3B5dDP2sNyckHHCUP7OzKU9cuGU28\/rifnsNp99hL6kL4VQQQVujyj7GYf5QiH7JssUVtyKW3ErbsWt+Bcm6kxE9j1EfAAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 76 and percentage is less than or equal to 85 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACOElEQVR4Ae2YA8xcQRSFa7dRbTOorbA24tq2jahRjai2bds2gtq2ziZnk1u9ybw7bX\/MTb4fu3PPfM9I8O3bt1iJF\/fiXvy\/4sW9uBcvDBaAe+AL0NRZMUFpkI5\/Pzc1cu67dClsEs\/DUBd1DpRgeGcwBSTi\/59tguiUN0h8IQeu4UIk5pcayjOzpGVfYjqsYf\/CIPF7HJRbK0xSMO+EIiMnM+4GiHOf5pque6XdPvDNkkki9ATzSjOvB8dI9hnXPPf5AHEWPwghvVkELmHWdWbl\/VOfea2z\/pL4OZCcvWNFVmdmtYyJ4pdAMfa1AbLSMuusQ\/EXYAUooBF\/AqqzpyqQNY05GST8rDLYFFI8Ws9AobDizTk+D\/gkMr6C8iapiHxYcdaKMOJ9xWnvjkyj+E1wHzyQ8PtxnGOoUvyVrfhoEXQ4xFU1uXqNs2zEd4uQrZbSV0FC5rcB3\/6l+DiOGcrxb8BrwSvuEl+BrFcgE7NbM0sr\/sp6jRso8xvx0sytCd4rxFUH525QmeNSglRR2D8SyGrCsWXALZGjPR0WdnHJv8PeJOCtyBvIvIzgnIML0EtegAq5ulfpxd7mImuWyNsf4+5VSCn2HmPODpE1x80l3\/1t7XgG5WPGLSE9IqBvv+K21umDxEZmZFZkGB4kzI9uiSwnycv+Bg6EE5kf3fQPyy0ZMgEM599ZwTmLDNXDcoTCYCF3m6\/AVK\/ZlwpUEoE7lbJf6bAQFPFvsry4F\/fiXtyLe3FXfAeAdGI06MOmAgAAAABJRU5ErkJggg==\"\r\telse if percentage is greater than or equal to 66 and percentage is less than or equal to 75 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAACGElEQVR4Ae2YA4xeURCFa7dRbTOorRg149q2jahRjai2bds2gnpt42xy\/mSiu7nvzfpO8i1nzv89o1BaWlqexIk7cSeeozhxJ+7Em4J94A9IAX7qtfiAtqACfw4HxuJn\/6ZL08zE6zFUo96AVgyfCDaBIvw92SaITvVN4vvZeIoLUZT\/9ENHZra2nCtKh1Oc328S\/8Omukr7XynmPfORUZsZvw3i3Ke5pnt\/GnMHpFmyQYQ+Y15b5k0Dd6zXPPd5gziLf\/AgfVEEHmLWV2bVZw\/zrWApi5M3oCRnV4usicwanhvFP4AWnBsFZJVn1mtF8QhwDDTyIx4CenKmO5C1hTmVJArigQoDTbyKD2V\/PZAkMlJBR7OQP3HWMS\/is8Vp7xdnpfh38Bf8k\/D\/a5TEo2zFV4qghx6uqiWVxNNsxG+KkMuW0p9BYc5mu\/ga9ixmfwyIFkRxl0gFsqJAFeV9PMp+jZtpJ8VZbXPDwXkTdGVfaVAmAOeXA1mD2NtO+XTYVOOS\/4uzxUCsyJvPvMrgjYJ4JC9ATbTuVWZwdqjI2iHy7ua6exXShrNPmHNNZO3SueTr39auZVADZvwQ0stE313921qdB4nzzKhq6FF4kDA\/uhWx\/JD6nO+nIFzE\/Oim87A8nCHrwFL+XB28MY\/pPSxn0JRL90deQAwVzbkyoIsIvO5TNhX8oUsz9ybLiTtxJ+7EnbgT1yId5lN9u+XAf4cAAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 56 and percentage is less than or equal to 65 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB\/klEQVR4Ae2YA4xdURRFa7dRbTOorRg145pRbStqVCNOatu2bQY1xvaeZP\/kjO5\/OON7kvV5z37rGSVSU1MLJVbcilvxfMWKW3Er3hrsBj9BMvBTL8QEOoNq\/BwWrJHT\/kGX1sHEmzBUo16CDgyfDjaDUvye5CaITk1N4ns48DhnorTCquzOzI4u+0rT4Tj795jEf3JQY6XtrwLzHvvIaMiMHwZxbtNc0gPfT7oJUl2yUYQ+Zl5nH+KlmZFsEGfxBw\/S50TgfmZ9UlhzrNwRfwnKs3eNyJpekMXfgnbsmwBkVc0F8XBwGLTwI\/4f9GdPXyBrK3NqKIsHKhS08io+muObgESRkQK6SwFtcdZhL+JzxGHvu0yj+BfwC\/yW8P+1SuKRbsVXiaB7Hs6q5ZXEU92IXxMhF1xKfwAl2Zvn4oHVvITjo0GUIJKbRErm1QpqKW\/jke6XuJku2Yh3Lgg75zXQm+MqgkoB2L8CyBqRS4fD1hqn\/O\/sLQNiRN4C5cNhBE9ArbSuVWayd7TI2lmgr1VIJ\/Y+ZM5l\/ROQ\/mXtOgY1Y8ZXsQDG61\/W6t9InGFGbfm7\/o2E+datlMuJNGX\/EAXhUuZbN52b5bEMWQ+W8XNd8NLcpneznE5rsIebTYqD0Cj2VQK9ROAVn7IpdNgD2tgnWVbciltxK27FrbgWafY8kPNLpbfPAAAAAElFTkSuQmCC\"\r\telse if percentage is greater than or equal to 46 and percentage is less than or equal to 55 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB+0lEQVR4Ae2YA6wdURRFa7dxbSOorRg145pRbStqVCNOatu2bQblt639k\/2S8zUvd+bM5z3JerxnzxqjXGZmZonEiltxK16kWHErbsXbg\/3gL0gHXuqNmEB3UIefo4I1ctp\/6NI+mHgLhmrUW9CF4bPBdlCB39NMgujU0kn8AAee5kxUVFiVvZnZ1bCvIh1Os\/+Ak\/hfDmqutP1VY95zDxlNmfHHQZzbNJf00M\/T7oJMQ7aK0OfM6+5BvCIz0h3EWfzBhfQlEXiYWd8U1hzLH\/G3oCp7N4is2cVZ\/CPoxL4pQFZtH8SjwXHQxot4OBjMnoFA1k7+ri0eqEjQzq34eI5vAVJFRgbo7ac467gb8QXisPebvVL8B\/gH\/kv4\/0Yl8VhT8XUi6JGLs2pVJfFME\/FbIuSKofQXUJ69hS4eWM0rOD4exAliuUlkAFmxoJ7yNh5rvsSd6ZGPePfisHPeAv05rjqoEYD9a4CsMT4dDttrnPJ\/s7cSSBB5S5QPhzE8AbXTulaZy97xImtvsb5WId3Y+5Q51\/VPQPqXtZsY1IoZP2W4\/mWt\/o3EBWbUVxEXNxImt24VDCfSkv0jFIQrON+66dwsT2TIZrCKnxuCt85tejfL2bQHB7jZZIBgFce+GqCfCLzhUTaDDgdAB\/sky4pbcStuxa24FdciC4Vak2WaD0PuAAAAAElFTkSuQmCC\"\r\telse if percentage is greater than or equal to 36 and percentage is less than or equal to 45 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB\/UlEQVR4Ae2YA6wcURSGa7dxbSOorRg145pRbStqXDdOatu2bQbFs+1\/k3+T8zT77s6Zx3uSb3nPP98YlbKzs8skVtyKW\/ESxYpbcSveGRwE\/0EmcFPvxAR6gwb8HBOokdP+R5fOgcTbMFSj3oMeDJ8PdoIq\/J5hEkSntk7ihzjwLGeiqsKq7M\/MnoZ9Velwlv2HnMT\/c1Brpe2vFvNeushoyYx\/DuLcprmkR36ddR9kG3A\/T+hL5vV2IV6VGZkO4iz+YCJNrojAo8z6obDmWN6Ivwc12btFZM0vzeKfQTf2zQCy6nsgHgtOgg5uxCPBcPYMBbJ2SwFFcX9Fg07Bik\/m+DYgXWRkgf5eirNOBiO+RBz2\/so0iv8CISBUwv+3KonHm4pvEkFPgjir1lQSzzYRvyNCrhlKfwOV2Vvs4v7VvIbjE0GCIJ6bRFbe1QoaKW\/j8eZL3Jk+BYj3Lg075x0wmONqgzo+RPgGIGuCR4fDzhqn\/L\/srQaSRN4K5cNhHE9AnbSuVRayd7LI2l+qr1VIL\/Y+Z85N\/ROQ\/mXtNga1Y8ZvGa5\/Wat\/I3GJGY1VxOWNhMGtWxXDibRl\/xgF4SrOt246N8tTGbIdrOPnpuC9c5vezbKPzuAQN5usIoQmsK8OGCQCb7mUzaLDIdDFPsmy4lbciltxK27FtcgBcRuVdY4fggcAAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 26 and percentage is less than or equal to 35 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB6ElEQVR4Ae2YAURDQRjHa4sSBVBC2pK9AGUxSgAgQgwgEgxACElSQAAJAdAjDIMQZSxEBgVKCrQVUrUV1N71xX98pu65ve+pcR8\/XnX3v1\/vbu\/erU0p1ZJYcStuxf8UK27FrbhD7BFloqaC1TkbIEn04vqZ0BbGLsHF8ROPIVSiLogxhGeIbSKCnz9NguAU14m7aJjDPxEVmMoUMscN+0XhkEN\/VydeRqMhofXXhbxigIxBZJQ04ljTuNMzl4sFQvlQ0AxaRF4ygHgUGTWNOAq\/gJgvvwTuI+taYOZQ4YtvsKxMq4gvELx6QhB\/IbLESBDxRxY4TfDa4QKC4vV6IhLNiqfRPkZ8sAyPSIUpjso2I77EHnt3PA3iN8Q98cDB3zeFxCum4uss6LSJXbVTSFyZiOdZyKGh9BXRbiAtKl6f5hW0fyOqjAqWhNc4rUSf8BqvmN9xPRM\/iCf\/w4czT0xpBlsjeM2F9Dh0JHfODuKd5S0LPw5fsQElpLf8NMvabaV3lTPkHMlvQHKvtScNQcPIuNXLyL7WShwkDpDRLyHODxImR7eI4SBx9J8VEI7oj24yh+V5hGwRq7gewNauL6HD8jcO4WLZeMq\/qujXTUyywOOAsh4cXGLUfpNlxa24FbfiVtyKS\/EFcCypERicPW8AAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 16 and percentage is less than or equal to 25 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB0ElEQVR4Ae2YAUQDURjHa4smCqCEtCVbgLIYEQCIEAFEggGAkIQCAkgIgI4wDEIULEQGBUoKtBWo2gpq9\/rwxyd51+195xzfx4\/rde\/\/ftu93bt3PcaYRKLiKq7isaLiKq7iBeKQaBId41ZXbIAiMYTj16COGLsBl0KQeBahEnVNTCO8TOwRKfz9HSYITjmbuIcTq\/gQaYFLWULmTMh+aThU0d+ziTdx0rjQ\/Msgr+6QMYaMhkUccxrf9MLNWo0wv6iFGLSOvKKDeBoZHYs4Cg1cmPPPAY+QdSdw5VDRi2+zrHJSxFcJXoMRiL8RFWJSSnye4LWPdmlxg3oh8q7iWeKLZfhEKUpxVMVFPEM88jSI3xNPxDMH\/98REm+5iF90sar2C4mbbsVPQkrfEr3oG5v4Bs7\/INqMFqaEb1ihfZhLxTZVLMz+IV6M\/8cZzBbBaymi22FBUryP+GR568K3w3csQHnpJX+ZZR0k6VnlEjmn4guQw2PtecAgE8h44O3yj7XyG4ljZIzwdvmNhH3rlgo5SA79FwWEU5atm9hmeQUhu8QmjkextEsUNsvBryc8TBvfBFcb\/QaIORZ45ijrw8EjpvRNloqruIqruIqruBQ\/L0HEIEhS4cAAAAAASUVORK5CYII=\"\r\telse if percentage is greater than or equal to 10 and percentage is less than or equal to 15 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAB0ElEQVR4Ae2YAUR7QRzH\/\/8tmiiAEtKW7AUoixEBgAgRQCQYAAhJKCCAhABohGEQomAhMihQUqCtQNVWUHvXV7445Obe\/Z5n3JcP29u7733KtXvXP6VUT+LFvbgXTxQv7sW9eAAOQRN0lFuutAkKYIivX4ExnLtBl6CbeJalErkG0ywvgT2Q4vtvZRE65UziZd5Y5Q+R5ocuFNk5YzkuTYcqx5dN4k3eNO4qTDLsqzt0jLGjYRDnmuZveuFmrQYUqEWctM6+goN4mh0dgzjDC7\/SJMKER+y643sXmPjFt7WuUq+IrwI9gzGIv4EKmJQSnwd69nldWlwxLyDvKp4FX1pHCIpxijMVF\/EMeFSMJn4PnsCzDj\/fERJvuYhfRNhV+4XEVVTxE2WXW\/CfYxMT3+D9H6Ct0eKSCJUWXh\/WOxJbKgZm\/xAvJPLHackW0LMU09dhICneBz61vnXhr8N3bkB56S1\/Wes66KVnlUv2nMpuQPaPtecWk0yw48Fd2PxYK32QOGbHiLu0+SBhOrqlLCfJcfyigHDKfHSTOSyvsGQXbPL1KLd2c4QOy0AFoMxlE6ruaXPcAJjTCs+UW0LQpMuU\/0+WFF7ci3txL+7FvfgPa4PaELnaZzsAAAAASUVORK5CYII=\"\r\telse if percentage is less than 10 then\r\t\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAYAAAAacYo8AAAByElEQVR4Ae2YAUQDURjH1xZNFEAJaUu2AGUxIgAQIQKIBAMAIQkFBJAQAB1hGIQoAJFBgZIS2gpUbQW1u\/74j09y5\/a+Z8b7+HHb7v3vt93bvfsuEQRBT+LEnbgT7ypO3Ik78Tw4AnXQAiZ1JQ5QAMPcfosayGPX6JKPEs8wVKOuwQzDS2AfJPn6J04QnbJh4h53rPBLpBROZZGZszHHpehQ4XgvTLzOnSZMhUmaeVWDjHFm1ELEOaf5Sy\/erD8aileZVzDISDGjFSbergTFud0Rx8y6UzhzLPviOyKr1Cvia0DWkAXxd1AGU1riC0DWAd\/XFm\/XK8iZimfAt8jwQdGmOKtsIp4GTzKN4vfgGbxI+PmuknjDRPyig1V1QEk86FT8NKb0Lejj2K6Jb3L\/T9AUNDgl\/L+nFYzIDPtTJT5z\/4gXuvDnjM02kLVs6XKY1xTvB18ib0P5cvjBBSinveSviKzDXrpXuWTOmeYCZPu2dpIZDxrS8rbWdiNxwoxRDXHZSMRp3ZIxD5Ll+CUF4WRI66bWLK8yZA9scXuMS7tGsVmOfjzhcdr4IKqaHDcI5kXguaGsTwcPTLsnWVo4cSfuxJ24E3fiv3yS6WMKPcrpAAAAAElFTkSuQmCC\"\r\tend if\relse if charging is \"charged\"\r\tset batteryIcon to \"iVBORw0KGgoAAAANSUhEUgAAAC4AAAAsCAQAAACweEK3AAAB8UlEQVR42u2WP2hTURSHP5JBzVBcFHUQE5BGdPEfCBapm5ubWymKi4MiOIqCoFMHQZwFh8YpQ5dWEGqgWV0awVEQbBb\/VFtRWl8+h6QxMe++94QOCu93h8e577yPe88995wHuXLl+qdl1VnbRiZrGcBTjoGrI28jV5y1+ie6HOM6qpbHwWs+tgD+DHitWhmG19Q5yxZTd3hGPRF4V7TsnFobnm6rhzIEb6f6KtHjoLoyPBWpRXApGJJHAH5Tp8AbsT5LYFGNhuHq1jNWzwF8p26AlZDbICsrvOWO\/q6egdPbB3\/jUfBJz9oPLmeB+8W6h5PhH50Er\/es1+Ce7gAnXEiAq352PAl+CTzXt66OZMdCIlzrYfgtcPfAddk06g9tgrdT4Gsh+D0A1wIB\/u5YhpUbD28A+CGA3rAAXkmJeRB+H3wxYHcGylrHY+DlxGxJDEtj5PB+5\/cUeMEfGeDBA204Ae6yZMkS+LI3PwOe9m1KnndTsZp+\/d\/3ipbqPLjXVuol+mrd8Sy15Sb4sHtfAWxuX23Rk+C6+gnAp39XW5JL7gPwvLoJ4N3gEprxJTe1WTiv7svQTmKaxVabKwQ+qagXU8GF+DaX1KCnwRnvgAficySlQYNVa7btjLiugyXPAriYgu3YtuaR\/EctV67\/R78ArOuEoxggnn4AAAAASUVORK5CYII=\"\r\tset percentage to 100\rend if\r\rreturn \"{\\\"text\\\":\\\"\" & percentage & \"%\\\", \\\"icon_data\\\":\\\"\" & batteryIcon & \"\\\"}\"",
      "BTTTouchBarButtonCornerRadius" : 6,
      "BTTTouchBarHideCover" : 0
    }
  }
]

One question I have: do you like having the white icon when the battery is fully charged, or would you prefer if it remained green?

Funny you ask about the icon. I ended up changing it to white. I used the plan White 100% battery without the lightening bolt.

Working on installing this in a few minutes. Nice work!

I associate the lightening bolt with charging, not when Battery is 100% (Assuming its no longer charging when its 100%)

Hey, I am new to BTT and have gotten it set up to how I want it. I have used the first version that you posted and managed to get it to work, but the last version that you posted does not work for me, just copying and pasting it in. Is there something I am doing wrong? Thanks so much!

Ah, unless you are very familiar with how to edit widgets in BetterTouchTool’s preferences, I suggest just waiting for the next experimental version! It’ll be ready either today or tomorrow, I think. Just gotta hook up the settings!