1
0
mirror of https://github.com/gryf/wmdocklib.git synced 2025-12-18 20:10:23 +01:00

Added basic run for base application.

This commit is contained in:
2022-04-18 19:10:29 +02:00
parent c6a0aa7558
commit 671c1b9361

View File

@@ -1,16 +1,22 @@
import time
import sys
from wmdocklib import helpers
from wmdocklib import pywmgeneral
class DockApp:
width = 64
height = 64
x_offset = 4
margin = 3
x_offset = 3
y_offset = 3
palette = {"1": "black",
"2": "white"}
background_color = 'black'
style = '3d'
bevel_color = '#bebebe'
font_dimentions = None
def __init__(self, args=None):
self.args = args
@@ -27,6 +33,21 @@ class DockApp:
sys.exit(0)
event = helpers.get_event()
def run(self):
self.prepare_pixmaps()
self.open_xwindow()
try:
self.main_loop()
except KeyboardInterrupt:
pass
def main_loop(self):
while True:
self.check_for_events()
self.redraw()
time.sleep(0.3)
def prepare_pixmaps(self, background=None, patterns=None, style='3d',
margin=3):