diff options
author | Mykyta Holubakha <hilobakho@gmail.com> | 2016-04-24 20:35:21 +0300 |
---|---|---|
committer | Mykyta Holubakha <hilobakho@gmail.com> | 2016-04-24 20:35:21 +0300 |
commit | 0f1cfdec617d122afbc87eb6466d5d2e5c348259 (patch) | |
tree | 929117e8a3276b240b59262e0809eb51c949eb42 /swaybar | |
parent | Fix line length calculation (diff) | |
download | sway-0f1cfdec617d122afbc87eb6466d5d2e5c348259.tar.gz sway-0f1cfdec617d122afbc87eb6466d5d2e5c348259.tar.zst sway-0f1cfdec617d122afbc87eb6466d5d2e5c348259.zip |
Renamed to pango_markup
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/config.c | 2 | ||||
-rw-r--r-- | swaybar/ipc.c | 4 | ||||
-rw-r--r-- | swaybar/render.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/swaybar/config.c b/swaybar/config.c index 7ef9a07e..7bd22c91 100644 --- a/swaybar/config.c +++ b/swaybar/config.c | |||
@@ -46,7 +46,7 @@ char *parse_font(const char *font) { | |||
46 | struct config *init_config() { | 46 | struct config *init_config() { |
47 | struct config *config = calloc(1, sizeof(struct config)); | 47 | struct config *config = calloc(1, sizeof(struct config)); |
48 | config->status_command = NULL; | 48 | config->status_command = NULL; |
49 | config->plaintext_markup = true; | 49 | config->pango_markup = true; |
50 | config->position = DESKTOP_SHELL_PANEL_POSITION_BOTTOM; | 50 | config->position = DESKTOP_SHELL_PANEL_POSITION_BOTTOM; |
51 | config->font = strdup("monospace 10"); | 51 | config->font = strdup("monospace 10"); |
52 | config->mode = NULL; | 52 | config->mode = NULL; |
diff --git a/swaybar/ipc.c b/swaybar/ipc.c index 0446f38a..dacee4c2 100644 --- a/swaybar/ipc.c +++ b/swaybar/ipc.c | |||
@@ -27,7 +27,7 @@ static void ipc_parse_config(struct config *config, const char *payload) { | |||
27 | json_object_object_get_ex(bar_config, "separator_symbol", &sep_symbol); | 27 | json_object_object_get_ex(bar_config, "separator_symbol", &sep_symbol); |
28 | json_object_object_get_ex(bar_config, "colors", &colors); | 28 | json_object_object_get_ex(bar_config, "colors", &colors); |
29 | json_object_object_get_ex(bar_config, "outputs", &outputs); | 29 | json_object_object_get_ex(bar_config, "outputs", &outputs); |
30 | json_object_object_get_ex(bar_config, "plaintext_markup", &markup); | 30 | json_object_object_get_ex(bar_config, "pango_markup", &markup); |
31 | 31 | ||
32 | if (status_command) { | 32 | if (status_command) { |
33 | free(config->status_command); | 33 | free(config->status_command); |
@@ -65,7 +65,7 @@ static void ipc_parse_config(struct config *config, const char *payload) { | |||
65 | } | 65 | } |
66 | 66 | ||
67 | if (markup) { | 67 | if (markup) { |
68 | config->plaintext_markup = json_object_get_boolean(markup); | 68 | config->pango_markup = json_object_get_boolean(markup); |
69 | } | 69 | } |
70 | 70 | ||
71 | // free previous outputs list | 71 | // free previous outputs list |
diff --git a/swaybar/render.c b/swaybar/render.c index b9ef2242..273bd4f0 100644 --- a/swaybar/render.c +++ b/swaybar/render.c | |||
@@ -278,9 +278,9 @@ void render(struct output *output, struct config *config, struct status_line *li | |||
278 | int width, height; | 278 | int width, height; |
279 | 279 | ||
280 | if (line->protocol == TEXT) { | 280 | if (line->protocol == TEXT) { |
281 | get_text_size(window->cairo, window->font, &width, &height, config->plaintext_markup, "%s", line->text_line); | 281 | get_text_size(window->cairo, window->font, &width, &height, config->pango_markup, "%s", line->text_line); |
282 | cairo_move_to(cairo, window->width - margin - width, margin); | 282 | cairo_move_to(cairo, window->width - margin - width, margin); |
283 | pango_printf(window->cairo, window->font, config->plaintext_markup, "%s", line->text_line); | 283 | pango_printf(window->cairo, window->font, config->pango_markup, "%s", line->text_line); |
284 | } else if (line->protocol == I3BAR && line->block_line) { | 284 | } else if (line->protocol == I3BAR && line->block_line) { |
285 | double pos = window->width - 0.5; | 285 | double pos = window->width - 0.5; |
286 | bool edge = true; | 286 | bool edge = true; |