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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 7c544541..8970696c 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -4,6 +4,7 @@
4#include <stdint.h> 4#include <stdint.h>
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/types/wlr_box.h> 8#include <wlr/types/wlr_box.h>
8#include <xkbcommon/xkbcommon.h> 9#include <xkbcommon/xkbcommon.h>
9#include "../include/config.h" 10#include "../include/config.h"
@@ -29,6 +30,7 @@ enum binding_input_type {
29 BINDING_KEYSYM, 30 BINDING_KEYSYM,
30 BINDING_MOUSECODE, 31 BINDING_MOUSECODE,
31 BINDING_MOUSESYM, 32 BINDING_MOUSESYM,
33 BINDING_SWITCH
32}; 34};
33 35
34enum binding_flags { 36enum binding_flags {
@@ -61,6 +63,16 @@ struct sway_mouse_binding {
61}; 63};
62 64
63/** 65/**
66 * A laptop switch binding and an associated command.
67 */
68struct sway_switch_binding {
69 enum wlr_switch_type type;
70 enum wlr_switch_state state;
71 uint32_t flags;
72 char *command;
73};
74
75/**
64 * Focus on window activation. 76 * Focus on window activation.
65 */ 77 */
66enum sway_fowa { 78enum sway_fowa {
@@ -78,6 +90,7 @@ struct sway_mode {
78 list_t *keysym_bindings; 90 list_t *keysym_bindings;
79 list_t *keycode_bindings; 91 list_t *keycode_bindings;
80 list_t *mouse_bindings; 92 list_t *mouse_bindings;
93 list_t *switch_bindings;
81 bool pango; 94 bool pango;
82}; 95};
83 96
@@ -603,6 +616,8 @@ int sway_binding_cmp_keys(const void *a, const void *b);
603 616
604void free_sway_binding(struct sway_binding *sb); 617void free_sway_binding(struct sway_binding *sb);
605 618
619void free_switch_binding(struct sway_switch_binding *binding);
620
606void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding); 621void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding);
607 622
608void load_swaybar(struct bar_config *bar); 623void load_swaybar(struct bar_config *bar);