mirror of
https://github.com/gryf/wmdocklib.git
synced 2025-12-19 04:20:17 +01:00
Added basic run for base application.
This commit is contained in:
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user