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.h61
1 files changed, 56 insertions, 5 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 8d077ee7..2c6b83e7 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -103,9 +103,6 @@ struct pid_workspace {
103 time_t *time_added; 103 time_t *time_added;
104}; 104};
105 105
106void pid_workspace_add(struct pid_workspace *pw);
107void free_pid_workspace(struct pid_workspace *pw);
108
109struct bar_config { 106struct bar_config {
110 /** 107 /**
111 * One of "dock", "hide", "invisible" 108 * One of "dock", "hide", "invisible"
@@ -138,7 +135,7 @@ struct bar_config {
138 int height; // -1 not defined 135 int height; // -1 not defined
139 int tray_padding; 136 int tray_padding;
140 bool workspace_buttons; 137 bool workspace_buttons;
141 bool wrap_scroll; 138 bool wrap_scroll;
142 char *separator_symbol; 139 char *separator_symbol;
143 bool strip_workspace_numbers; 140 bool strip_workspace_numbers;
144 bool binding_mode_indicator; 141 bool binding_mode_indicator;
@@ -184,6 +181,52 @@ enum edge_border_types {
184 E_BOTH /**< hide vertical and horizontal edge borders */ 181 E_BOTH /**< hide vertical and horizontal edge borders */
185}; 182};
186 183
184enum command_context {
185 CONTEXT_CONFIG = 1,
186 CONTEXT_BINDING = 2,
187 CONTEXT_IPC = 4,
188 CONTEXT_CRITERIA = 8,
189 CONTEXT_ALL = 0xFFFFFFFF,
190};
191
192struct command_policy {
193 char *command;
194 uint32_t context;
195};
196
197enum secure_feature {
198 FEATURE_LOCK = 1,
199 FEATURE_PANEL = 2,
200 FEATURE_BACKGROUND = 4,
201 FEATURE_SCREENSHOT = 8,
202 FEATURE_FULLSCREEN = 16,
203 FEATURE_KEYBOARD = 32,
204 FEATURE_MOUSE = 64,
205 FEATURE_IPC = 128,
206};
207
208struct feature_policy {
209 char *program;
210 uint32_t features;
211};
212
213enum ipc_feature {
214 IPC_FEATURE_COMMAND = 1,
215 IPC_FEATURE_GET_WORKSPACES = 2,
216 IPC_FEATURE_GET_OUTPUTS = 4,
217 IPC_FEATURE_GET_TREE = 8,
218 IPC_FEATURE_GET_MARKS = 16,
219 IPC_FEATURE_GET_BAR_CONFIG = 32,
220 IPC_FEATURE_GET_VERSION = 64,
221 IPC_FEATURE_GET_INPUTS = 128,
222 IPC_FEATURE_EVENT_WORKSPACE = 256,
223 IPC_FEATURE_EVENT_OUTPUT = 512,
224 IPC_FEATURE_EVENT_MODE = 1024,
225 IPC_FEATURE_EVENT_WINDOW = 2048,
226 IPC_FEATURE_EVENT_BINDING = 4096,
227 IPC_FEATURE_EVENT_INPUT = 8192
228};
229
187/** 230/**
188 * The configuration struct. The result of loading a config file. 231 * The configuration struct. The result of loading a config file.
189 */ 232 */
@@ -203,7 +246,7 @@ struct sway_config {
203 uint32_t floating_mod; 246 uint32_t floating_mod;
204 uint32_t dragging_key; 247 uint32_t dragging_key;
205 uint32_t resizing_key; 248 uint32_t resizing_key;
206 char *floating_scroll_up_cmd; 249 char *floating_scroll_up_cmd;
207 char *floating_scroll_down_cmd; 250 char *floating_scroll_down_cmd;
208 char *floating_scroll_left_cmd; 251 char *floating_scroll_left_cmd;
209 char *floating_scroll_right_cmd; 252 char *floating_scroll_right_cmd;
@@ -252,8 +295,16 @@ struct sway_config {
252 int32_t floating_maximum_height; 295 int32_t floating_maximum_height;
253 int32_t floating_minimum_width; 296 int32_t floating_minimum_width;
254 int32_t floating_minimum_height; 297 int32_t floating_minimum_height;
298
299 // Security
300 list_t *command_policies;
301 list_t *feature_policies;
302 uint32_t ipc_policy;
255}; 303};
256 304
305void pid_workspace_add(struct pid_workspace *pw);
306void free_pid_workspace(struct pid_workspace *pw);
307
257/** 308/**
258 * Loads the main config from the given path. is_active should be true when 309 * Loads the main config from the given path. is_active should be true when
259 * reloading the config. 310 * reloading the config.