PiDNS Stat - a tray app for mac users

Hi Everybody!

I've made a small app for mac shows current stats from your Pi-Hole, it uses the Pi-Holes API to retrive data from your Pi-Hole and then displays them in this app.

It's sitts in the tray of your mac and when you click it it will display some stats about your Pi-Hole.

There is a known bug with electron (the tool I used to make this app) for right clicking the icon so in order to shutdown the app you will need to double click the icon.

Here are some screenshots

The source code and download links can be found here:

Hope you like it :smile:
Cheers!

2 Likes

Nice. It also works on Ubuntu, (and probably anything else running node/electron thanks to the whole cross-platform thing).

It works but has some glitches, that goes for windows version as well. The app icon is not available and the code responsible for positioning the mainWindow does not 100% work on Linux or Windows.

const getWindowPosition = () => {
  const windowBounds = mainWindow.getBounds()
  const trayBounds = tray.getBounds()

  const x = Math.round(trayBounds.x + (trayBounds.width / 2) - (windowBounds.width / 2))

  const y = Math.round(trayBounds.y + trayBounds.height + 4)

  return {
    x: x,
    y: y
  }
}

This one! Glad you like it :slight_smile: