-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,478 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
modules: | ||
goagent: {auto_start: 1, current_version: 3.1.40, ignore_version: 3.1.38} | ||
launcher: {current_version: 1.0.7, ignore_version: 1.0.5} | ||
launcher: {current_version: 1.0.8, ignore_version: 1.0.5} | ||
update: {check_update: 1, last_path: /, node_id: '0', | ||
uuid: 0} |
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env python | ||
# coding:utf-8 | ||
|
||
if __name__ == "__main__": | ||
import os | ||
import sys | ||
|
||
current_path = os.path.dirname(os.path.abspath(__file__)) | ||
python_path = os.path.abspath( os.path.join(current_path, os.pardir, os.pardir, 'python27', '1.0')) | ||
noarch_lib = os.path.abspath( os.path.join(python_path, 'lib', 'noarch')) | ||
sys.path.append(noarch_lib) | ||
osx_lib = os.path.join(python_path, 'lib', 'osx') | ||
sys.path.append(osx_lib) | ||
|
||
import rumps | ||
import webbrowser | ||
import module_init | ||
|
||
class Mac_tray(rumps.App): | ||
def __init__(self): | ||
super(Mac_tray, self).__init__("XX-Net", title="XX-Net", icon="Python.ico", quit_button=None) | ||
self.menu = ["Config", "Reset", "Quit"] | ||
|
||
@rumps.clicked("Config") | ||
def on_config(self, _): | ||
webbrowser.open_new("http://127.0.0.1:8085/") | ||
|
||
@rumps.clicked("Reset") | ||
def on_reset(self, _): | ||
module_init.stop_all() | ||
module_init.start_all_auto() | ||
|
||
@rumps.clicked("Quit") | ||
def on_quit(self, _): | ||
module_init.stop_all() | ||
rumps.quit_application() | ||
|
||
def notify_general(self, msg="msg", title="Title", buttons={}, timeout=3600): | ||
window = rumps.Window(title, msg) | ||
window.title = title | ||
window.message = msg | ||
window.default_text = 'eh' | ||
for button in buttons: | ||
window.add_buttons(button) | ||
res = window.run() | ||
return res | ||
|
||
def dialog_yes_no(self, msg="msg", title="Title", data=None, callback=None): | ||
if rumps.alert(title, msg): | ||
callback(data) | ||
|
||
|
||
def serve_forever(self): | ||
self.run() | ||
|
||
sys_tray = Mac_tray() | ||
|
||
def main(): | ||
sys_tray.serve_forever() | ||
|
||
if __name__ == '__main__': | ||
main() | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# rumps: Ridiculously Uncomplicated Mac os x Python Statusbar apps. | ||
# Copyright: (c) 2015, Jared Suttles. All rights reserved. | ||
# License: BSD, see LICENSE for details. | ||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
|
||
""" | ||
rumps | ||
===== | ||
Ridiculously Uncomplicated Mac os x Python Statusbar apps. | ||
rumps exposes Objective-C classes as Python classes and functions which greatly simplifies the process of creating a | ||
statusbar application. | ||
""" | ||
|
||
__title__ = 'rumps' | ||
__version__ = '0.2.1a' | ||
__author__ = 'Jared Suttles' | ||
__license__ = 'Modified BSD' | ||
__copyright__ = 'Copyright 2015 Jared Suttles' | ||
|
||
from .rumps import (separator, debug_mode, alert, notification, application_support, timers, quit_application, timer, | ||
clicked, notifications, MenuItem, Timer, Window, App) |
Empty file.
Oops, something went wrong.