aboutsummaryrefslogtreecommitdiff
path: root/src/bardata.h
blob: bfab70926a0dcd3a6b7dc1bafc8e1426b64b956a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef BAR_H
#define BAR_H

#include <inttypes.h>

#include <X11/Xft/Xft.h>

#include "pipe.h"

typedef XftColor color_t;

typedef enum {
  SIDE_LEFT,
  SIDE_CENTER,
  SIDE_RIGHT,
} comp_side_t;

typedef struct {
  char name[16];
  char data[64];
  int flags;
  int margin_left;
  int margin_right;
  color_t custom_fg, custom_bg;
  // if there are custom colors, these point to the above fields. Otherwise, it
  // will point to default_fg/bg.
  color_t *fg, *bg;
} comp_t;

extern int fontsize;
extern color_t default_fg, default_bg;
extern int bar_height;
extern comp_t *comps_left[32], *comps_right[32], *comps_center[32];
extern size_t left_size, right_size, center_size;
extern int padding;
extern int comp_gap;

void init_bardata(void);
void new_component(char *name);
void set_component(char argv[MAX_ARGS][MAX_ARG_LEN], int argc);
void set_layout(char argv[MAX_ARGS][MAX_ARG_LEN], int argc);
void set_config(char argv[MAX_ARGS][MAX_ARG_LEN], int argc);

#endif