bar: make location configurable (top or bottom)

This commit is contained in:
Daniel Eklöf 2018-11-17 11:54:14 +01:00
parent 7c468c20c0
commit 921cda0a81
3 changed files with 22 additions and 4 deletions

4
bar.h
View file

@ -8,6 +8,7 @@ struct bar_run_context {
struct bar *bar;
int abort_fd;
};
struct bar {
void *private;
int (*run)(struct bar_run_context *ctx);
@ -15,7 +16,10 @@ struct bar {
void (*refresh)(const struct bar *bar);
};
enum bar_location { BAR_TOP, BAR_BOTTOM };
struct bar_config {
enum bar_location location;
int height;
int left_spacing, right_spacing;
int left_margin, right_margin;