diff options
Diffstat (limited to 'include/sway/config.h')
-rw-r--r-- | include/sway/config.h | 46 |
1 files changed, 11 insertions, 35 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index 7fdd0be0..ac1105b4 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -1,17 +1,18 @@ | |||
1 | #ifndef _SWAY_CONFIG_H | 1 | #ifndef _SWAY_CONFIG_H |
2 | #define _SWAY_CONFIG_H | 2 | #define _SWAY_CONFIG_H |
3 | |||
4 | #define PID_WORKSPACE_TIMEOUT 60 | 3 | #define PID_WORKSPACE_TIMEOUT 60 |
5 | |||
6 | #include <libinput.h> | 4 | #include <libinput.h> |
7 | #include <stdint.h> | 5 | #include <stdint.h> |
8 | #include <string.h> | 6 | #include <string.h> |
7 | #include <time.h> | ||
9 | #include <wlr/types/wlr_box.h> | 8 | #include <wlr/types/wlr_box.h> |
10 | #include <xkbcommon/xkbcommon.h> | 9 | #include <xkbcommon/xkbcommon.h> |
11 | #include <time.h> | ||
12 | #include "list.h" | 10 | #include "list.h" |
13 | #include "tree/layout.h" | 11 | #include "tree/layout.h" |
14 | #include "tree/container.h" | 12 | #include "tree/container.h" |
13 | #include "wlr-layer-shell-unstable-v1-protocol.h" | ||
14 | |||
15 | // TODO: Refactor this shit | ||
15 | 16 | ||
16 | /** | 17 | /** |
17 | * Describes a variable created via the `set` command. | 18 | * Describes a variable created via the `set` command. |
@@ -152,24 +153,13 @@ struct bar_config { | |||
152 | char *id; | 153 | char *id; |
153 | uint32_t modifier; | 154 | uint32_t modifier; |
154 | list_t *outputs; | 155 | list_t *outputs; |
155 | //enum desktop_shell_panel_position position; // TODO | 156 | char *position; |
156 | list_t *bindings; | 157 | list_t *bindings; |
157 | char *status_command; | 158 | char *status_command; |
158 | bool pango_markup; | 159 | bool pango_markup; |
159 | char *swaybar_command; | 160 | char *swaybar_command; |
160 | char *font; | 161 | char *font; |
161 | int height; // -1 not defined | 162 | int height; // -1 not defined |
162 | |||
163 | #ifdef ENABLE_TRAY | ||
164 | // Tray | ||
165 | char *tray_output; | ||
166 | char *icon_theme; | ||
167 | uint32_t tray_padding; | ||
168 | uint32_t activate_button; | ||
169 | uint32_t context_button; | ||
170 | uint32_t secondary_button; | ||
171 | #endif | ||
172 | |||
173 | bool workspace_buttons; | 163 | bool workspace_buttons; |
174 | bool wrap_scroll; | 164 | bool wrap_scroll; |
175 | char *separator_symbol; | 165 | char *separator_symbol; |
@@ -292,6 +282,7 @@ struct sway_config { | |||
292 | list_t *active_bar_modifiers; | 282 | list_t *active_bar_modifiers; |
293 | struct sway_mode *current_mode; | 283 | struct sway_mode *current_mode; |
294 | struct bar_config *current_bar; | 284 | struct bar_config *current_bar; |
285 | char *swaybg_command; | ||
295 | uint32_t floating_mod; | 286 | uint32_t floating_mod; |
296 | uint32_t dragging_key; | 287 | uint32_t dragging_key; |
297 | uint32_t resizing_key; | 288 | uint32_t resizing_key; |
@@ -420,11 +411,6 @@ void apply_output_config(struct output_config *oc, | |||
420 | struct sway_container *output); | 411 | struct sway_container *output); |
421 | void free_output_config(struct output_config *oc); | 412 | void free_output_config(struct output_config *oc); |
422 | 413 | ||
423 | /** | ||
424 | * Updates the list of active bar modifiers | ||
425 | */ | ||
426 | void update_active_bar_modifiers(void); | ||
427 | |||
428 | int workspace_output_cmp_workspace(const void *a, const void *b); | 414 | int workspace_output_cmp_workspace(const void *a, const void *b); |
429 | 415 | ||
430 | int sway_binding_cmp(const void *a, const void *b); | 416 | int sway_binding_cmp(const void *a, const void *b); |
@@ -433,27 +419,17 @@ int sway_binding_cmp_keys(const void *a, const void *b); | |||
433 | void free_sway_binding(struct sway_binding *sb); | 419 | void free_sway_binding(struct sway_binding *sb); |
434 | struct sway_binding *sway_binding_dup(struct sway_binding *sb); | 420 | struct sway_binding *sway_binding_dup(struct sway_binding *sb); |
435 | 421 | ||
436 | int sway_mouse_binding_cmp(const void *a, const void *b); | 422 | /* Bar stuff */ |
437 | int sway_mouse_binding_cmp_qsort(const void *a, const void *b); | ||
438 | int sway_mouse_binding_cmp_buttons(const void *a, const void *b); | ||
439 | void free_sway_mouse_binding(struct sway_mouse_binding *smb); | ||
440 | |||
441 | void load_swaybars(); | 423 | void load_swaybars(); |
424 | void invoke_swaybar(struct bar_config *bar); | ||
442 | void terminate_swaybg(pid_t pid); | 425 | void terminate_swaybg(pid_t pid); |
443 | |||
444 | /** | ||
445 | * Allocate and initialize default bar configuration. | ||
446 | */ | ||
447 | struct bar_config *default_bar_config(void); | 426 | struct bar_config *default_bar_config(void); |
427 | void free_bar_config(struct bar_config *bar); | ||
448 | 428 | ||
449 | /** | 429 | /* Global config singleton. */ |
450 | * Global config singleton. | ||
451 | */ | ||
452 | extern struct sway_config *config; | 430 | extern struct sway_config *config; |
453 | 431 | ||
454 | /** | 432 | /* Config file currently being read */ |
455 | * Config file currently being read. | ||
456 | */ | ||
457 | extern const char *current_config_path; | 433 | extern const char *current_config_path; |
458 | 434 | ||
459 | #endif | 435 | #endif |