i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit 245c6706c633ff44694f7bcc256aefe9b2d596fa
parent 3637d7ba28bf9f037f4fbfe609d1faeb2c80e521
Author: Chris Guillott <chris@techfo.xyz>
Date:   Mon, 29 May 2017 13:30:07 -0500

tweak defaults

Diffstat:
Mi3lock.c | 4++--
Munlock_indicator.c | 16++++++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/i3lock.c b/i3lock.c
@@ -88,8 +88,8 @@ char time_format[32] = "%H:%M:%S\0";
 char date_format[32] = "%A, %m %Y\0";
 char time_font[32] = "sans-serif\0";
 char date_font[32] = "sans-serif\0";
-char time_x_expr[32] = "ix\0";
-char time_y_expr[32] = "iy\0";
+char time_x_expr[32] = "ix - (cw / 2)\0";
+char time_y_expr[32] = "iy - (ch / 2)\0";
 char date_x_expr[32] = "tx\0";
 char date_y_expr[32] = "ty+30\0";
 
diff --git a/unlock_indicator.c b/unlock_indicator.c
@@ -580,10 +580,10 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
                 ty = 0;
                 tx = te_eval(te_time_x_expr);
                 ty = te_eval(te_time_y_expr);
-                double time_x = tx - CLOCK_WIDTH / 2;
-                double time_y = ty - CLOCK_HEIGHT / 2;
-                double date_x = te_eval(te_date_x_expr) - CLOCK_WIDTH / 2;
-                double date_y = te_eval(te_date_y_expr) - CLOCK_HEIGHT / 2;
+                double time_x = tx;
+                double time_y = ty;
+                double date_x = te_eval(te_date_x_expr);
+                double date_y = te_eval(te_date_y_expr);
                 DEBUG("tx: %f ty: %f ix: %f, iy: %f\n", tx, ty, ix, iy);
                 DEBUG("\ttime_x: %f time_y: %f date_x: %f date_y: %f screen_number: %d\n", time_x, time_y, date_x, date_y, screen_number);
                 DEBUG("\tscreen x: %d screen y: %d screen w: %f screen h: %f\n", xr_resolutions[screen_number].x, xr_resolutions[screen_number].y, w, h);
@@ -612,10 +612,10 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
                     ty = 0;
                     tx = te_eval(te_time_x_expr);
                     ty = te_eval(te_time_y_expr);
-                    double time_x = tx - CLOCK_WIDTH / 2;
-                    double time_y = ty - CLOCK_HEIGHT / 2;
-                    double date_x = te_eval(te_date_x_expr) - CLOCK_WIDTH / 2;
-                    double date_y = te_eval(te_date_y_expr) - CLOCK_HEIGHT / 2;
+                    double time_x = tx;
+                    double time_y = ty;
+                    double date_x = te_eval(te_date_x_expr);
+                    double date_y = te_eval(te_date_y_expr);
                     DEBUG("tx: %f ty: %f f ix: %f iy: %f\n", tx, ty, ix, iy);
                     DEBUG("\ttime_x: %f time_y: %f date_x: %f date_y: %f screen_number: %d\n", time_x, time_y, date_x, date_y, screen);
                     DEBUG("\tscreen x: %d screen y: %d screen w: %f screen h: %f\n", xr_resolutions[screen].x, xr_resolutions[screen].y, w, h);