Pi-hole Stats In Your Mac’s Menu Bar
Here’s a fun project to supplement your Pi-hole: view your stats in a pull-down menu from OS X’s menu bar.
[UPDATE]: v3.0 uses numbers instead of strings, so you will need to modify this script to have it work with v3.0.
5 Responses
cool!
It’s pretty nice! Now I just need to find a way to make a Pi-hole berry emoji…
pilogo = ‘iVBORw0KGgoAAAANSUhEUgAAABwAAAAkCAYAAAHtI2rCAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAABYlAAAWJQFJUiTwAAABy2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPHhtcDpDcmVhdG9yVG9vbD5BZG9iZSBJbWFnZVJlYWR5PC94bXA6Q3JlYXRvclRvb2w+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgqyI37xAAALCElEQVRYCU1XC3CcVRW+j39382yStiFtHrv/YzcJhlYgFRUGDCrM2NIHlCACw8AoKA5qK1oUUcq0OqBQio8ZxBmgpSCIMEArMLSUSqEWMKDFvpLNPpIQKLF5NY/N7n/v9Ts/2dQ78++999xzz7n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ohiRLM7OpN51+EgLoTgia0+Rcakm+BTfSIsRzFEI9WkBYXsHeiGZ6N65gWMNux0P8zmATEuBGJIJPj7qAgB/EqgX/bXagsA2sSOPxe9bsGq7KT1s7KoFGzfXNC+Mx+z0UOf0HCop8lgW3uXNnCxIM37VECzIUuPY3pdQbeBbXEZHSHZduGu+C64wyX4eF5aWW9QVaw1Oc3Eb1K5F2RGJaTp+PsjnFtDov3de3AySreBitWZWv9OsKJUe8FGza7DfjOQtkeQq3wus9qdR6Wiw2nP4JIeU1QJT3sWU71yypECDBddQAgwH8F2BtQ282e/rPFDbDQ7+Dgotg1VXH0+njIFmkkFqxN44TvUQwebswrAHkPoAuXU9nYdP7SJYXLCM+KITEBG4ShF5YyhhXaNaJrD0HUv6BZMmBvxV/UD42Rt2DLKV/AHPyi9BGbqLGYzH39X379u2mSTwab2NS3QghlRBwSEu541gq1UdrxeY0Okt5iF2OpBlFTh/RqvB4b39/8KqE+y0oJGVF+XOai/v/vydGgj0qDR1viDeysFqP2SpEvgRAIYFKObj0Gd+orXiy0yMTjujAt4/evXNKMJ5r/wOIWbIdjcF48wAAAABJRU5ErkJggg==’
this doesn’t seem to work after upgrading to the newest version of pi-hole 2.8.1
Comments are closed.