24 lines
627 B
C
24 lines
627 B
C
#include <time.h>
|
|
#include <stdio.h>
|
|
|
|
void debug_print(char *str)
|
|
{
|
|
time_t t = time(NULL);
|
|
char *t_str = ctime(&t);
|
|
FILE *fp;
|
|
fp = fopen("/home/michael/dwm-debug.txt", "a");
|
|
fprintf(fp, "%s: %s", t_str, str);
|
|
fclose(fp);
|
|
}
|
|
|
|
void resize() {
|
|
char s[2048];
|
|
sprintf(s, "resize client. name: %s, mon: %p, selmon: %p\n\tx: %d, y: %d, w: %d, h: %d\n\tn: %d, flt: %d, arrange: %p\n\tismonocle: %d\n",
|
|
c->name, c->mon, selmon,
|
|
x, y, w, h,
|
|
n, c->isfloating, c->mon->lt[c->mon->sellt]->arrange,
|
|
c->mon->lt[c->mon->sellt]->arrange == monocle
|
|
);
|
|
debug_print(s);
|
|
}
|