From 97f4077675053858ddcfb09d820b161b7d0c4825 Mon Sep 17 00:00:00 2001 From: Du Song Date: Mon, 23 Feb 2015 17:59:10 -0500 Subject: [PATCH] add "Wakatime: Open Dashboard" into command palette --- Default.sublime-commands | 6 ++++++ WakaTime.py | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 Default.sublime-commands diff --git a/Default.sublime-commands b/Default.sublime-commands new file mode 100644 index 0000000..c7d352b --- /dev/null +++ b/Default.sublime-commands @@ -0,0 +1,6 @@ +[ + { + "caption": "Wakatime: Open Dashboard", + "command": "wakatime_dashboard" + } +] diff --git a/WakaTime.py b/WakaTime.py index c13a9ab..285a94b 100644 --- a/WakaTime.py +++ b/WakaTime.py @@ -245,3 +245,11 @@ class WakatimeListener(sublime_plugin.EventListener): def on_modified(self, view): handle_action(view) + +import webbrowser + +class WakatimeDashboardCommand(sublime_plugin.ApplicationCommand): + def run(self): + webbrowser.open_new_tab('https://wakatime.com/dashboard') + +