Added plaintext markup configuration

This commit is contained in:
Mykyta Holubakha 2016-04-24 19:57:35 +03:00
parent a796ce4f66
commit 53b53dd8c2
7 changed files with 33 additions and 1 deletions

View file

@ -46,6 +46,7 @@ char *parse_font(const char *font) {
struct config *init_config() {
struct config *config = calloc(1, sizeof(struct config));
config->status_command = NULL;
config->plaintext_markup = true;
config->position = DESKTOP_SHELL_PANEL_POSITION_BOTTOM;
config->font = strdup("monospace 10");
config->mode = NULL;

View file

@ -280,7 +280,7 @@ void render(struct output *output, struct config *config, struct status_line *li
if (line->protocol == TEXT) {
get_text_size(window->cairo, window->font, &width, &height, true, "%s", line->text_line);
cairo_move_to(cairo, window->width - margin - width, margin);
pango_printf(window->cairo, window->font, true, "%s", line->text_line);
pango_printf(window->cairo, window->font, config->plaintext_markup, "%s", line->text_line);
} else if (line->protocol == I3BAR && line->block_line) {
double pos = window->width - 0.5;
bool edge = true;