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.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 59f22ae2..46dd4ffe 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;
@@ -410,14 +418,6 @@ enum sway_popup_during_fullscreen {
410 POPUP_LEAVE, 418 POPUP_LEAVE,
411}; 419};
412 420
413enum command_context {
414 CONTEXT_CONFIG = 1 << 0,
415 CONTEXT_BINDING = 1 << 1,
416 CONTEXT_IPC = 1 << 2,
417 CONTEXT_CRITERIA = 1 << 3,
418 CONTEXT_ALL = 0xFFFFFFFF,
419};
420
421enum focus_follows_mouse_mode { 421enum focus_follows_mouse_mode {
422 FOLLOWS_NO, 422 FOLLOWS_NO,
423 FOLLOWS_YES, 423 FOLLOWS_YES,
@@ -480,8 +480,8 @@ struct sway_config {
480 enum sway_container_layout default_orientation; 480 enum sway_container_layout default_orientation;
481 enum sway_container_layout default_layout; 481 enum sway_container_layout default_layout;
482 char *font; 482 char *font;
483 size_t font_height; 483 int font_height;
484 size_t font_baseline; 484 int font_baseline;
485 bool pango_markup; 485 bool pango_markup;
486 int titlebar_border_thickness; 486 int titlebar_border_thickness;
487 int titlebar_h_padding; 487 int titlebar_h_padding;
@@ -559,7 +559,7 @@ struct sway_config {
559 struct sway_node *node; 559 struct sway_node *node;
560 struct sway_container *container; 560 struct sway_container *container;
561 struct sway_workspace *workspace; 561 struct sway_workspace *workspace;
562 bool using_criteria; 562 bool node_overridden; // True if the node is selected by means other than focus
563 struct { 563 struct {
564 int argc; 564 int argc;
565 char **argv; 565 char **argv;
@@ -690,14 +690,13 @@ void free_bar_binding(struct bar_binding *binding);
690void free_workspace_config(struct workspace_config *wsc); 690void free_workspace_config(struct workspace_config *wsc);
691 691
692/** 692/**
693 * Updates the value of config->font_height based on the max title height 693 * 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 694 * font as reported by pango.
695 * recalculate their heights before reporting. 695 *
696 *
697 * If the height has changed, all containers will be rearranged to take on the 696 * If the height has changed, all containers will be rearranged to take on the
698 * new size. 697 * new size.
699 */ 698 */
700void config_update_font_height(bool recalculate); 699void config_update_font_height(void);
701 700
702/** 701/**
703 * Convert bindsym into bindcode using the first configured layout. 702 * Convert bindsym into bindcode using the first configured layout.