-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetupKvfile.py
66 lines (48 loc) · 1.63 KB
/
SetupKvfile.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
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
import os
import time
from sqlite3.dbapi2 import Time
from time import strftime
import webbrowser
import kivy
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout
from kivy.uix.relativelayout import RelativeLayout
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.lang import Builder
from kivy.uix.pagelayout import PageLayout
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
from datetime import datetime
from datetime import timedelta
from kivy.clock import Clock
from kivy_deps import sdl2, glew
global clocktext
class ClockText(Label):
def update(self, *args):
self.text = time.strftime('[b]%H[/b]:%M:%S')
class MyGrid(Widget):
def runDplay(self):
webbrowser.open("https://www.dplay.se/")
def runPlex(self):
os.startfile("C:/Program Files/Plex/Plex Media Player/PlexMediaPlayer.exe")
def runNetflix(self):
os.startfile("C:/Users/Olofs/Desktop/Netflix")
def runSpotify(self):
os.startfile("C:/Users/Olofs/Desktop/Spotify")
def runCNN(self):
os.startfile("C:/Users/Olofs/Desktop/CNN")
def runBBC(self):
os.startfile("C:/Users/Olofs/Desktop/BBC")
def runGnews(self):
os.startfile("C:/Users/Olofs/Desktop/Gnews")
class MyApp(App):
def build(self):
grid = MyGrid()
clocktext =grid.ids.clocktext
Clock.schedule_interval(clocktext.update, 1)
return grid
if __name__ == "__main__":
MyApp().run()