Skip to content

FuzzyIdeas/IsThereNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IsThereNet

Your internet connection status

at a glance

Installation

  • Download, unzip, move to /Applications

What does this do?

IsThereNet watches for internet connection status changes and draws a colored line at the top of the screen to indicate the status.

Colors:

  • 🟢 Green: connected (fades out after 5 seconds)
  • 🔴 Red: disconnected (stays on screen until connection is restored)
  • 🟡 Yellow: slow internet (fades out after 10 seconds)

The top status line does not appear in screenshots and does not interfere with clicking on the menu bar.

connected disconnected

How does it achieve that?

IsThereNet uses the native NWPathMonitor API to efficiently check if a connection can be established to Cloudflare's DNS IP 1.1.1.1.

That IP was chosen for multiple reasons:

  • it should connect to a server that's close to you
  • it's a well-known IP that's unlikely to change
  • it's unlikely to be blocked by firewalls
  • it should not sell your data to advertisers like Google's 8.8.8.8 does

Uh.. how do I quit this app?

The app has no Dock icon and no menubar icon so to quit it you'd need to do one of the following:

  • Launch Activity Monitor, find IsThereNet and press the ❌ button at the top
  • Run the following command in the Terminal: killall 'IsThereNet'

Alternatives

If you want to monitor more complex network conditions, you can use a few different alternatives:

  • iStat Menus which is a paid app but does a lot more than just network monitoring (CPU, RAM, Disk, etc)
  • PeakHour which is a subscription-based app that does a lot of network monitoring, latency checks, etc

Logging

IsThereNet logs internet connection status changes to:

  • the system log (accessible via Console.app)
  • to a file in ~/.logs/istherenet.log
  • to the command line if you run the binary directly

Config

To keep the no-UI approach, the app can be configured through editing a JSON file. The file is located at:

~/.config/istherenet/config.json

The config file looks like this:

{
  "sounds" : {
    "disconnected" : "Mezzo",
    "slow" : "Submerge",
    "volume" : 0.4,
    "connected" : "Funky"
  },
  "pingIntervalSeconds" : 5,
  "pingIP" : "1.1.1.1",
  "pingSlowThresholdMilliseconds" : 300,
  "fadeSeconds" : {
    "connected" : 5,
    "disconnected" : 0,
    "slow" : 10
  },
  "colors" : {
    "slow" : "systemYellow",
    "connected" : "systemGreen",
    "disconnected" : "systemRed"
  },
  "pingTimeoutSeconds" : 1,
  "screen": "all",
  "shellCommandOnStatusChange" : "echo 'Status changed to: '$STATUS' with ping time:' $PING_TIME"
}