Configuration file for DWM on MacBook Air
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
591 B

  1. /*
  2. * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
  3. * See LICENSE file for license details.
  4. */
  5. #include "wm.h"
  6. static const char *status[] = {
  7. "sh", "-c", "echo -n `date` `uptime | sed 's/.*://; s/,//g'`"
  8. " `acpi | awk '{print $4}' | sed 's/,//'`", 0 \
  9. };
  10. void
  11. draw_bar()
  12. {
  13. static char buf[1024];
  14. buf[0] = 0;
  15. pipe_spawn(buf, sizeof(buf), dpy, (char **)status);
  16. brush.rect = barrect;
  17. brush.rect.x = brush.rect.y = 0;
  18. draw(dpy, &brush, False, buf);
  19. XCopyArea(dpy, brush.drawable, barwin, brush.gc, 0, 0, barrect.width,
  20. barrect.height, 0, 0);
  21. XFlush(dpy);
  22. }