From 375b78143e9db6958c566853887ae488a1136848 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Wed, 27 Jul 2022 21:06:53 -0400 Subject: show status --- moc_x11.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/moc_x11.c b/moc_x11.c index efc4ce3..76384aa 100644 --- a/moc_x11.c +++ b/moc_x11.c @@ -120,9 +120,11 @@ int main() { int y_offset = 20; int x = 10; pthread_mutex_lock(&mh->lock); + + XDrawString(dpy, win, DefaultGC(dpy, s), x, y_offset, moc_str_state(mh->state), strlen(moc_str_state(mh->state))); + y_offset += 15; if(mh->state == PLAYING || mh->state == PAUSED) { char *timestr= time_format(mh->time); - XDrawString(dpy, win, DefaultGC(dpy, s), x, y_offset, mh->title, strlen(mh->title)); y_offset += 15; XDrawString(dpy, win, DefaultGC(dpy, s), x, y_offset, mh->artist, strlen(mh->artist)); @@ -132,7 +134,6 @@ int main() { XDrawString(dpy, win, DefaultGC(dpy, s), x, y_offset, timestr, strlen(timestr)); y_offset += 15; - free(timestr); } -- cgit v1.2.1