not smart enough to do this with a XSendEvent
#include <locale.h>
#include <unistd.h>
#include <time.h>
#include <locale.h>
#include <unistd.h>
#include <time.h>
#include <string.h>
#include <sys/types.h>
#include <string.h>
#include <sys/types.h>
XDrawString(display, bar_window, bar_gc, 4, bar_fs->ascent, bar_text,
strlen(bar_text));
XSync(display, False);
XDrawString(display, bar_window, bar_gc, 4, bar_fs->ascent, bar_text,
strlen(bar_text));
XSync(display, False);
+
+ alarm(60);
+}
+
+void
+bar_signal(int sig)
+{
+ /* XXX yeah yeah byte me */
+ bar_print();
void
quit(union arg *args)
{
void
quit(union arg *args)
{
int wsid = args->id;
struct ws_win *win = ws[current_ws].focus;
int wsid = args->id;
struct ws_win *win = ws[current_ws].focus;
- DNPRINTF(SWM_D_MISC, "send_to_ws: win: %lu\n", win->id);
+ DNPRINTF(SWM_D_WS, "send_to_ws: win: %lu\n", win->id);
XUnmapWindow(display, win->id);
XUnmapWindow(display, win->id);
height -= bar_height; /* correct screen height */
XMapWindow(display, bar_window);
}
height -= bar_height; /* correct screen height */
XMapWindow(display, bar_window);
}
+
+ if (signal(SIGALRM, bar_signal) == SIG_ERR)
+ err(1, "could not install bar_signal");
bar_print();
while (running) {
bar_print();
while (running) {