diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-03-08 15:21:28 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-03-08 15:21:28 +0900 |
| commit | 4437d5b3c3eea76f6e2b0fd4a2ba21c02a098aeb (patch) | |
| tree | e8dcb20bf144aacf88f93b012dccacdeb08015cd /slock | |
| parent | c2b06f0d5795a789f4ddab459179ff89aedfee98 (diff) | |
updates
Diffstat (limited to 'slock')
| -rw-r--r-- | slock/slock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/slock/slock.c b/slock/slock.c index 9af2dfe..45dbf6a 100644 --- a/slock/slock.c +++ b/slock/slock.c @@ -330,6 +330,7 @@ drawlogo(Display *dpy, struct lock *lock, int color) XCopyArea(dpy, lock->drawable, lock->win, lock->gc, 0, 0, lock->x, lock->y, 0, 0); XSync(dpy, False); } + static void refresh(Display *dpy, Window win , int screen, struct tm time, cairo_t* cr, cairo_surface_t* sfc) {/*Function that displays given time on the given screen*/ @@ -348,7 +349,7 @@ refresh(Display *dpy, Window win , int screen, struct tm time, cairo_t* cr, cair text_width = extents.width; text_height = extents.height; - xpos = (DisplayWidth(dpy, screen) - text_width) / 2; + xpos = DisplayWidth(dpy, screen) / 4 - text_width / 2; ypos = (DisplayHeight(dpy, screen) + 12 * text_height) / 2; cairo_move_to(cr, xpos, ypos); cairo_show_text(cr, tm); @@ -356,6 +357,7 @@ refresh(Display *dpy, Window win , int screen, struct tm time, cairo_t* cr, cair writemessage(dpy, win, screen); XFlush(dpy); } + static void* displayTime(void* input) { /*Thread that keeps track of time and refreshes it every 5 seconds */ @@ -374,8 +376,6 @@ displayTime(void* input) return NULL; } - - static void readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, const char *hash,cairo_t **crs,cairo_surface_t **surfaces) |
