From 664d4440b6a472231d0c41ade749b4b45db1a6fd Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 13 Jun 2019 13:47:08 +0200 Subject: Tried adding text to statusbar --- freedowm.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'freedowm.py') diff --git a/freedowm.py b/freedowm.py index 2f934ff..3fb6e62 100644 --- a/freedowm.py +++ b/freedowm.py @@ -151,8 +151,14 @@ class FreedoWM(object): 15, # height 0, # border X.CopyFromParent, X.RetainPermanent, X.CopyFromParent, - background_pixel=self.screen.black_pixel + background_pixel=self.screen.black_pixel, + event_mask=X.ExposureMask ) + self.gc = self.bar.create_gc( + foreground=self.screen.white_pixel, + background=self.screen.black_pixel + ) + #self.bar.fill_rectangle(gc, 0, 0, 10, 10) self.bar.change_attributes(override_redirect=True) self.bar.map() else: @@ -214,6 +220,11 @@ class FreedoWM(object): :return: """ + # Expose status bar text + if self.event.type == X.Expose: + self.bar.draw_text(self.gc, 10, 10, "Hello, world!") + + # Configure new window if self.event.type == X.CreateNotify: try: -- cgit v1.2.3