Skip to content

Commit

Permalink
Added speedtest option
Browse files Browse the repository at this point in the history
  • Loading branch information
OzTamir committed May 14, 2016
1 parent 5129130 commit 6ae7792
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions WhyFi.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import webbrowser
import rumps
from script_util import *

# Check ping every 15 seconds
PING_INTERVAL=10

# Check ping every PING_INTERVAL seconds
PING_INTERVAL = 5

# Speedtest site url
SPEEDTEST_URL = 'http://www.speedtest.net/'

def ping_timer(menu_item):
def update_function(timer):
Expand All @@ -28,7 +33,14 @@ def __init__(self):
wifi_restart = rumps.MenuItem("Wifi Power Cycle",
icon="icons/wifi_restart.png")

self.menu = [wifi_restart, router_reboot, self.ping_item, ping_checks]
speedtest = rumps.MenuItem("Open Speedtest...",
icon="icons/speedtest.png")

self.menu = [wifi_restart, router_reboot, self.ping_item, ping_checks, speedtest]

@rumps.clicked("Open Speedtest...")
def open_speedtest(self, _):
webbrowser.open_new(SPEEDTEST_URL)

@rumps.clicked("Wifi Power Cycle")
def wifi(self, _):
Expand Down
Binary file modified icons/router_reboot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/speedtest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6ae7792

Please sign in to comment.