diff options
author | Marvin Borner | 2019-06-13 13:47:08 +0200 |
---|---|---|
committer | Marvin Borner | 2019-06-13 13:47:08 +0200 |
commit | 664d4440b6a472231d0c41ade749b4b45db1a6fd (patch) | |
tree | dce04f975dc5f469f456c82427462d7ada359c3d /freedowm.py | |
parent | ea98f335c8ea82a5bc617a6c250117b93d1aa490 (diff) |
Tried adding text to statusbar
Diffstat (limited to 'freedowm.py')
-rw-r--r-- | freedowm.py | 13 |
1 files changed, 12 insertions, 1 deletions
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: |