forked from external/yambar
bar: use log framework
This commit is contained in:
parent
33ffe02244
commit
8ae89820db
1 changed files with 3 additions and 2 deletions
5
bar.c
5
bar.c
|
@ -20,6 +20,8 @@
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
#include <cairo-xcb.h>
|
#include <cairo-xcb.h>
|
||||||
|
|
||||||
|
#define LOG_MODULE "bar"
|
||||||
|
#include "log.h"
|
||||||
#include "xcb.h"
|
#include "xcb.h"
|
||||||
|
|
||||||
struct private {
|
struct private {
|
||||||
|
@ -193,7 +195,6 @@ run(struct bar_run_context *run_ctx)
|
||||||
bar->height_with_border = bar->height + 2 * bar->border.width;
|
bar->height_with_border = bar->height + 2 * bar->border.width;
|
||||||
|
|
||||||
/* Find monitor coordinates and width/height */
|
/* Find monitor coordinates and width/height */
|
||||||
printf("Monitors:\n");
|
|
||||||
for (xcb_randr_monitor_info_iterator_t it =
|
for (xcb_randr_monitor_info_iterator_t it =
|
||||||
xcb_randr_get_monitors_monitors_iterator(monitors);
|
xcb_randr_get_monitors_monitors_iterator(monitors);
|
||||||
it.rem > 0;
|
it.rem > 0;
|
||||||
|
@ -202,7 +203,7 @@ run(struct bar_run_context *run_ctx)
|
||||||
const xcb_randr_monitor_info_t *mon = it.data;
|
const xcb_randr_monitor_info_t *mon = it.data;
|
||||||
char *name = get_atom_name(bar->conn, mon->name);
|
char *name = get_atom_name(bar->conn, mon->name);
|
||||||
|
|
||||||
printf(" %s: %ux%u+%u+%u (%ux%umm)\n", name,
|
LOG_INFO("Monitor: %s: %ux%u+%u+%u (%ux%umm)", name,
|
||||||
mon->width, mon->height, mon->x, mon->y,
|
mon->width, mon->height, mon->x, mon->y,
|
||||||
mon->width_in_millimeters, mon->height_in_millimeters);
|
mon->width_in_millimeters, mon->height_in_millimeters);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue