summaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h39
1 files changed, 35 insertions, 4 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index c44533ee..96fe899b 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -6,6 +6,7 @@
6#include <time.h> 6#include <time.h>
7#include <wlr/types/wlr_box.h> 7#include <wlr/types/wlr_box.h>
8#include <xkbcommon/xkbcommon.h> 8#include <xkbcommon/xkbcommon.h>
9#include "../include/config.h"
9#include "list.h" 10#include "list.h"
10#include "swaynag.h" 11#include "swaynag.h"
11#include "tree/container.h" 12#include "tree/container.h"
@@ -26,7 +27,8 @@ struct sway_variable {
26enum binding_input_type { 27enum binding_input_type {
27 BINDING_KEYCODE, 28 BINDING_KEYCODE,
28 BINDING_KEYSYM, 29 BINDING_KEYSYM,
29 BINDING_MOUSE, 30 BINDING_MOUSECODE,
31 BINDING_MOUSESYM,
30}; 32};
31 33
32enum binding_flags { 34enum binding_flags {
@@ -140,6 +142,7 @@ struct seat_config {
140 char *name; 142 char *name;
141 int fallback; // -1 means not set 143 int fallback; // -1 means not set
142 list_t *attachments; // list of seat_attachment configs 144 list_t *attachments; // list of seat_attachment configs
145 int hide_cursor_timeout;
143}; 146};
144 147
145enum config_dpms { 148enum config_dpms {
@@ -224,9 +227,13 @@ struct bar_config {
224 bool wrap_scroll; 227 bool wrap_scroll;
225 char *separator_symbol; 228 char *separator_symbol;
226 bool strip_workspace_numbers; 229 bool strip_workspace_numbers;
230 bool strip_workspace_name;
227 bool binding_mode_indicator; 231 bool binding_mode_indicator;
228 bool verbose; 232 bool verbose;
233 struct side_gaps gaps;
229 pid_t pid; 234 pid_t pid;
235 int status_padding;
236 int status_edge_padding;
230 struct { 237 struct {
231 char *background; 238 char *background;
232 char *statusline; 239 char *statusline;
@@ -250,6 +257,13 @@ struct bar_config {
250 char *binding_mode_bg; 257 char *binding_mode_bg;
251 char *binding_mode_text; 258 char *binding_mode_text;
252 } colors; 259 } colors;
260
261#if HAVE_TRAY
262 char *icon_theme;
263 const char *tray_bindings[10]; // mouse buttons 0-9
264 list_t *tray_outputs; // char *
265 int tray_padding;
266#endif
253}; 267};
254 268
255struct bar_binding { 269struct bar_binding {
@@ -356,6 +370,12 @@ enum mouse_warping_mode {
356 WARP_CONTAINER 370 WARP_CONTAINER
357}; 371};
358 372
373enum alignment {
374 ALIGN_LEFT,
375 ALIGN_CENTER,
376 ALIGN_RIGHT
377};
378
359/** 379/**
360 * The configuration struct. The result of loading a config file. 380 * The configuration struct. The result of loading a config file.
361 */ 381 */
@@ -390,6 +410,9 @@ struct sway_config {
390 size_t font_height; 410 size_t font_height;
391 size_t font_baseline; 411 size_t font_baseline;
392 bool pango_markup; 412 bool pango_markup;
413 int titlebar_border_thickness;
414 int titlebar_h_padding;
415 int titlebar_v_padding;
393 size_t urgent_timeout; 416 size_t urgent_timeout;
394 enum sway_fowa focus_on_window_activation; 417 enum sway_fowa focus_on_window_activation;
395 enum sway_popup_during_fullscreen popup_during_fullscreen; 418 enum sway_popup_during_fullscreen popup_during_fullscreen;
@@ -406,7 +429,10 @@ struct sway_config {
406 bool validating; 429 bool validating;
407 bool auto_back_and_forth; 430 bool auto_back_and_forth;
408 bool show_marks; 431 bool show_marks;
432 enum alignment title_align;
433
409 bool tiling_drag; 434 bool tiling_drag;
435 int tiling_drag_threshold;
410 436
411 bool smart_gaps; 437 bool smart_gaps;
412 int gaps_inner; 438 int gaps_inner;
@@ -415,6 +441,8 @@ struct sway_config {
415 list_t *config_chain; 441 list_t *config_chain;
416 const char *current_config_path; 442 const char *current_config_path;
417 const char *current_config; 443 const char *current_config;
444 int current_config_line_number;
445 char *current_config_line;
418 446
419 enum sway_container_border border; 447 enum sway_container_border border;
420 enum sway_container_border floating_border; 448 enum sway_container_border floating_border;
@@ -480,6 +508,11 @@ bool read_config(FILE *file, struct sway_config *config,
480 struct swaynag_instance *swaynag); 508 struct swaynag_instance *swaynag);
481 509
482/** 510/**
511 * Adds a warning entry to the swaynag instance used for errors.
512 */
513void config_add_swaynag_warning(char *fmt, ...);
514
515/**
483 * Free config struct 516 * Free config struct
484 */ 517 */
485void free_config(struct sway_config *config); 518void free_config(struct sway_config *config);
@@ -516,7 +549,7 @@ struct seat_attachment_config *seat_attachment_config_new(void);
516struct seat_attachment_config *seat_config_get_attachment( 549struct seat_attachment_config *seat_config_get_attachment(
517 struct seat_config *seat_config, char *identifier); 550 struct seat_config *seat_config, char *identifier);
518 551
519void apply_seat_config(struct seat_config *seat); 552struct seat_config *store_seat_config(struct seat_config *seat);
520 553
521int output_name_cmp(const void *item, const void *data); 554int output_name_cmp(const void *item, const void *data);
522 555
@@ -535,8 +568,6 @@ void apply_output_config_to_outputs(struct output_config *oc);
535 568
536void free_output_config(struct output_config *oc); 569void free_output_config(struct output_config *oc);
537 570
538void create_default_output_configs(void);
539
540int workspace_output_cmp_workspace(const void *a, const void *b); 571int workspace_output_cmp_workspace(const void *a, const void *b);
541 572
542int sway_binding_cmp(const void *a, const void *b); 573int sway_binding_cmp(const void *a, const void *b);