Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2026-01-12 - Missing Xinerama Dependency
**Learning:** The environment lacks `Xinerama` headers, preventing the default build configuration from compiling. This is common in minimal environments.
**Action:** When working with X11 window managers, always check for Xinerama support or flags in `config.mk` and be prepared to disable it if headers are missing, or better, ensure dependencies are installed if possible. In this restricted environment, I might need to disable Xinerama in `config.mk` to proceed with verification.
18 changes: 7 additions & 11 deletions bar.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,14 @@ int drawstatusbar(Monitor *m, int bh, char *stext) {
int i;
int w;
int x;
int len;
int cmdcounter;
short isCode = 0;
char *text;
char *p;
char text_buf[1024];
char *text = text_buf;

len = strlen(stext) + 1;
if (!(text = (char *)malloc(sizeof(char) * len))) {
die("malloc");
}
p = text;
memcpy(text, stext, len);
/* Ensure stext fits in buffer, though stext is already 1024 bytes */
strncpy(text, stext, sizeof(text_buf));
text_buf[sizeof(text_buf) - 1] = '\0';

/* compute width of the status text */
w = 0;
Expand All @@ -88,7 +84,8 @@ int drawstatusbar(Monitor *m, int bh, char *stext) {
} else {
isCode = 0;
}
text = p;
/* Reset text pointer to start of buffer */
text = text_buf;
statuswidth = w;
w += 2; /* 1px padding on both sides */
ret = x = m->ww - w - getsystraywidth();
Expand Down Expand Up @@ -194,7 +191,6 @@ int drawstatusbar(Monitor *m, int bh, char *stext) {
}

drw_setscheme(drw, statusscheme);
free(p);

return ret;
}
Expand Down