diff options
Diffstat (limited to 'include/sway/config.h')
-rw-r--r-- | include/sway/config.h | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index 68c06846..5ccc3e77 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include "../include/config.h" | 12 | #include "../include/config.h" |
13 | #include "gesture.h" | 13 | #include "gesture.h" |
14 | #include "list.h" | 14 | #include "list.h" |
15 | #include "stringop.h" | ||
15 | #include "swaynag.h" | 16 | #include "swaynag.h" |
16 | #include "tree/container.h" | 17 | #include "tree/container.h" |
17 | #include "sway/input/tablet.h" | 18 | #include "sway/input/tablet.h" |
@@ -150,14 +151,17 @@ struct input_config { | |||
150 | int drag; | 151 | int drag; |
151 | int drag_lock; | 152 | int drag_lock; |
152 | int dwt; | 153 | int dwt; |
154 | int dwtp; | ||
153 | int left_handed; | 155 | int left_handed; |
154 | int middle_emulation; | 156 | int middle_emulation; |
155 | int natural_scroll; | 157 | int natural_scroll; |
156 | float pointer_accel; | 158 | float pointer_accel; |
159 | float rotation_angle; | ||
157 | float scroll_factor; | 160 | float scroll_factor; |
158 | int repeat_delay; | 161 | int repeat_delay; |
159 | int repeat_rate; | 162 | int repeat_rate; |
160 | int scroll_button; | 163 | int scroll_button; |
164 | int scroll_button_lock; | ||
161 | int scroll_method; | 165 | int scroll_method; |
162 | int send_events; | 166 | int send_events; |
163 | int tap; | 167 | int tap; |
@@ -288,6 +292,14 @@ struct output_config { | |||
288 | }; | 292 | }; |
289 | 293 | ||
290 | /** | 294 | /** |
295 | * An output config pre-matched to an output | ||
296 | */ | ||
297 | struct matched_output_config { | ||
298 | struct sway_output *output; | ||
299 | struct output_config *config; | ||
300 | }; | ||
301 | |||
302 | /** | ||
291 | * Stores size of gaps for each side | 303 | * Stores size of gaps for each side |
292 | */ | 304 | */ |
293 | struct side_gaps { | 305 | struct side_gaps { |
@@ -529,6 +541,7 @@ struct sway_config { | |||
529 | bool auto_back_and_forth; | 541 | bool auto_back_and_forth; |
530 | bool show_marks; | 542 | bool show_marks; |
531 | enum alignment title_align; | 543 | enum alignment title_align; |
544 | bool primary_selection; | ||
532 | 545 | ||
533 | bool tiling_drag; | 546 | bool tiling_drag; |
534 | int tiling_drag_threshold; | 547 | int tiling_drag_threshold; |
@@ -622,7 +635,7 @@ void run_deferred_bindings(void); | |||
622 | /** | 635 | /** |
623 | * Adds a warning entry to the swaynag instance used for errors. | 636 | * Adds a warning entry to the swaynag instance used for errors. |
624 | */ | 637 | */ |
625 | void config_add_swaynag_warning(char *fmt, ...); | 638 | void config_add_swaynag_warning(char *fmt, ...) _SWAY_ATTRIB_PRINTF(1, 2); |
626 | 639 | ||
627 | /** | 640 | /** |
628 | * Free config struct | 641 | * Free config struct |
@@ -675,20 +688,25 @@ const char *sway_output_scale_filter_to_string(enum scale_filter_mode scale_filt | |||
675 | 688 | ||
676 | struct output_config *new_output_config(const char *name); | 689 | struct output_config *new_output_config(const char *name); |
677 | 690 | ||
678 | void merge_output_config(struct output_config *dst, struct output_config *src); | 691 | bool apply_output_configs(struct matched_output_config *configs, |
692 | size_t configs_len, bool test_only, bool degrade_to_off); | ||
679 | 693 | ||
680 | bool apply_output_config(struct output_config *oc, struct sway_output *output); | 694 | void apply_all_output_configs(void); |
681 | 695 | ||
682 | bool test_output_config(struct output_config *oc, struct sway_output *output); | 696 | void sort_output_configs_by_priority(struct matched_output_config *configs, |
697 | size_t configs_len); | ||
683 | 698 | ||
684 | struct output_config *store_output_config(struct output_config *oc); | 699 | /** |
700 | * store_output_config stores a new output config. An output may be matched by | ||
701 | * three different config types, in order of precedence: Identifier, name and | ||
702 | * wildcard. When storing a config type of lower precedence, assume that the | ||
703 | * user wants the config to take immediate effect by superseding (clearing) the | ||
704 | * same values from higher presedence configuration. | ||
705 | */ | ||
706 | void store_output_config(struct output_config *oc); | ||
685 | 707 | ||
686 | struct output_config *find_output_config(struct sway_output *output); | 708 | struct output_config *find_output_config(struct sway_output *output); |
687 | 709 | ||
688 | void apply_output_config_to_outputs(struct output_config *oc); | ||
689 | |||
690 | void reset_outputs(void); | ||
691 | |||
692 | void free_output_config(struct output_config *oc); | 710 | void free_output_config(struct output_config *oc); |
693 | 711 | ||
694 | bool spawn_swaybg(void); | 712 | bool spawn_swaybg(void); |
@@ -718,7 +736,7 @@ void free_workspace_config(struct workspace_config *wsc); | |||
718 | /** | 736 | /** |
719 | * Updates the value of config->font_height based on the metrics for title's | 737 | * Updates the value of config->font_height based on the metrics for title's |
720 | * font as reported by pango. | 738 | * font as reported by pango. |
721 | * | 739 | * |
722 | * If the height has changed, all containers will be rearranged to take on the | 740 | * If the height has changed, all containers will be rearranged to take on the |
723 | * new size. | 741 | * new size. |
724 | */ | 742 | */ |