aboutsummaryrefslogtreecommitdiffstats
path: root/src/__main__.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-26 10:11:14 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-26 10:11:14 +0100
commit4567e5adc5fc7a3b496e39b4b9ddb61f7fa1aca8 (patch)
treeec1cd1f3114748674bb354556adc37d742d73595 /src/__main__.py
parentflexibility (diff)
downloadxpybar-4567e5adc5fc7a3b496e39b4b9ddb61f7fa1aca8.tar.gz
xpybar-4567e5adc5fc7a3b496e39b4b9ddb61f7fa1aca8.tar.bz2
xpybar-4567e5adc5fc7a3b496e39b4b9ddb61f7fa1aca8.tar.xz
using colours
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/__main__.py')
-rwxr-xr-xsrc/__main__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/__main__.py b/src/__main__.py
index 72575cf..e04c044 100755
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -25,7 +25,6 @@ from x import *
open_x()
width, height, left, top, panel_height, at_top = get_monitors()[0][:3] + [24, 1 * 12, True]
-print(width, height, left, top)
display = get_display()
window = create_panel(width, height, left, top, panel_height, at_top)
@@ -41,7 +40,9 @@ while True:
break
except KeyboardInterrupt:
break
- gc.change(foreground = get_screen().black_pixel)
+ cmap = window.get_attributes().colormap
+ print(cmap)
+ gc.change(foreground = cmap.alloc_color(0xFFFF, 0x0000, 0x4000).pixel)
window.fill_rectangle(gc, 0, 0, width, panel_height)
display.flush()