aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCalvin Morrison <calvin@fastmailteam.com>2022-07-27 21:06:53 -0400
committerCalvin Morrison <calvin@fastmailteam.com>2022-07-27 21:06:53 -0400
commit375b78143e9db6958c566853887ae488a1136848 (patch)
treec90e94cbe634ebc5d70d261bcdebb1347f055245
parent1d74edfd2df37cf7bd71ce7c6e74fe3fedc0a555 (diff)
show status
-rw-r--r--moc_x11.c5
1 files 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);
}