-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmindfulclock1
executable file
·102 lines (94 loc) · 3.47 KB
/
mindfulclock1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/usr/bin/python
# -*- coding: utf-8 -*-
# With the MindfulClock you turn your device into a Bell of Mindfulness.
# Concept, Design: Marcurs Möller
# <http://apps.microsoft.com/windows/de-de/app/
# mindfulclock/58063160-9cc6-4dee-9d92-17df4ce4318a>
# Programming: Andreas Ulrich
# <[email protected]>,
# <http://erasand.jimdo.com/kontakt/>
#
# This file is part of the "MindfulClock".
# "MindfulClock" is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# "MindfulClock" is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License for more details. You should
# have received a copy of the GNU General Public License along with
# "MindfulClock". If not, see <http://www.gnu.org/licenses/>.
'''The start command for the sourcecode distribution.
mindfulclock1 [OPTIONS]
--start-tna: Start minimized in the Taskbar Notification.
--autostart-clock: Start the clock automatically
--menu-time: Show the time not beside the taskbar indicator icon.
--taskbar: Use the classic Taskbar.
--help: Show help.
'''
import sys
import wx
if __name__ == '__main__':
# Command line options.
# tna for --start-minim, clock for --autostart-clock,
# menu for --menu-time, tbico for --tb-icon
clio = sys.argv
# Check options
if '--start-tna' in clio:
tna = True
else:
tna = False
if '--autostart-clock' in clio:
clock = True
else:
clock = False
if '--menu-time' in clio:
menu = True
else:
menu = False
if '--taskbar' in clio:
tbico = True
else:
tbico = False
if '--help' in clio:
print('')
print('MindfulClock 1.0')
print('Commando: mindfulclock1 [OPTIONS]')
print('')
print(' --start-tna Start the clock minimized in')
print(' the Taskbar Notification Area.')
print('')
print(' --autostart-clock Start the clock automatically.')
print('')
print(' --menu-time Show the time not beside the')
print(' taskbar indicator icon.')
print(' (With --taskbar, this option')
print(' will be ignored.)')
print('')
print(' --taskbar Use the classic taskbar, instead')
print(' of the application indicator.')
print('')
print(' --help Show this help.')
print('')
else:
# Start, append the directory of the debian package.
sys.path.append('/usr/share/mfc')
try:
# Import mfc1
import mfc1
# Run GUI, one instance runner.
app = wx.App()
frame = mfc1.GUI(tna=tna,
clock=clock,
menu=menu,
tbicon=tbico)
app.MainLoop()
except ImportError:
print('')
print('The start of MindfulClock failed,')
print('the package <mfc1> could not be found.')
print('')