aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 59f22ae2..52867fa6 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -5,9 +5,10 @@
5#include <string.h> 5#include <string.h>
6#include <time.h> 6#include <time.h>
7#include <wlr/interfaces/wlr_switch.h> 7#include <wlr/interfaces/wlr_switch.h>
8#include <wlr/types/wlr_box.h>
9#include <wlr/types/wlr_tablet_tool.h> 8#include <wlr/types/wlr_tablet_tool.h>
9#include <wlr/util/box.h>
10#include <xkbcommon/xkbcommon.h> 10#include <xkbcommon/xkbcommon.h>
11#include <xf86drmMode.h>
11#include "../include/config.h" 12#include "../include/config.h"
12#include "list.h" 13#include "list.h"
13#include "swaynag.h" 14#include "swaynag.h"
@@ -257,6 +258,7 @@ struct output_config {
257 int width, height; 258 int width, height;
258 float refresh_rate; 259 float refresh_rate;
259 int custom_mode; 260 int custom_mode;
261 drmModeModeInfo drm_mode;
260 int x, y; 262 int x, y;
261 float scale; 263 float scale;
262 enum scale_filter_mode scale_filter; 264 enum scale_filter_mode scale_filter;
@@ -292,6 +294,12 @@ struct workspace_config {
292 struct side_gaps gaps_outer; 294 struct side_gaps gaps_outer;
293}; 295};
294 296
297enum pango_markup_config {
298 PANGO_MARKUP_DISABLED = false,
299 PANGO_MARKUP_ENABLED = true,
300 PANGO_MARKUP_DEFAULT // The default is font dependent ("pango:" prefix)
301};
302
295struct bar_config { 303struct bar_config {
296 char *swaybar_command; 304 char *swaybar_command;
297 struct wl_client *client; 305 struct wl_client *client;
@@ -323,7 +331,7 @@ struct bar_config {
323 char *position; 331 char *position;
324 list_t *bindings; 332 list_t *bindings;
325 char *status_command; 333 char *status_command;
326 bool pango_markup; 334 enum pango_markup_config pango_markup;
327 char *font; 335 char *font;
328 int height; // -1 not defined 336 int height; // -1 not defined
329 bool workspace_buttons; 337 bool workspace_buttons;
@@ -480,8 +488,8 @@ struct sway_config {
480 enum sway_container_layout default_orientation; 488 enum sway_container_layout default_orientation;
481 enum sway_container_layout default_layout; 489 enum sway_container_layout default_layout;
482 char *font; 490 char *font;
483 size_t font_height; 491 int font_height;
484 size_t font_baseline; 492 int font_baseline;
485 bool pango_markup; 493 bool pango_markup;
486 int titlebar_border_thickness; 494 int titlebar_border_thickness;
487 int titlebar_h_padding; 495 int titlebar_h_padding;
@@ -559,7 +567,7 @@ struct sway_config {
559 struct sway_node *node; 567 struct sway_node *node;
560 struct sway_container *container; 568 struct sway_container *container;
561 struct sway_workspace *workspace; 569 struct sway_workspace *workspace;
562 bool using_criteria; 570 bool node_overridden; // True if the node is selected by means other than focus
563 struct { 571 struct {
564 int argc; 572 int argc;
565 char **argv; 573 char **argv;
@@ -690,14 +698,13 @@ void free_bar_binding(struct bar_binding *binding);
690void free_workspace_config(struct workspace_config *wsc); 698void free_workspace_config(struct workspace_config *wsc);
691 699
692/** 700/**
693 * Updates the value of config->font_height based on the max title height 701 * Updates the value of config->font_height based on the metrics for title's
694 * reported by each container. If recalculate is true, the containers will 702 * font as reported by pango.
695 * recalculate their heights before reporting. 703 *
696 *
697 * If the height has changed, all containers will be rearranged to take on the 704 * If the height has changed, all containers will be rearranged to take on the
698 * new size. 705 * new size.
699 */ 706 */
700void config_update_font_height(bool recalculate); 707void config_update_font_height(void);
701 708
702/** 709/**
703 * Convert bindsym into bindcode using the first configured layout. 710 * Convert bindsym into bindcode using the first configured layout.