-
Notifications
You must be signed in to change notification settings - Fork 0
/
notificater.py
35 lines (29 loc) · 919 Bytes
/
notificater.py
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
import os
class Notification:
def __init__(self, title ,subtitle,message):
self.__title=title
self.__subtitle=subtitle
self.__message=message
self._sound="path"
def notify(self):
t = '-title {!r}'.format(self.__title)
s = '-subtitle {!r}'.format(self.__subtitle)
m = '-message {!r}'.format(self.__message)
os.system('terminal-notifier {}'.format(' '.join([m, t, s])))
@property
def get_title(self):
return self.__title
def set_title(self,title):
self.__title=title
@property
def get_subtitle(self):
return self.__subtitle
def set_subtitle(self, subtitle):
self.__subtitle=subtitle
@property
def get_message(self):
return self.message
def set_message(self,message):
self.__message=message
def set_sound(self,path):
return self._sount=path