diff --git a/README.md b/README.md index a506a7f..123a205 100644 --- a/README.md +++ b/README.md @@ -111,11 +111,11 @@ There are a couple types used that are specific to f00bar. | border | dict | no | Configures a border around the status bar | border.width | int | no | Width, in pixels, of the border | border.color | color | no | The color of the border -| border.margin | int | no | left/rigth/top/bottom margins, from screen edge to bar -| border.left-margin | int | no | left margin from screen edge to bar. Overrides `border.margin` -| border.right-margin | int | no | right margin from screen edge to bar. Overrides `border.margin` -| border.top-margin | int | no | top margin from screen edge to bar. Overrides `border.margin` -| border.bottom-margin | int | no | bottom margin from screen edge to bar. Overrides `border.margin` +| border.margin | int | no | left/rigth/top/bottom margins, from screen edge to bar. _Wayland only_ +| border.left-margin | int | no | left margin from screen edge to bar. Overrides `border.margin`. _Wayland only_ +| border.right-margin | int | no | right margin from screen edge to bar. Overrides `border.margin`. _Wayland only_ +| border.top-margin | int | no | top margin from screen edge to bar. Overrides `border.margin`. _Wayland only_ +| border.bottom-margin | int | no | bottom margin from screen edge to bar. Overrides `border.margin`. _Wayland only_ | font | font | no | Default font to use in modules and particles | foreground | color | no | Default foreground (text) color to use | left | list | no | Left-aligned modules diff --git a/bar/wayland.c b/bar/wayland.c index b7cda6c..0d06f4a 100644 --- a/bar/wayland.c +++ b/bar/wayland.c @@ -656,6 +656,7 @@ setup(struct bar *_bar) return false; } + assert(backend->width <= backend->monitor->width_px); bar->width = backend->width; if (pipe(backend->pipe_fds) == -1) { diff --git a/bar/xcb.c b/bar/xcb.c index 2a15965..30fdba0 100644 --- a/bar/xcb.c +++ b/bar/xcb.c @@ -46,6 +46,14 @@ setup(struct bar *_bar) struct private *bar = _bar->private; struct xcb_backend *backend = bar->backend.data; + if (bar->border.left_margin != 0 || + bar->border.right_margin != 0 || + bar->border.top_margin != 0 || + bar->border.bottom_margin) + { + LOG_WARN("non-zero border margins ignored in X11 backend"); + } + /* TODO: a lot of this (up to mapping the window) could be done in bar_new() */ xcb_generic_error_t *e;