|
13 | 13 | # logging.basicConfig(filename='./logs/my.log', level=logging.DEBUG, format=LOG_FORMAT, datefmt=DATE_FORMAT, encoding='utf-8')
|
14 | 14 | # print(time.strftime('%Y%m%d',time.localtime(time.time())))
|
15 | 15 |
|
16 |
| -VERSION = '0.0.1' |
| 16 | +VERSION = '0.0.2' |
17 | 17 |
|
18 | 18 | STOP_ICON = '🔴'
|
19 | 19 | START_ICON = '🟢'
|
@@ -96,22 +96,22 @@ def __init__(self, *args, **kwargs):
|
96 | 96 | self.menu.add(rumps.MenuItem(title='重启所有', callback=self.restartAll, key='r'))
|
97 | 97 | self.menu.add(rumps.separator)
|
98 | 98 | self.menu.add(rumps.MenuItem(title='配置直达'))
|
99 |
| - self.menu.add(rumps.MenuItem(title='httpd', callback=self.Configure)) |
100 |
| - self.menu.add(rumps.MenuItem(title='PHP', callback=self.Configure)) |
101 |
| - self.menu.add(rumps.MenuItem(title='MySQL', callback=self.Configure)) |
102 |
| - self.menu.add(rumps.MenuItem(title='Redis', callback=self.Configure)) |
| 99 | + self.menu.add(rumps.MenuItem(title='📂httpd', callback=self.Configure)) |
| 100 | + self.menu.add(rumps.MenuItem(title='📂PHP', callback=self.Configure)) |
| 101 | + self.menu.add(rumps.MenuItem(title='📝MySQL', callback=self.Configure)) |
| 102 | + self.menu.add(rumps.MenuItem(title='📝Redis', callback=self.Configure)) |
103 | 103 | self.menu.add(rumps.separator)
|
104 | 104 | self.menu.add(rumps.MenuItem(title='关于', callback=self.about))
|
105 | 105 | self.menu.add(rumps.separator)
|
106 | 106 |
|
107 | 107 | def Configure(self, sender):
|
108 |
| - if sender.title =='httpd': |
| 108 | + if sender.title =='📂httpd': |
109 | 109 | subprocess.call(['open', '/opt/homebrew/etc/httpd'])
|
110 |
| - if sender.title =='PHP': |
| 110 | + if sender.title =='📂PHP': |
111 | 111 | subprocess.call(['open', '/opt/homebrew/etc/php/7.4'])
|
112 |
| - if sender.title =='MySQL': |
| 112 | + if sender.title =='📝MySQL': |
113 | 113 | subprocess.call(['open', '/opt/homebrew/etc/my.cnf'])
|
114 |
| - if sender.title =='Redis': |
| 114 | + if sender.title =='📝Redis': |
115 | 115 | subprocess.call(['open', '/opt/homebrew/etc/redis.conf'])
|
116 | 116 |
|
117 | 117 | def httpd(self, sender):
|
@@ -335,7 +335,7 @@ def restartAll(self, sender):
|
335 | 335 | self.menu['Redis'].title = START_ICON + 'Redis'
|
336 | 336 |
|
337 | 337 | def about(self, sender):
|
338 |
| - rumps.alert('作者:张雷\n编译日期:2022年2月1日') |
| 338 | + rumps.alert('作者:张雷\n编译日期:2022年2月2日') |
339 | 339 | #rumps.quit_application(sender)#退出
|
340 | 340 |
|
341 | 341 |
|
|
0 commit comments