Permalink
Browse files

fix placement options and adjustments

  • Loading branch information...
c00kiemon5ter committed Jun 26, 2012
1 parent 8d95fc3 commit 2b780ae4b540a8c8d5e955c2898bb0642a0a9d85
Showing with 3 additions and 2 deletions.
  1. +3 −2 mopag.c
View
@@ -13,7 +13,8 @@
#define HEIGHT 4
#define FATTICK_W 6
-#define PLACEMENT (HEIGHT)
+#define TOP False /* show on top or bottom of the screen */
+#define GAP (0) /* space above when on top. space below when on bottom */
#define BG "#004020"
#define FG "#90f0c0"
#define URFG "#f00000"
@@ -60,7 +61,7 @@ void setup()
XSetWindowAttributes wa = { .background_pixel = bg, .override_redirect = 1, .event_mask = ExposureMask, };
w = XCreateWindow(dis, root, 0,
- (PLACEMENT >= 0) ? PLACEMENT : DisplayHeight(dis, screen) + PLACEMENT,
+ (TOP) ? GAP : DisplayHeight(dis, screen) - HEIGHT - GAP,
scrwidth, HEIGHT, 1, CopyFromParent, InputOutput, CopyFromParent,
CWBackPixel | CWOverrideRedirect | CWEventMask, &wa);
XMapWindow(dis, w);

0 comments on commit 2b780ae

Please sign in to comment.