Example #1
0
def runLauncher(mytools):
    root = MainWindow('PyGadgets PP4E')
    for (name, commandLine) in mytools:
        b = Button(root,
                   text=name,
                   fg='black',
                   bg='beige',
                   border=2,
                   command=PortableLauncher(name, commandLine))
        b.pack(side=LEFT, expand=YES, fill=BOTH)

    root.mainloop()
Example #2
0
    config = Config.getInstance()
    #print(config)
    locale.setlocale(locale.LC_ALL, config['locale'])

    # Saving the curren PID
    file = open(pid_file, 'w')
    file.write("{}".format(os.getpid()))
    file.close()

    # Prepare for good closing
    signal.signal(signal.SIGTERM, receive_signal)

    #Fontawesome
    pyglet.font.add_file(
        os.path.join(os.path.dirname(__file__),
                     'otfs/Font Awesome 5 Free-Solid-900.otf'))
    #OWF
    pyglet.font.add_file(
        os.path.join(os.path.dirname(__file__), 'otfs/owfont-regular.otf'))

    w = MainWindow()
    w.title("RPI Display")
    w.configure(background='black')

    gl = ClockLayout(w)
    gl.place(relx=0.5, rely=0.5, anchor=CENTER)

    # GUI Main window
    w.mainloop()
Example #3
0
 def run(self):
     main_window = MainWindow()
     self.logger.debug("App started")
     main_window.mainloop()